Skip to content

mlxsw: Reduce memory footprint of mlxsw driver

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 Latest2 patches 0 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mlxsw: pci: Store number of scatter/gather entries for maximum packet sizedrivers/net/ethernet/mellanox/mlxsw/pci.c+20 -00 repliesApplied
2/2mlxsw: pci: Use fragmented buffersdrivers/net/ethernet/mellanox/mlxsw/pci.c+129 -340 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchIdo Schimmel
1/2R-b
2/2R-b

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

Read the v1 thread

Cover letter [PATCH net-next 0/2] mlxsw: Reduce memory footprint of mlxsw driver

Amit Cohen writes:

A previous patch-set used page pool to allocate buffers, to simplify the change, we first used one continuous buffer, which was allocated with order > 0. This set improves page pool usage to allocate the exact number of pages which are required for packet.

This change requires using fragmented SKB, till now all the buffer was in the linear part. Note that 'skb->truesize' is decreased for small packets.

This set significantly reduces memory consumption of mlxsw driver. The footprint is reduced by 26%.

Patch set overview:
Patch #1 calculates number of scatter/gather entries and stores the value Patch #2 converts the driver to use fragmented buffers

Amit Cohen (2):
mlxsw: pci: Store number of scatter/gather entries for maximum packet
size
mlxsw: pci: Use fragmented buffers

 drivers/net/ethernet/mellanox/mlxsw/pci.c | 183 ++++++++++++++++++----
 1 file changed, 149 insertions(+), 34 deletions(-)
Signature · 1 line
2.45.0