Skip to content

net/mlx5e: XDP, Add support for multi-packet per page

Tariq Toukan bpf linux-rdma lkml 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. v2 Latest5 patches 9 repliesApplied 5/5
  2. v15 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Link to V1:
https://lore.kernel.org/all/[email protected]/
- Fixed issue found by AI review [1].

Patches in v2 All 5 applied

#Subject and filesSizeRepliesApplied
1/5net/mlx5e: XSK, Increase size for chunk_size paramdrivers/net/ethernet/mellanox/mlx5/core/en/params.h+1 -11 replyApplied
2/5net/mlx5e: XDP, Improve dma address calculation of linear part for XDP_TXdrivers/net/ethernet/mellanox/mlx5/core/en/xdp.c+1 -10 repliesApplied
3/5net/mlx5e: XDP, Remove stride size limitationdrivers/net/ethernet/mellanox/mlx5/core/en/params.c+2 -90 repliesApplied
4/5net/mlx5e: XDP, Use a single linear page per rqdrivers/net/ethernet/mellanox/mlx5/core/en.h drivers/net/ethernet/mellanox/mlx5/core/en_main.c drivers/net/ethernet/mellanox/mlx5/core/en_rx.c+47 -138 repliesApplied
5/5net/mlx5e: XDP, Use page fragments for linear data in multibuf-modedrivers/net/ethernet/mellanox/mlx5/core/en.h drivers/net/ethernet/mellanox/mlx5/core/en_main.c drivers/net/ethernet/mellanox/mlx5/core/en_rx.c+74 -170 repliesApplied

Reviews trailers per patch

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

PatchCarolina Jubran
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

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

Read the v2 thread

Cover letter [PATCH net-next V2 0/5] net/mlx5e: XDP, Add support for multi-packet per page

Hi,

This series removes the limitation of having one packet per page in XDP mode. This has the following implications:

- XDP in Striding RQ mode can now be used on 64K page systems.

- XDP in Legacy RQ mode was using a single packet per page which on 64K page systems is quite inefficient. The improvement can be observed with an XDP_DROP test when running in Legacy RQ mode on a ARM Neoverse-N1 system with a 64K page size:

  +-----------------------------------------------+
  | MTU  | baseline   | this change | improvement |
  |------+------------+-------------+-------------|
  | 1500 | 15.55 Mpps | 18.99 Mpps  | 22.0 %      |
  | 9000 | 15.53 Mpps | 18.24 Mpps  | 17.5 %      |
  +-----------------------------------------------+

After lifting this limitation, the series switches to using fragments for the side page in non-linear mode. This small improvement is at most visible for XDP_DROP tests with small 64B packets and a large enough MTU for Striding RQ to be in non-linear mode:

+----------------------------------------------------------------------+
| System               | MTU  | baseline   | this change | improvement |
|----------------------+------+------------+-------------+-------------|
| 4K page x86_64 [1]   | 9000 | 26.30 Mpps | 30.45 Mpps  | 15.80 %     |
| 64K page aarch64 [2] | 9000 | 15.27 Mpps | 20.10 Mpps  | 31.62 %     |
+----------------------------------------------------------------------+

This series does not cover the xsk (AF_XDP) paths for 64K page systems.

[1] https://lore.kernel.org/all/[email protected]/

V2:
- Link to V1:
https://lore.kernel.org/all/[email protected]/
- Fixed issue found by AI review [1].

Dragos Tatulea (5):
net/mlx5e: XSK, Increase size for chunk_size param net/mlx5e: XDP, Improve dma address calculation of linear part for
XDP_TX
net/mlx5e: XDP, Remove stride size limitation
net/mlx5e: XDP, Use a single linear page per rq net/mlx5e: XDP, Use page fragments for linear data in multibuf-mode

 drivers/net/ethernet/mellanox/mlx5/core/en.h  | 12 +++-
 .../ethernet/mellanox/mlx5/core/en/params.c   | 11 +---
 .../ethernet/mellanox/mlx5/core/en/params.h   |  2 +-
 .../net/ethernet/mellanox/mlx5/core/en/xdp.c  |  2 +-
 .../net/ethernet/mellanox/mlx5/core/en_main.c | 50 ++++++++++++--
 .../net/ethernet/mellanox/mlx5/core/en_rx.c   | 65 +++++++++++++++----
 6 files changed, 113 insertions(+), 29 deletions(-)

base-commit: 8b0e64d6c9e7feec5ba5643b4fa8b7fd54464778

Signature · 1 line
2.44.0