From: Alexander Duyck <alexander.duyck@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Jakub Kicinski <kuba@kernel.org>,
pabeni@redhat.com, John Fastabend <john.fastabend@gmail.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Edward Cree <ecree.xilinx@gmail.com>,
netdev@vger.kernel.org, bhelgaas@google.com,
linux-pci@vger.kernel.org,
Alexander Duyck <alexanderduyck@fb.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: Re: [net-next PATCH 00/15] eth: fbnic: Add network driver for Meta Platforms Host Network Interface
Date: Thu, 11 Apr 2024 16:12:14 -0700 [thread overview]
Message-ID: <CAKgT0UfY3MQumrSpLL_tP-xCLjYThsrfH7vFW810f5FsWWJskA@mail.gmail.com> (raw)
In-Reply-To: <70bccb10-cc76-4eec-b2cf-975ed422c443@lunn.ch>
On Thu, Apr 11, 2024 at 10:32 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Thu, Apr 11, 2024 at 09:00:17AM -0700, Alexander Duyck wrote:
> > On Wed, Apr 10, 2024 at 3:37 PM Andrew Lunn <andrew@lunn.ch> wrote:
> > >
> > > > Well I was referring more to the data path level more than the phy
> > > > configuration. I suspect different people have different levels of
> > > > expectations on what minimal firmware is. With this hardware we at
> > > > least don't need to use firmware commands to enable or disable queues,
> > > > get the device stats, or update a MAC address.
> > > >
> > > > When it comes to multi-host NICs I am not sure there are going to be
> > > > any solutions that don't have some level of firmware due to the fact
> > > > that the cable is physically shared with multiple slots.
> > >
> > > This is something Russell King at least considered. I don't really
> > > know enough to know why its impossible for Linux to deal with multiple
> > > slots.
> >
> > It mostly has to do with the arbitration between them. It is a matter
> > of having to pass a TON of info to the individual slice and then the
> > problem is it would have to do things correctly and not manage to take
> > out it's neighbor or the BMC.
>
> How much is specific to your device? How much is just following 802.3
> and the CMIS standards? I assume anything which is just following
> 802.3 and CMIS could actually be re-used? And you have some glue to
> combine them in a way that is specific to your device?
>
> > > > I am assuming we still want to do the PCS driver. So I will still see
> > > > what I can do to get that setup.
> > >
> > > You should look at the API offered by drivers in drivers/net/pcs. It
> > > is designed to be used with drivers which actually drive the hardware,
> > > and use phylink. Who is responsible for configuring and looking at the
> > > results of auto negotiation? Who is responsible for putting the PCS
> > > into the correct mode depending on the SFP modules capabilities?
> > > Because you seemed to of split the PCS into two, and hidden some of it
> > > away, i don't know if it makes sense to try to shoehorn what is left
> > > into a Linux driver.
> >
> > We have control of the auto negotiation as that is north of the PMA
> > and is configured per host. We should support clause 73 autoneg.
> > Although we haven't done much with it as most of our use cases are
> > just fixed speed setups to the switch over either 25G-CR1, 50G-CR2,
> > 50G-CR1, or 100G-CR2. So odds are we aren't going to be doing anything
> > too terribly exciting.
>
> Maybe not, but you might of gained from the community here, if others
> could of adopted this code for their devices. You might not need
> clause 73, but phylink provides helpers to implement it, so it is
> pretty easy to add. Maybe your initial PCS driver does not support it,
> but later adopters who also licence this PCS might add it, and you get
> the feature for free. The corrected/uncorrected counters i asked
> about, are something you might not export in your current code via
> ethtool. But again, this is something which somebody else could add a
> helper for, and you would get it nearly for free.
You don't have to sell me on the reuse advantages of open source. I
will probably look at adding autoneg at some point in the future, but
for our main use case it wasn't needed. If nothing else I will
probably hand it off to one of the new hires on the team when I get
some time.
The counters are exported. Just haven't gotten far enough to show the
ethtool patches yet.. :-)
> > As far as the QSFP setup the FW is responsible for any communication
> > with it. I suspect that the expectation is that we aren't going to
> > need much in the way of config since we are just using direct attach
> > cables.
>
> Another place you might of got features for free. The Linux SFP driver
> exports HWMON values for temperature, power, received power, etc, but
> for 1G. The QSFP+ standard Versatile Diagnostics Monitoring is
> different, but i could see somebody adding a generic implementation in
> the Linux SFP driver, so that the HWMON support is just free. Same
> goes for the error performance statics. Parts of power management
> could easily be generic. It might be possible to use Linux regulators
> to describe what your board is capable if, and the SFP core could then
> implement the ethtool ops, checking with the regulator to see if the
> power is actually available, and then talking to the SFP to tell it to
> change its power class?
Again, for us it ends up not having much value adding additional QSFP
logic because we aren't using anything fancy. It is all just direct
attach cables.
> Florian posted some interesting statistics, that vendors tend to
> maintain their own drivers, and don't get much support from the
> community. However I suspect it is a different story for shared
> infrastructure like PCS drivers, PHY drivers, SFP drivers. That is
> where you get the most community support and the most stuff for free.
> But you actually have to use it to benefit from it.
I'll probably get started on the PCS drivers for this next week. I
will follow up with questions if I run into any issues.
Thanks,
- Alex
next prev parent reply other threads:[~2024-04-11 23:12 UTC|newest]
Thread overview: 163+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 20:08 [net-next PATCH 00/15] eth: fbnic: Add network driver for Meta Platforms Host Network Interface Alexander Duyck
2024-04-03 20:08 ` [net-next PATCH 01/15] PCI: Add Meta Platforms vendor ID Alexander Duyck
2024-04-03 20:20 ` Bjorn Helgaas
2024-04-03 20:08 ` [net-next PATCH 02/15] eth: fbnic: add scaffolding for Meta's NIC driver Alexander Duyck
2024-04-03 20:33 ` Andrew Lunn
2024-04-03 20:47 ` Alexander Duyck
2024-04-03 21:17 ` Andrew Lunn
2024-04-03 21:51 ` Alexander Duyck
2024-04-03 22:20 ` Andrew Lunn
2024-04-03 23:27 ` Alexander Duyck
2024-04-03 20:08 ` [net-next PATCH 03/15] eth: fbnic: Allocate core device specific structures and devlink interface Alexander Duyck
2024-04-03 20:35 ` Bjorn Helgaas
2024-04-03 20:08 ` [net-next PATCH 04/15] eth: fbnic: Add register init to set PCIe/Ethernet device config Alexander Duyck
2024-04-03 20:46 ` Andrew Lunn
2024-04-10 20:31 ` Jacob Keller
2024-04-03 20:08 ` [net-next PATCH 05/15] eth: fbnic: add message parsing for FW messages Alexander Duyck
2024-04-03 21:07 ` Jeff Johnson
2024-04-03 20:08 ` [net-next PATCH 06/15] eth: fbnic: add FW communication mechanism Alexander Duyck
2024-04-03 20:08 ` [net-next PATCH 07/15] eth: fbnic: allocate a netdevice and napi vectors with queues Alexander Duyck
2024-04-03 20:58 ` Andrew Lunn
2024-04-03 22:15 ` Alexander Duyck
2024-04-03 22:26 ` Andrew Lunn
2024-04-03 20:08 ` [net-next PATCH 08/15] eth: fbnic: implement Tx queue alloc/start/stop/free Alexander Duyck
2024-04-03 20:09 ` [net-next PATCH 09/15] eth: fbnic: implement Rx " Alexander Duyck
2024-04-04 11:42 ` kernel test robot
2024-04-03 20:09 ` [net-next PATCH 10/15] eth: fbnic: Add initial messaging to notify FW of our presence Alexander Duyck
2024-04-03 20:09 ` [net-next PATCH 11/15] eth: fbnic: Enable Ethernet link setup Alexander Duyck
2024-04-03 21:11 ` Andrew Lunn
2024-04-05 21:51 ` Andrew Lunn
2024-04-21 23:21 ` Alexander Duyck
2024-04-22 15:52 ` Andrew Lunn
2024-04-22 18:59 ` Alexander H Duyck
2024-04-03 20:09 ` [net-next PATCH 12/15] eth: fbnic: add basic Tx handling Alexander Duyck
2024-04-03 20:09 ` [net-next PATCH 13/15] eth: fbnic: add basic Rx handling Alexander Duyck
2024-04-09 11:47 ` Yunsheng Lin
2024-04-09 15:08 ` Alexander Duyck
2024-04-10 11:54 ` Yunsheng Lin
2024-04-10 15:03 ` Alexander Duyck
2024-04-12 8:43 ` Yunsheng Lin
2024-04-12 9:47 ` Yunsheng Lin
2024-04-12 15:05 ` Alexander Duyck
2024-04-15 13:19 ` Yunsheng Lin
2024-04-15 15:03 ` Alexander Duyck
2024-04-15 17:11 ` Jakub Kicinski
2024-04-15 18:03 ` Alexander Duyck
2024-04-15 18:19 ` Jakub Kicinski
2024-04-15 18:55 ` Alexander Duyck
2024-04-15 22:01 ` Jakub Kicinski
2024-04-15 23:57 ` Alexander Duyck
2024-04-16 0:24 ` Jakub Kicinski
2024-04-16 13:25 ` Yunsheng Lin
2024-04-16 14:35 ` Alexander Duyck
2024-04-16 14:05 ` Alexander Lobakin
2024-04-16 14:46 ` Alexander Duyck
2024-04-16 18:26 ` Andrew Lunn
2024-04-17 8:14 ` Leon Romanovsky
2024-04-17 16:09 ` Alexander Duyck
2024-04-17 10:39 ` Alexander Lobakin
2024-04-03 20:09 ` [net-next PATCH 14/15] eth: fbnic: add L2 address programming Alexander Duyck
2024-04-03 20:09 ` [net-next PATCH 15/15] eth: fbnic: write the TCAM tables used for RSS control and Rx to host Alexander Duyck
2024-04-03 20:42 ` [net-next PATCH 00/15] eth: fbnic: Add network driver for Meta Platforms Host Network Interface Bjorn Helgaas
2024-04-04 11:37 ` Jiri Pirko
2024-04-04 14:45 ` Alexander Duyck
2024-04-04 15:24 ` Andrew Lunn
2024-04-04 15:37 ` Jakub Kicinski
2024-04-05 3:08 ` David Ahern
2024-04-04 15:36 ` Jiri Pirko
2024-04-04 18:35 ` Andrew Lunn
2024-04-04 19:05 ` Leon Romanovsky
2024-04-04 19:22 ` Alexander Duyck
2024-04-04 20:25 ` Jakub Kicinski
2024-04-04 21:59 ` John Fastabend
2024-04-04 23:50 ` Jakub Kicinski
2024-04-05 0:11 ` Alexander Duyck
2024-04-05 2:38 ` Jakub Kicinski
2024-04-05 15:41 ` Alexander Duyck
2024-04-08 6:18 ` Leon Romanovsky
2024-04-08 15:26 ` Alexander Duyck
2024-04-08 18:41 ` Leon Romanovsky
2024-04-08 20:43 ` Alexander Duyck
2024-04-08 21:49 ` Florian Fainelli
2024-04-08 21:52 ` Florian Fainelli
2024-04-09 8:18 ` Leon Romanovsky
2024-04-09 14:43 ` Alexander Duyck
2024-04-09 15:39 ` Jason Gunthorpe
2024-04-09 16:31 ` Alexander Duyck
2024-04-09 17:12 ` Jason Gunthorpe
2024-04-09 18:38 ` Alexander Duyck
2024-04-09 18:54 ` Jason Gunthorpe
2024-04-09 20:03 ` Alexander Duyck
2024-04-09 23:11 ` Jason Gunthorpe
2024-04-10 9:37 ` Jiri Pirko
2024-04-09 19:15 ` Leon Romanovsky
2024-04-05 7:11 ` Paolo Abeni
2024-04-05 12:26 ` Jason Gunthorpe
2024-04-05 13:06 ` Daniel Borkmann
2024-04-05 14:24 ` Alexander Duyck
2024-04-05 15:17 ` Jason Gunthorpe
2024-04-05 18:38 ` Alexander Duyck
2024-04-05 19:02 ` Jason Gunthorpe
2024-04-06 16:05 ` Alexander Duyck
2024-04-06 16:49 ` Andrew Lunn
2024-04-06 17:16 ` Alexander Duyck
2024-04-08 15:04 ` Jakub Kicinski
2024-04-08 19:50 ` Mina Almasry
2024-04-08 11:50 ` Jiri Pirko
2024-04-08 15:46 ` Alexander Duyck
2024-04-08 16:51 ` Jiri Pirko
2024-04-08 17:32 ` John Fastabend
2024-04-09 11:01 ` Jiri Pirko
2024-04-09 13:11 ` Alexander Lobakin
2024-04-09 13:18 ` Jason Gunthorpe
2024-04-09 14:08 ` Jakub Kicinski
2024-04-09 14:27 ` Jakub Kicinski
2024-04-09 14:41 ` Jiri Pirko
2024-04-10 11:45 ` Alexander Lobakin
2024-04-10 12:12 ` Jiri Pirko
2024-04-08 21:36 ` Florian Fainelli
2024-04-09 10:56 ` Jiri Pirko
2024-04-09 13:05 ` Florian Fainelli
2024-04-09 14:28 ` Jiri Pirko
2024-04-09 17:42 ` Florian Fainelli
2024-04-09 18:38 ` Leon Romanovsky
2024-04-08 18:16 ` Jason Gunthorpe
2024-04-09 16:53 ` Edward Cree
2024-04-08 11:37 ` Jiri Pirko
2024-04-04 23:50 ` Alexander Duyck
2024-04-08 11:05 ` Jiri Pirko
2024-04-08 10:54 ` Jiri Pirko
2024-04-05 14:01 ` Przemek Kitszel
2024-04-06 16:53 ` Alexander Duyck
2024-04-09 20:51 ` Jakub Kicinski
2024-04-09 21:06 ` Willem de Bruijn
2024-04-10 7:26 ` Jiri Pirko
2024-04-10 21:30 ` Jacob Keller
2024-04-10 22:19 ` Andrew Lunn
2024-04-11 0:31 ` Jacob Keller
2024-04-09 23:42 ` Andrew Lunn
2024-04-10 15:56 ` Alexander Duyck
2024-04-10 20:01 ` Andrew Lunn
2024-04-10 21:07 ` Alexander Duyck
2024-04-10 22:37 ` Andrew Lunn
2024-04-11 16:00 ` Alexander Duyck
2024-04-11 17:32 ` Andrew Lunn
2024-04-11 23:12 ` Alexander Duyck [this message]
2024-04-11 6:39 ` Jiri Pirko
2024-04-11 16:46 ` Alexander Duyck
2024-04-10 7:42 ` Jiri Pirko
2024-04-10 12:50 ` Przemek Kitszel
2024-04-10 13:46 ` Jakub Kicinski
2024-04-10 15:12 ` Jiri Pirko
2024-04-10 17:35 ` Jakub Kicinski
2024-04-10 17:39 ` Florian Fainelli
2024-04-10 17:56 ` Jakub Kicinski
2024-04-10 18:00 ` Florian Fainelli
2024-04-10 20:03 ` Jakub Kicinski
2024-04-10 18:01 ` Alexander Duyck
2024-04-10 18:29 ` Florian Fainelli
2024-04-10 19:58 ` Jakub Kicinski
2024-04-10 22:03 ` Jacob Keller
2024-04-11 6:31 ` Jiri Pirko
2024-04-11 16:22 ` Jacob Keller
2024-04-11 6:34 ` Jiri Pirko
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=CAKgT0UfY3MQumrSpLL_tP-xCLjYThsrfH7vFW810f5FsWWJskA@mail.gmail.com \
--to=alexander.duyck@gmail.com \
--cc=aleksander.lobakin@intel.com \
--cc=alexanderduyck@fb.com \
--cc=andrew@lunn.ch \
--cc=bhelgaas@google.com \
--cc=daniel@iogearbox.net \
--cc=ecree.xilinx@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).