mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB
[ Upstream commit 95b9606b15bb3ce1198d28d2393dd0e1f0a5f3e9 ] Current loopback test validation ignores non-linear SKB case in the SKB access, which can lead to failures in scenarios such as when HW GRO is enabled. Linearize the SKB so both cases will be handled. Signed-off-by: Alexei Lazar <alazar@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20250209101716.112774-15-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3cd53e516f
commit
c6406c5942
1 changed files with 3 additions and 0 deletions
|
|
@ -189,6 +189,9 @@ mlx5e_test_loopback_validate(struct sk_buff *skb,
|
|||
struct udphdr *udph;
|
||||
struct iphdr *iph;
|
||||
|
||||
if (skb_linearize(skb))
|
||||
goto out;
|
||||
|
||||
/* We are only going to peek, no need to clone the SKB */
|
||||
if (MLX5E_TEST_PKT_SIZE - ETH_HLEN > skb_headlen(skb))
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue