Skip to content

mlxsw: Use page pool for Rx buffers allocation

Petr Machata netdev 1 version 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

  1. v1 Latest7 patches 1 replyApplied 7/7

Patches in v1 All 7 applied

#Subject and filesSizeRepliesApplied
1/7mlxsw: pci: Split NAPI setup/teardown into two stepsdrivers/net/ethernet/mellanox/mlxsw/pci.c+2 -30 repliesApplied
2/7mlxsw: pci: Store CQ pointer as part of RDQ structuredrivers/net/ethernet/mellanox/mlxsw/pci.c+5 -00 repliesApplied
3/7mlxsw: pci: Initialize page pool per CQdrivers/net/ethernet/mellanox/mlxsw/Kconfig drivers/net/ethernet/mellanox/mlxsw/pci.c+60 -10 repliesApplied
4/7mlxsw: pci: Use page pool for Rx buffers allocationdrivers/net/ethernet/mellanox/mlxsw/pci.c+64 -390 repliesApplied
5/7mlxsw: pci: Optimize data buffer accessdrivers/net/ethernet/mellanox/mlxsw/pci.c+1 -00 repliesApplied
6/7mlxsw: pci: Do not store SKB for RDQ elementsdrivers/net/ethernet/mellanox/mlxsw/pci.c+7 -120 repliesApplied
7/7mlxsw: pci: Use napi_consume_skb() to free SKB as part of Tx completiondrivers/net/ethernet/mellanox/mlxsw/pci.c+3 -30 repliesApplied

Reviews trailers per patch

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

PatchPetr MachataIdo SchimmelJiri Pirko
SeriesR-b
1/7R-b R-b
2/7R-b R-b
3/7R-b R-b
4/7R-b R-b
5/7R-b
6/7R-b R-b
7/7R-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 v1 thread

Cover letter [PATCH net-next 0/7] mlxsw: Use page pool for Rx buffers allocation

Amit Cohen writes:

After using NAPI to process events from hardware, the next step is to use page pool for Rx buffers allocation, which is also enhances performance.

To simplify this change, first use page pool to allocate one continuous buffer for each packet, later memory consumption can be improved by using fragmented buffers.

This set significantly enhances mlxsw driver performance, CPU can handle about 370% of the packets per second it previously handled.

The next planned improvement is using XDP to optimize telemetry.

Patch set overview:
Patches #1-#2 are small preparations for page pool usage Patch #3 initializes page pool, but do not use it
Patch #4 converts the driver to use page pool for buffers allocations Patch #5 is an optimization for buffer access
Patch #6 cleans up an unused structure
Patch #7 uses napi_consume_skb() as part of Tx completion

Amit Cohen (7):
mlxsw: pci: Split NAPI setup/teardown into two steps
mlxsw: pci: Store CQ pointer as part of RDQ structure
mlxsw: pci: Initialize page pool per CQ
mlxsw: pci: Use page pool for Rx buffers allocation
mlxsw: pci: Optimize data buffer access
mlxsw: pci: Do not store SKB for RDQ elements
mlxsw: pci: Use napi_consume_skb() to free SKB as part of Tx
completion

 drivers/net/ethernet/mellanox/mlxsw/Kconfig |   1 +
 drivers/net/ethernet/mellanox/mlxsw/pci.c   | 199 ++++++++++++++------
 2 files changed, 142 insertions(+), 58 deletions(-)
Signature · 1 line
2.45.0