]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: RX, Fix generating skb from non-linear xdp_buff for legacy RQ
authorAmery Hung <ameryhung@gmail.com>
Thu, 16 Oct 2025 19:55:39 +0000 (22:55 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 21 Oct 2025 00:39:13 +0000 (17:39 -0700)
commitafd5ba577c10639f62e8120df67dc70ea4b61176
tree2aec22fe26daa41cb808c8d104ee535168962b97
parenta73ca0449bcb7c238097cc6a1bf3fd82a78374df
net/mlx5e: RX, Fix generating skb from non-linear xdp_buff for legacy RQ

XDP programs can release xdp_buff fragments when calling
bpf_xdp_adjust_tail(). The driver currently assumes the number of
fragments to be unchanged and may generate skb with wrong truesize or
containing invalid frags. Fix the bug by generating skb according to
xdp_buff after the XDP program runs.

Fixes: ea5d49bdae8b ("net/mlx5e: Add XDP multi buffer support to the non-linear legacy RQ")
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Amery Hung <ameryhung@gmail.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1760644540-899148-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c