From owner-freebsd-hackers@freebsd.org Thu Jul 16 18:08:18 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC8DC36943E for ; Thu, 16 Jul 2020 18:08:18 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B72LB4VNtz3cjl; Thu, 16 Jul 2020 18:08:18 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f0bb900586834142334a5fa.dip0.t-ipconnect.de [IPv6:2003:cd:5f0b:b900:5868:3414:2334:a5fa]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1448510167; Thu, 16 Jul 2020 18:08:17 +0000 (UTC) (envelope-from se@freebsd.org) Subject: Re: Anybody working on RTL8125 (2.5 Gbit/s Ethernet) support? To: Alex Dupre References: <61362d77-b283-b00e-c7cd-9f93ea937728@freebsd.org> <9a3c9521-c229-2542-70ec-fc2a2bf6f8f3@bluerosetech.com> <6c8fdae0-4fd5-142c-87f8-1f4026bbd8a1@freebsd.org> <6382c967-b7fa-0581-f16e-504a909809f2@FreeBSD.org> <10310e5c-538d-12f9-e504-bca8f75f1aa3@freebsd.org> <956a1f83-7210-df80-8ba1-a239bf06471b@freebsd.org> <4fe0da81-941a-2a89-241b-290ee4ba8457@FreeBSD.org> <262b5b96-5193-abde-91de-f4a6cafec210@freebsd.org> From: =?UTF-8?Q?Stefan_E=c3=9fer?= Autocrypt: addr=se@freebsd.org; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Cc: FreeBSD Hackers Message-ID: <9eac4973-f026-874c-84da-e6892e3935d1@freebsd.org> Date: Thu, 16 Jul 2020 20:08:14 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 18:08:18 -0000 Am 15.07.20 um 21:00 schrieb Alex Dupre: > Stefan Eßer wrote: >> But I really want to have this code merged into the kernel module. > > I'm absolutely not against it, but I'm not going to do it. The primary > reason that many of us are using the realtek driver is that the FreeBSD > one is buggy, and nobody knows why and where. The code diverged probably > more than 10 years ago, with new features (and bugs) added and now they > are almost two completely different drivers, hard to compare, so porting > the code to support new chipset is welcome and doable, but it won't fix > the issue most of us are experiencing, so the port is still really needed. The driver provided by Realtek contains a list of some 50 supported chip versions, to deal with specific hardware issues of several of them. And it contains microcode to replace or patch the (probably also somewhat buggy) code embedded in the hardware. But the driver lacks a number of features present in the FreeBSD version, e.g. NETMAP, interrupt moderation/polling and it seems to contain bugs that are ignored when building with the less strict warning level used for ports. (E.g., see the return value and the actual exit from re_intr() in the Realtek version ...) It does not take advantage of features Ethernet drivers in FreeBSD typically use, e.g. the MII PHY code, and it does even define the PCI config space register offsets instead of using the FreeBSD header to get them. I have not compared it to versions for other operating systems, but I guess that some of the redundancy is a result of only using the LCD of what these operating systems provide (and rather relying on embedded definitions than system header files which might have been moved or might exist only in particular OS releases). Anyway, it will be quite an effort, but I have started to merge the actual driver code (after a merged if_rlreg.h has been finished and allows to build the FreeBSD re driver while containing the defines for the RTL8125). Since I'm away from my test system for most of the next week, I'll not be able to test any of my code before end of July, but I intend to continue this project with the goal of a stable driver for all Realtek chips that uses the microcode and other information from the Realtek driver and adds RTL8125 support. Regards, STefan