Skip to content

fbnic: Support larger RX pages

Björn Töpel linux-kselftest lkml netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 4 repliesApplied 5/5
  2. v35 patches 4 repliesSuperseded
  3. v25 patches 4 repliesSuperseded

Changes in v4 from the cover letter

=============

- Document that set_ringparam callbacks must report normalized ring sizes through the in/out ethtool_ringparam argument.
- Drop the unused stored TX ring depth; only RX depths are consumed by queue-configuration validation.
- Document that drivers consuming RX ring depths must initialize them before registering the netdev.
- Note the dependency on the separately posted real-queue synchronization fix.
- Carry Breno's Reviewed-by on the BDQ geometry patch and Tested-by on the selftest patch.
- Rebase on net-next after the net tree merge.

Patches in v4 All 5 applied

#Subject and filesSizeRepliesApplied
1/5net: Add netdev_config helpersnet/core/dev.c net/core/dev.h net/core/netdev_config.c +1 more+51 -131 replyApplied
2/5fbnic: Track BDQ device-page geometry per ringdrivers/net/ethernet/meta/fbnic/fbnic_csr.h drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +1 more+72 -561 replyApplied
3/5net: Revalidate queue config for ringparam changesinclude/linux/ethtool.h include/net/netdev_queues.h net/core/dev.h +5 more+133 -141 replyApplied
4/5fbnic: Support larger memory-provider RX pagesdrivers/net/ethernet/meta/fbnic/fbnic_netdev.c drivers/net/ethernet/meta/fbnic/fbnic_txrx.c drivers/net/ethernet/meta/fbnic/fbnic_txrx.h+92 -90 repliesApplied
5/5selftests: drv-net: Request larger zcrx bufferstools/testing/selftests/drivers/net/hw/iou-zcrx.py+5 -10 repliesApplied

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBreno LeitaoSimon HormanJoe Damato
SeriesR-b
1/5R-b R-b
2/5R-b R-b
3/5R-b
4/5
5/5T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH net-next v4 0/5] fbnic: Support larger RX pages

Hi!

This series adds support for large io_uring zero-copy RX buffers to fbnic.

fbnic hardware consumes receive memory in 4 KiB device pages, while io_uring may expose a larger software buffer, such as 256 KiB. Track the device-page geometry per BDQ, represent each large buffer with consecutive descriptors, and decode completions to the corresponding offset within the buffer. HPQ keeps its existing PAGE_SIZE geometry.

Larger buffers also reduce pressure on the memory provider. One provider allocation supplies multiple 4 KiB device pages, so the same amount of receive memory needs fewer net_iov objects and fewer allocation, refill, and recycle operations. Hardware descriptor use remains unchanged.

Ring depth and buffer size must be validated together. An ethtool ring change can otherwise make an active memory-provider configuration invalid. Store RX ring depths in netdev_config, stage proposed values in cfg_pending, and validate the default and each RX queue before committing the change. Both netlink and ioctl use the same transaction helpers.

The selftest requests a power-of-two buffer larger than twice the MTU, checks the reported buffer length, and verifies received data. It does not assume how packets are placed within the buffer.

This series depends on the fbnic real-queue synchronization fix:
https://lore.kernel.org/netdev/[email protected]/

Changes in v4
=============

- Document that set_ringparam callbacks must report normalized ring sizes through the in/out ethtool_ringparam argument.
- Drop the unused stored TX ring depth; only RX depths are consumed by queue-configuration validation.
- Document that drivers consuming RX ring depths must initialize them before registering the netdev.
- Note the dependency on the separately posted real-queue synchronization fix.
- Carry Breno's Reviewed-by on the BDQ geometry patch and Tested-by on the selftest patch.
- Rebase on net-next after the net tree merge.

Changes in v3
=============

- Carry Breno's Reviewed-by on the netdev_config helper patch.
- Clarify that the fbnic ring-depth consumer follows the core patch.
- Document initialization, override, normalization, and stored ring depth semantics.
- Drop the CQE placement assertion from the large-buffer test.
- Reject a zero RX-jumbo depth before validating large RX pages.
- Rebase on net-next.

Changes in v2
=============

- Add generic netdev_config lifecycle helpers for the netlink and ioctl paths.
- Store ring parameters in netdev_config and revalidate RX queues before committing a ring change.
- Preserve the distinction between accepted and applied HDS state.
- Track fbnic device-page geometry per BDQ.
- Validate the fbnic RX page size, fragment count, and PPQ depth.
- Add automated large-buffer test coverage.

v3: https://lore.kernel.org/netdev/[email protected]/
v2: https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/netdev/[email protected]/

Björn Töpel (4):
fbnic: Track BDQ device-page geometry per ring
net: Revalidate queue config for ringparam changes
fbnic: Support larger memory-provider RX pages
selftests: drv-net: Request larger zcrx buffers

Jakub Kicinski (1):
net: Add netdev_config helpers

 drivers/net/ethernet/meta/fbnic/fbnic_csr.h   |  34 +---
 .../net/ethernet/meta/fbnic/fbnic_debugfs.c   |   5 +-
 .../net/ethernet/meta/fbnic/fbnic_netdev.c    |   4 +
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.c  | 173 ++++++++++++++----
 drivers/net/ethernet/meta/fbnic/fbnic_txrx.h  |   7 +
 include/linux/ethtool.h                       |   4 +-
 include/net/netdev_queues.h                   |  56 +++++-
 net/core/dev.c                                |   7 +-
 net/core/dev.h                                |   7 +
 net/core/netdev_config.c                      |  75 +++++++-
 net/ethtool/common.c                          |   8 +
 net/ethtool/common.h                          |   2 +
 net/ethtool/ioctl.c                           |  24 ++-
 net/ethtool/netlink.c                         |  15 +-
 net/ethtool/rings.c                           |  13 +-
 .../selftests/drivers/net/hw/iou-zcrx.py      |   6 +-
 16 files changed, 350 insertions(+), 90 deletions(-)

base-commit: 42a9fb3382fc2573e92f41d203b095d9a372cfc9

Signature · 1 line
2.55.0