From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiner Kallweit Subject: Re: [PATCH RFC 00/18] r8169: separate r8168 driver and add experimental phylib support Date: Thu, 21 Dec 2017 22:27:53 +0100 Message-ID: <7d252113-aff6-5b8f-3924-71618f621cef@gmail.com> References: <83321b2e-8402-26c5-9703-3fe795cc893d@gmail.com> <20171221.161603.944790580293624594.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: andrew@lunn.ch, nic_swsd@realtek.com, hau@realtek.com, netdev@vger.kernel.org To: David Miller Return-path: Received: from mail-wm0-f41.google.com ([74.125.82.41]:44478 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752884AbdLUV2A (ORCPT ); Thu, 21 Dec 2017 16:28:00 -0500 Received: by mail-wm0-f41.google.com with SMTP id t8so18498960wmc.3 for ; Thu, 21 Dec 2017 13:27:59 -0800 (PST) In-Reply-To: <20171221.161603.944790580293624594.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: Am 21.12.2017 um 22:16 schrieb David Miller: > From: Heiner Kallweit > Date: Thu, 21 Dec 2017 21:38:11 +0100 > >> This experimental series separates drivers for PCI / PCIE NIC's and >> adds initial phylib support to the separated r8168 driver. > > Thanks for working on this. > > The RX and TX ring handling is basically going to be identical > for the two chips, so it's very undesirable to duplicate that > code in the two drivers. > Agree .. My approach would be: - remove everything that's not needed from both drivers - see what's still identical and factor it out into lib(s) Currently the driver is one source code file with 8.700 LoC. That's way too big anyway IMO and should be splitted. > Getting good test coverage is going to be extremely challenging > for this, so the more code you share between the two drivers > rather than duplicate the better. > I'm aware of this (seeing that basically every chip needs certain quirks) and don't expect the patch set to be mainline-ready very soon. I have access to one supported chip only, so I hope others give it a try too.