[PATCH v5 0/8] net/nfb: rework to real multiport

spinler
2026-01-23T17:22:54Z

This series implements real multiport for better user experience.

The existing driver creates one ethdev/port for one PCI device.
As the CESNET-NDK based cards aren't capable to represent each
Ethernet port by own PCI device, new driver implementation
processes real port configuration from firmware/card and switches
from rte_eth_dev_pci_generic_probe to multiple rte_eth_dev_create calls.

---
v5:
* Fixed memory leak on error path.
* Separated nfb_eth_dev_create_for_ifc() from nfb_eth_common_probe().
* Reworked port matching to eliminate the port mask / 64b width and potential integer overflow.
The nfb_eth_dev_create_for_ifc() is now called directly from rte_kvargs_process().
* Renamed nfb_init_params to nfb_probe_params and updated the nfb_eth_common_probe() header.
* Unified Rx+Tx MAC init and deinit functions to avoid code duplication.
* calloc/free is now used instead of rte_calloc in Rx+Tx MAC init/deinit.
* The return values of snprintf are now handled properly.
* The return value of Rx+Tx MAC init is now handled properly.
* The name of the struct type is now prefixed with nfb_.
* Used a consistent error handling pattern (-EINVAL instead of -1).
* Added descriptions to new struct members.
* Some commit messages have been updated with better descriptions.

Depends-on: series-37064 ("net/nfb: code cleanup")

Martin Spinler (8):
net/nfb: prepare for indirect queue mapping scheme
net/nfb: create one ethdev per ethernet port
net/nfb: add vdev as alternative device probe method
net/nfb: add device argument "port" to limit used ports
net/nfb: init only MACs associated with device
net/nfb: add compatible cards to driver PCI ID table
net/nfb: report firmware version
doc/nfb: cleanup and update guide

doc/guides/nics/features/nfb.ini | 4 +
doc/guides/nics/nfb.rst | 187 +++++------
doc/guides/rel_notes/release_26_03.rst | 9 +
drivers/net/nfb/meson.build | 1 +
drivers/net/nfb/nfb.h | 56 +++-
drivers/net/nfb/nfb_ethdev.c | 444 ++++++++++++++++++-------
drivers/net/nfb/nfb_rx.c | 30 +-
drivers/net/nfb/nfb_rx.h | 9 +-
drivers/net/nfb/nfb_tx.c | 27 +-
drivers/net/nfb/nfb_tx.h | 7 +-
drivers/net/nfb/nfb_vdev.c | 107 ++++++
11 files changed, 624 insertions(+), 257 deletions(-)
create mode 100644 drivers/net/nfb/nfb_vdev.c

--
2.52.0