]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: mana: Handle SKB if TX SGEs exceed hardware limit
authorAditya Garg <gargaditya@linux.microsoft.com>
Tue, 18 Nov 2025 11:11:08 +0000 (03:11 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Nov 2025 04:11:57 +0000 (20:11 -0800)
commit934fa943b53795339486cc0026b3ab7ad39dc600
tree51d4848d5a4486e024fd8ad56c39f86b02b4459f
parent929ca3bceab8eaeeb452c0574999c7c6d12b3772
net: mana: Handle SKB if TX SGEs exceed hardware limit

The MANA hardware supports a maximum of 30 scatter-gather entries (SGEs)
per TX WQE. Exceeding this limit can cause TX failures.
Add ndo_features_check() callback to validate SKB layout before
transmission. For GSO SKBs that would exceed the hardware SGE limit, clear
NETIF_F_GSO_MASK to enforce software segmentation in the stack.
Add a fallback in mana_start_xmit() to linearize non-GSO SKBs that still
exceed the SGE limit.

Also, Add ethtool counter for SKBs linearized

Co-developed-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Signed-off-by: Aditya Garg <gargaditya@linux.microsoft.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Link: https://patch.msgid.link/1763464269-10431-2-git-send-email-gargaditya@linux.microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microsoft/mana/mana_en.c
drivers/net/ethernet/microsoft/mana/mana_ethtool.c
include/net/mana/gdma.h
include/net/mana/mana.h