[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yxc4GF/Xo8vVxfzZ@lunn.ch>
Date: Tue, 6 Sep 2022 14:07:52 +0200
From: Andrew Lunn <andrew@...n.ch>
To: "mengyuanlou@...-swift.com" <mengyuanlou@...-swift.com>
Cc: netdev@...r.kernel.org, Jiawen Wu <jiawenwu@...stnetic.com>
Subject: Re: [PATCH net-next 2] net: ngbe: sw init and hw init
> Is it necessary to pull the common code out into a library?
> There are some differences in register configuration.
More code, means more bugs. Somebody fixes the bug in one copy of the
code and has no idea there is a second copy of the code in another
driver with the same bug etc.
It also does not look like any of this is on the fast path. If you
have benchmarks which show using common code slows down the fast path,
moving frames into/out of the interface then you can have similar code
repeated in each driver.
So yes, it is necessary to create a collection of shared code.
> It is not convenient for customers to use.
Customers just installs the kernel RPM/deb from their Linux
distribution and it has all the drivers. Backporting the drivers to a
vendor kernel should not be any more difficult because of the shared
code.
Andrew
Powered by blists - more mailing lists