Skip to content

libeth, idpf: use GFP_KERNEL for the initial Rx ring fill

Luigi Rizzo intel-wired-lan lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesIn review
  2. v22 patches 6 repliesSuperseded
  3. v11 patch 1 replySuperseded

Changes in v3 from the cover letter

- rename libeth_rx_alloc_gfp() to __libeth_rx_alloc() and put the gfp argument on its own line in page_pool_alloc_netmem() (Alexander Lobakin)
v2: https://lore.kernel.org/r/[email protected]/
- split into two patches (libeth helper and idpf consumer)
v1: https://lore.kernel.org/r/[email protected]/

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libeth: add __libeth_rx_alloc() to specify allocation flagsinclude/net/libeth/rx.h+20 -40 replies
2/2idpf: use GFP_KERNEL for the initial Rx ring filldrivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c drivers/net/ethernet/intel/idpf/idpf_txrx.c drivers/net/ethernet/intel/idpf/idpf_txrx.h+11 -70 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlexander Lobakin
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH iwl-next v3 0/2] libeth, idpf: use GFP_KERNEL for the initial Rx ring fill

libeth_rx_alloc() always allocates with GFP_ATOMIC, including when a driver fills its Rx rings at open or on queue reconfiguration. That fill runs in process context, right after page_pool_create() and before the queues' NAPI is enabled, so it may sleep, and GFP_ATOMIC is needlessly restrictive there: it can neither reclaim nor compact, while the initial fill can allocate tens of thousands of buffers across all queues.

Patch 1 adds __libeth_rx_alloc() taking a gfp_t parameter and turns libeth_rx_alloc() into its GFP_ATOMIC wrapper.
Patch 2 switches idpf's initial Rx ring fill (both splitq and singleq) to GFP_KERNEL.

v3:
- rename libeth_rx_alloc_gfp() to __libeth_rx_alloc() and put the gfp argument on its own line in page_pool_alloc_netmem() (Alexander Lobakin)
v2: https://lore.kernel.org/r/[email protected]/
- split into two patches (libeth helper and idpf consumer)
v1: https://lore.kernel.org/r/[email protected]/

Luigi Rizzo (2):
libeth: add __libeth_rx_alloc() to specify allocation flags
idpf: use GFP_KERNEL for the initial Rx ring fill

 .../ethernet/intel/idpf/idpf_singleq_txrx.c   |  7 +++---
 drivers/net/ethernet/intel/idpf/idpf_txrx.c   |  9 ++++---
 drivers/net/ethernet/intel/idpf/idpf_txrx.h   |  2 +-
 include/net/libeth/rx.h                       | 24 +++++++++++++++----
 4 files changed, 31 insertions(+), 11 deletions(-)
Signature · 1 line
2.56.0.385.gac671c819a-goog