Skip to content

ionic: convert Rx queue buffers to use page_pool

Brett Creeley netdev 2 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. v3 Latest7 patches 0 repliesApplied 7/7
  2. v25 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- Fix overflow issue introduced in patch 5/5 from v2 (patch 6/7 in v3)
- Fix/add ability to swap non-NULL XDP programs and do it without having to reconfigure queues
- Fix stress case when swapping to/from a NULL XDP program many times that resulted in xdp_rxq_info_reg_mem_model() to fail with -ENOSPC

Patches in v3 All 7 applied

#Subject and filesSizeRepliesApplied
1/7ionic: debug line for Tx completion errorsdrivers/net/ethernet/pensando/ionic/ionic_txrx.c+8 -10 repliesApplied
2/7ionic: rename ionic_xdp_rx_put_bufsdrivers/net/ethernet/pensando/ionic/ionic_txrx.c+5 -50 repliesApplied
3/7ionic: use per-queue xdp_progdrivers/net/ethernet/pensando/ionic/ionic_dev.h drivers/net/ethernet/pensando/ionic/ionic_lif.c drivers/net/ethernet/pensando/ionic/ionic_txrx.c+34 -310 repliesApplied
4/7ionic: always use rxq_infodrivers/net/ethernet/pensando/ionic/ionic_lif.c+15 -360 repliesApplied
5/7ionic: Fully reconfigure queues when going to/from a NULL XDP programdrivers/net/ethernet/pensando/ionic/ionic_lif.c drivers/net/ethernet/pensando/ionic/ionic_lif.h+10 -30 repliesApplied
6/7ionic: convert Rx queue buffers to use page_pooldrivers/net/ethernet/pensando/Kconfig drivers/net/ethernet/pensando/ionic/ionic_dev.h drivers/net/ethernet/pensando/ionic/ionic_lif.c +1 more+233 -2080 repliesApplied
7/7ionic: Allow XDP program to be hot swappeddrivers/net/ethernet/pensando/ionic/ionic_lif.c drivers/net/ethernet/pensando/ionic/ionic_txrx.c drivers/net/ethernet/pensando/ionic/ionic_txrx.h+52 -220 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 net-next 0/7] ionic: convert Rx queue buffers to use page_pool

Our home-grown buffer management needs to go away and we need to play nicely with the page_pool infrastructure. This patchset cleans up some of our API use and converts the Rx traffic queues to use page_pool. The first few patches are for tidying up things, then a small XDP configuration refactor, adding page_pool support, and finally adding support to hot swap an XDP program without having to reconfigure anything.

The result is code that more closely follows current patterns, as well as a either a performance boost or equivalent performance as seen with iperf testing:

  mss   netio    tx_pps      rx_pps      total_pps      tx_bw    rx_bw    total_bw
  ----  -------  ----------  ----------  -----------  -------  -------  ----------
Before:
  256   bidir    13,839,293  15,515,227  29,354,520        34       38          71
  512   bidir    13,913,249  14,671,693  28,584,942        62       65         127
  1024  bidir    13,006,189  13,695,413  26,701,602       109      115         224
  1448  bidir    12,489,905  12,791,734  25,281,639       145      149         294
  2048  bidir    9,195,622   9,247,649   18,443,271       148      149         297
  4096  bidir    5,149,716   5,247,917   10,397,633       160      163         323
  8192  bidir    3,029,993   3,008,882   6,038,875        179      179         358
  9000  bidir    2,789,358   2,800,744   5,590,102        181      180         361

After:

  256   bidir    21,540,037  21,344,644  42,884,681        52       52         104
  512   bidir    23,170,014  19,207,260  42,377,274       103       85         188
  1024  bidir    17,934,280  17,819,247  35,753,527       150      149         299
  1448  bidir    15,242,515  14,907,030  30,149,545       167      174         341
  2048  bidir    10,692,542  10,663,023  21,355,565       177      176         353
  4096  bidir    6,024,977   6,083,580   12,108,557       187      180         367
  8192  bidir    3,090,449   3,048,266   6,138,715        180      176         356
  9000  bidir    2,859,146   2,864,226   5,723,372        178      180         358

v3:
- Fix overflow issue introduced in patch 5/5 from v2 (patch 6/7 in v3)
- Fix/add ability to swap non-NULL XDP programs and do it without having to reconfigure queues
- Fix stress case when swapping to/from a NULL XDP program many times that resulted in xdp_rxq_info_reg_mem_model() to fail with -ENOSPC

v2:
- split out prep work into separate patches
- reworked to always use rxq_info structs
- be sure we're in NAPI when calling xdp_return_frame_rx_napi()
- fixed up issues with buffer size and lifetime management
- Link: https://lore.kernel.org/netdev/[email protected]/

v1/RFC:
- Link: https://lore.kernel.org/netdev/[email protected]/

Brett Creeley (2):
ionic: Fully reconfigure queues when going to/from a NULL XDP program
ionic: Allow XDP program to be hot swapped

Shannon Nelson (5):
ionic: debug line for Tx completion errors
ionic: rename ionic_xdp_rx_put_bufs
ionic: use per-queue xdp_prog
ionic: always use rxq_info
ionic: convert Rx queue buffers to use page_pool

 drivers/net/ethernet/pensando/Kconfig         |   1 +
 .../net/ethernet/pensando/ionic/ionic_dev.h   |  23 +-
 .../net/ethernet/pensando/ionic/ionic_lif.c   | 159 ++++---
 .../net/ethernet/pensando/ionic/ionic_lif.h   |   2 +
 .../net/ethernet/pensando/ionic/ionic_txrx.c  | 420 +++++++++---------
 .../net/ethernet/pensando/ionic/ionic_txrx.h  |   4 +-
 6 files changed, 330 insertions(+), 279 deletions(-)
Signature · 1 line
2.17.1