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

From: Petr Machata <[email-masked]>
Date: Tue, 18 Jun 2024 13:34:39 +0200

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(-)

-- 
2.45.0