From nobody Thu Dec 19 16:37:47 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YDbnm2LS3z5hRHC for ; Thu, 19 Dec 2024 16:38:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YDbnl4dSNz4vGr for ; Thu, 19 Dec 2024 16:38:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of adrian.chadd@gmail.com designates 209.85.167.44 as permitted sender) smtp.mailfrom=adrian.chadd@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-54026562221so881014e87.1 for ; Thu, 19 Dec 2024 08:38:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734626280; x=1735231080; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zu/1Osa1oCgSiPBgTln+OhQ4d3HaWcx9u2xVB+0Tnqk=; b=EYAMSUjj60TQXOJFNUS0NguN8fsIdMQ12I6yHNCGEeNSqVUegrtNp4fa8f13DNjMK9 f3TzFBIkmuTFN/zAfF2te2Kcej9pjiiEo05hJ+hjqdSoZYqwQ3HEB9PAgirhQX7rFXDb viPJimVDpWxHyhPvcrTZeVfqFVO+lIQV9/XsyOeMIaWc2c59/EX90dv8FsidvloMfCdC jvmhFpvVJQrWu5Rb7Vxl7WHlWGhGT6zuhrkaG2kn+CRrFjbesHzY7ALeHG6PF8OTYoeg 4Wsedz7j9kKhkgEexEU3w5CtXC8LLsWR3GCT6NQWD8Wr3SsZL4aetkrR52jChCYeIaIs nfsA== X-Gm-Message-State: AOJu0YzbJVbjWN26ZGNUfpCfwCgqweBtpqWPyYpQhkflCsZBb5ncAutm /KitLI1G0WCxpcxS6t2a+kZuMxU70N65qktSZP4zH0ZkR3GvWyeJtAgTlGytFtbCeor6B10hvgU f+VcqZiwNazj2J5RwGFoItcCS2Ob0XJPB X-Gm-Gg: ASbGncsnhYYD33smWxplkZg51sR1UZkhHv00gBLL7+w/nduIU+sw+xS4Lw+ZLOZaxMa l5d/8UUWh0KNiRqqU0FqBixuwGBYKTVIXFPRoE0w= X-Google-Smtp-Source: AGHT+IFLqLlECCpIdRTHlaI6Y1uSzc8MSVF8n/XzAEOXGLojso1ftkeC3Pu7m5i0i33ghhZO2R3jG71hJnAgwpBh2u0= X-Received: by 2002:a05:6512:23a3:b0:542:2203:9d5d with SMTP id 2adb3069b0e04-54222039db0mr1115682e87.2.1734626280252; Thu, 19 Dec 2024 08:38:00 -0800 (PST) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 From: Adrian Chadd Date: Thu, 19 Dec 2024 08:37:47 -0800 Message-ID: Subject: I'm trying to clean up the vendor if_re driver, and could do with some testers To: FreeBSD Net Content-Type: multipart/alternative; boundary="00000000000040b3d60629a227d6" X-Spamd-Result: default: False [-2.05 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.96)[-0.958]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_MEDIUM(-0.19)[-0.194]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TAGGED_FROM(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; TO_DOM_EQ_FROM_DOM(0.00)[]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.44:from]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.44:from] X-Rspamd-Queue-Id: 4YDbnl4dSNz4vGr X-Spamd-Bar: -- --00000000000040b3d60629a227d6 Content-Type: text/plain; charset="UTF-8" hi! I'm trying to clean up the vendor if_re driver. As is, it's a > 30,000 line single source file driver that badly needs refactoring and a HAL. I've started down that path here. https://github.com/erikarn/rtl_bsd_drv/tree/ahc_v1.100 I've started down the path of refactoring out the MAC and PHY specific code into separate source files. The RTL8125 PHY/MAC source is over 4000 lines - or ~ 12% of the original driver source by line count. A lot of it is just MAC/PHY initialisation and what looks like firmware code blobs / patching. However, this is just a straight up refactor right now - ideally the vendor driver would actually have methods for all of this in a HAL rather than giant if/case statements for things. I'd love some testing and feedback. I have an E3000 2.5G killer NIC in this laptop here, which is one out of like 97 or so separate MAC variations that vendor driver claims to support. Before anyone asks, I'm purposely not shipping it as a port yet - I don't want to do releases of this thing, I really just want to keep churning on it quickly until it's in good enough shape to import into FreeBSD. To build it, look at the 'build.sh' script - you'll just need to change the kernel source code path. Thanks! -adrian --00000000000040b3d60629a227d6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
hi!

I'm trying to clean up the vend= or if_re driver. As is, it's a > 30,000 line single source file driv= er that badly needs refactoring and a HAL.

I'v= e started down that path here.


I've started down the pat= h of refactoring out the MAC and PHY specific code into separate source fil= es. The RTL8125 PHY/MAC source is over 4000 lines - or ~ 12% of the origina= l driver source by line count. A lot of it is just MAC/PHY initialisation a= nd what looks like firmware code blobs / patching. However, this is just a = straight up refactor right now - ideally the vendor driver would actually h= ave methods for all of this in a HAL rather than giant if/case statements f= or things.

I'd love some testing and feedback.= I have an E3000 2.5G killer NIC in this laptop here, which is one out of l= ike 97 or so separate MAC variations that vendor driver claims to support.<= /div>

Before anyone asks, I'm purposely not shipping= it as a port yet - I don't want to do releases of this thing, I really= just want to keep churning on it quickly until it's in good enough sha= pe to import into FreeBSD. To build it, look at the 'build.sh' scri= pt - you'll just need to change the kernel source code path.
=
Thanks!


-adrian

--00000000000040b3d60629a227d6--