mbox series

[net-next,v5,00/15] eth: fbnic: Add network driver for Meta Platforms Host Network Interface

Message ID 172079913640.1778861.11459276843992867323.stgit@ahduyck-xeon-server.home.arpa (mailing list archive)
Headers show
Series eth: fbnic: Add network driver for Meta Platforms Host Network Interface | expand

Message

Alexander H Duyck July 12, 2024, 3:49 p.m. UTC
This patch set includes the necessary patches to enable basic Tx and Rx
over the Meta Platforms Host Network Interface. To do this we introduce a
new driver and driver directories in the form of
"drivers/net/ethernet/meta/fbnic".

The NIC itself is fairly simplistic. As far as speeds we support 25Gb,
50Gb, and 100Gb and we are mostly focused on speeds and feeds. As far as
future patch sets we will be supporting the basic Rx/Tx offloads such as
header/payload data split, TSO, checksum, and timestamp offloads. We have
access to the MAC and PCS from the NIC, however the PHY and QSFP are hidden
behind a FW layer as it is shared between 4 slices and the BMC.

Due to submission limits the general plan to submit a minimal driver for
now almost equivalent to a UEFI driver in functionality, and then follow up
over the coming months enabling additional offloads and enabling more
features for the device.

v2:
- Pulled out most of the link logic leaving minimal phylink link interface
- Added support for up to 64K pages by spanning multiple descriptors
- Limited driver load message to only display on successful loading
- Removed LED configuration, will add back in follow-on patch
- Replaced pci_enable_msix_range with pci_alloc_irq_vectors
- Updated comments to start with a capital letter
- Limited architectures to x86_64 for now
- Updated to "Return:" tag for kernel-doc
- Added fbd to read/write CSR macros

v3:
- Fixed resource issues due to not calling pci_disable_device
- Addressed sparse errors for !x | y
- CCed Eric Dumazet and Kernel Team at meta to submission
- Cleaned up kdoc to include missing Return: and formatting issues
- Removed unneeded inlines from fbnic_txrx.c
- Added support for setting queue to NAPI mapping
- Added support for setting NAPI to IRQ mapping
- Updated phylink to make use of rx_pause, tx_pause in mac_link_up function

v4:
- Removed _pause variables from fbnic_net
- Removed link_state variable
- Make link_direction an enum from fbnic_pcs_get_link_event_asic
- Switched to using phylink_resume/suspend to avoid blocking BMC traffic
- Always pass "false" to phylink_pcs_change
- Added "TBD:" comments to call out temporary workarounds for phylink code
- moved fbnic_fill to Rx enablement patch to address several issues
- Refactored BMC MAC address configuration to avoid MACDA reads

v5:
- Added IRQF_ONESHOT to mailbox IRQ request to document behavioral expectation
- Fixed a few typos in comments

---

Alexander Duyck (15):
      PCI: Add Meta Platforms vendor ID
      eth: fbnic: Add scaffolding for Meta's NIC driver
      eth: fbnic: Allocate core device specific structures and devlink interface
      eth: fbnic: Add register init to set PCIe/Ethernet device config
      eth: fbnic: Add message parsing for FW messages
      eth: fbnic: Add FW communication mechanism
      eth: fbnic: Allocate a netdevice and napi vectors with queues
      eth: fbnic: Implement Tx queue alloc/start/stop/free
      eth: fbnic: Implement Rx queue alloc/start/stop/free
      eth: fbnic: Add initial messaging to notify FW of our presence
      eth: fbnic: Add link detection
      eth: fbnic: Add basic Tx handling
      eth: fbnic: Add basic Rx handling
      eth: fbnic: Add L2 address programming
      eth: fbnic: Write the TCAM tables used for RSS control and Rx to host


 MAINTAINERS                                   |    7 +
 drivers/net/ethernet/Kconfig                  |    1 +
 drivers/net/ethernet/Makefile                 |    1 +
 drivers/net/ethernet/meta/Kconfig             |   31 +
 drivers/net/ethernet/meta/Makefile            |    6 +
 drivers/net/ethernet/meta/fbnic/Makefile      |   19 +
 drivers/net/ethernet/meta/fbnic/fbnic.h       |  144 ++
 drivers/net/ethernet/meta/fbnic/fbnic_csr.h   |  838 ++++++++
 .../net/ethernet/meta/fbnic/fbnic_devlink.c   |   88 +
 .../net/ethernet/meta/fbnic/fbnic_drvinfo.h   |    5 +
 drivers/net/ethernet/meta/fbnic/fbnic_fw.c    |  791 +++++++
 drivers/net/ethernet/meta/fbnic/fbnic_fw.h    |  124 ++
 drivers/net/ethernet/meta/fbnic/fbnic_irq.c   |  208 ++
 drivers/net/ethernet/meta/fbnic/fbnic_mac.c   |  666 ++++++
 drivers/net/ethernet/meta/fbnic/fbnic_mac.h   |   86 +
 .../net/ethernet/meta/fbnic/fbnic_netdev.c    |  488 +++++
 .../net/ethernet/meta/fbnic/fbnic_netdev.h    |   63 +
 drivers/net/ethernet/meta/fbnic/fbnic_pci.c   |  564 +++++
 .../net/ethernet/meta/fbnic/fbnic_phylink.c   |  161 ++
 drivers/net/ethernet/meta/fbnic/fbnic_rpc.c   |  651 ++++++
 drivers/net/ethernet/meta/fbnic/fbnic_rpc.h   |  189 ++
 drivers/net/ethernet/meta/fbnic/fbnic_tlv.c   |  529 +++++
 drivers/net/ethernet/meta/fbnic/fbnic_tlv.h   |  175 ++
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c  | 1913 +++++++++++++++++
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.h  |  127 ++
 include/linux/pci_ids.h                       |    2 +
 26 files changed, 7877 insertions(+)
 create mode 100644 drivers/net/ethernet/meta/Kconfig
 create mode 100644 drivers/net/ethernet/meta/Makefile
 create mode 100644 drivers/net/ethernet/meta/fbnic/Makefile
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic.h
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_csr.h
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_devlink.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_drvinfo.h
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_fw.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_fw.h
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_irq.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_mac.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_mac.h
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_netdev.h
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_pci.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_phylink.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_rpc.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_rpc.h
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_tlv.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_tlv.h
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
 create mode 100644 drivers/net/ethernet/meta/fbnic/fbnic_txrx.h

--

Comments

patchwork-bot+netdevbpf@kernel.org July 15, 2024, 8:10 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 12 Jul 2024 08:49:08 -0700 you wrote:
> This patch set includes the necessary patches to enable basic Tx and Rx
> over the Meta Platforms Host Network Interface. To do this we introduce a
> new driver and driver directories in the form of
> "drivers/net/ethernet/meta/fbnic".
> 
> The NIC itself is fairly simplistic. As far as speeds we support 25Gb,
> 50Gb, and 100Gb and we are mostly focused on speeds and feeds. As far as
> future patch sets we will be supporting the basic Rx/Tx offloads such as
> header/payload data split, TSO, checksum, and timestamp offloads. We have
> access to the MAC and PCS from the NIC, however the PHY and QSFP are hidden
> behind a FW layer as it is shared between 4 slices and the BMC.
> 
> [...]

Here is the summary with links:
  - [net-next,v5,01/15] PCI: Add Meta Platforms vendor ID
    https://git.kernel.org/netdev/net-next/c/c5eaf1b3f824
  - [net-next,v5,02/15] eth: fbnic: Add scaffolding for Meta's NIC driver
    https://git.kernel.org/netdev/net-next/c/546dd90be979
  - [net-next,v5,03/15] eth: fbnic: Allocate core device specific structures and devlink interface
    https://git.kernel.org/netdev/net-next/c/1a9d48892ea5
  - [net-next,v5,04/15] eth: fbnic: Add register init to set PCIe/Ethernet device config
    https://git.kernel.org/netdev/net-next/c/3646153161f1
  - [net-next,v5,05/15] eth: fbnic: Add message parsing for FW messages
    https://git.kernel.org/netdev/net-next/c/c6203e678cc9
  - [net-next,v5,06/15] eth: fbnic: Add FW communication mechanism
    https://git.kernel.org/netdev/net-next/c/da3cde08209e
  - [net-next,v5,07/15] eth: fbnic: Allocate a netdevice and napi vectors with queues
    https://git.kernel.org/netdev/net-next/c/bc6107771bb4
  - [net-next,v5,08/15] eth: fbnic: Implement Tx queue alloc/start/stop/free
    https://git.kernel.org/netdev/net-next/c/40bf06a160a1
  - [net-next,v5,09/15] eth: fbnic: Implement Rx queue alloc/start/stop/free
    https://git.kernel.org/netdev/net-next/c/0cb4c0a13723
  - [net-next,v5,10/15] eth: fbnic: Add initial messaging to notify FW of our presence
    https://git.kernel.org/netdev/net-next/c/20d2e88cc746
  - [net-next,v5,11/15] eth: fbnic: Add link detection
    https://git.kernel.org/netdev/net-next/c/69684376eed5
  - [net-next,v5,12/15] eth: fbnic: Add basic Tx handling
    https://git.kernel.org/netdev/net-next/c/9a57bacd574b
  - [net-next,v5,13/15] eth: fbnic: Add basic Rx handling
    https://git.kernel.org/netdev/net-next/c/a29b8eb6e533
  - [net-next,v5,14/15] eth: fbnic: Add L2 address programming
    https://git.kernel.org/netdev/net-next/c/eb690ef8d1c2
  - [net-next,v5,15/15] eth: fbnic: Write the TCAM tables used for RSS control and Rx to host
    https://git.kernel.org/netdev/net-next/c/355440a6981a

You are awesome, thank you!