]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/mlx5e: XDP, Use a single linear page per rq
authorDragos Tatulea <dtatulea@nvidia.com>
Fri, 3 Apr 2026 09:09:26 +0000 (12:09 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 7 Apr 2026 11:34:04 +0000 (13:34 +0200)
commitebd4ad29cc828f762d98f41b2a6a3f806185616f
treea66cfa46378dc2a6d517db67100b5367409532d6
parent2dfaa02387743306e1821ad01d4d4f5e7793cfb0
net/mlx5e: XDP, Use a single linear page per rq

Currently in striding rq there is one mlx5e_frag_page member per WQE for
the linear page. This linear page is used only in XDP multi-buffer mode.
This is wasteful because only one linear page is needed per rq: the page
gets refreshed on every packet, regardless of WQE. Furthermore, it is
not needed in other modes (non-XDP, XDP single-buffer).

This change moves the linear page into its own structure (struct
mlx5_mpw_linear_info) and allocates it only when necessary.

A special structure is created because an upcoming patch will extend
this structure to support fragmentation of the linear page.

This patch has no functional changes.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260403090927.139042-5-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/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