From: Andrew Lunn <andrew@lunn.ch>
To: "mengyuanlou@net-swift.com" <mengyuanlou@net-swift.com>
Cc: netdev@vger.kernel.org, Jiawen Wu <jiawenwu@trustnetic.com>
Subject: Re: [PATCH net-next 2] net: ngbe: sw init and hw init
Date: Tue, 6 Sep 2022 14:07:52 +0200 [thread overview]
Message-ID: <Yxc4GF/Xo8vVxfzZ@lunn.ch> (raw)
In-Reply-To: <DC1F2305-9590-4107-8BB5-366B6E978F82@net-swift.com>
> 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
next prev parent reply other threads:[~2022-09-06 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 12:52 [PATCH net-next 2] net: ngbe: sw init and hw init Mengyuan Lou
2022-09-06 0:48 ` Andrew Lunn
2022-09-06 2:25 ` mengyuanlou
2022-09-06 12:07 ` Andrew Lunn [this message]
2022-09-06 12:22 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yxc4GF/Xo8vVxfzZ@lunn.ch \
--to=andrew@lunn.ch \
--cc=jiawenwu@trustnetic.com \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.