Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ibmveth: Disable GSO for packets with small MSS

Some physical adapters on Power systems do not support segmentation
offload when the MSS is less than 224 bytes. Attempting to send such
packets causes the adapter to freeze, stopping all traffic until
manually reset.

Implement ndo_features_check to disable GSO for packets with small MSS
values. The network stack will perform software segmentation instead.

The 224-byte minimum matches ibmvnic
commit <f10b09ef687f> ("ibmvnic: Enforce stronger sanity checks
on GSO packets")
which uses the same physical adapters in SEA configurations.

The issue occurs specifically when the hardware attempts to perform
segmentation (gso_segs > 1) with a small MSS. Single-segment GSO packets
(gso_segs == 1) do not trigger the problematic LSO code path and are
transmitted normally without segmentation.

Add an ndo_features_check callback to disable GSO when MSS < 224 bytes.
Also call vlan_features_check() to ensure proper handling of VLAN packets,
particularly QinQ (802.1ad) configurations where the hardware parser may
not support certain offload features.

Validated using iptables to force small MSS values. Without the fix,
the adapter freezes. With the fix, packets are segmented in software
and transmission succeeds. Comprehensive regression testing completedd
(MSS tests, performance, stability).

Fixes: 8641dd85799f ("ibmveth: Add support for TSO")
Cc: stable@vger.kernel.org
Reviewed-by: Brian King <bjking1@linux.ibm.com>
Tested-by: Shaik Abdulla <shaik.abdulla1@ibm.com>
Tested-by: Naveed Ahmed <naveedaus@in.ibm.com>
Signed-off-by: Mingming Cao <mmc@linux.ibm.com>
Link: https://patch.msgid.link/20260424162917.65725-1-mmc@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Mingming Cao and committed by
Jakub Kicinski
cc427d24 4438113b

+23
+22
drivers/net/ethernet/ibm/ibmveth.c
··· 1756 1756 return 0; 1757 1757 } 1758 1758 1759 + static netdev_features_t ibmveth_features_check(struct sk_buff *skb, 1760 + struct net_device *dev, 1761 + netdev_features_t features) 1762 + { 1763 + /* Some physical adapters do not support segmentation offload with 1764 + * MSS < 224. Disable GSO for such packets to avoid adapter freeze. 1765 + * Note: Single-segment packets (gso_segs == 1) don't need this check 1766 + * as they bypass the LSO path and are transmitted without segmentation. 1767 + */ 1768 + if (skb_is_gso(skb)) { 1769 + if (skb_shinfo(skb)->gso_size < IBMVETH_MIN_LSO_MSS) { 1770 + netdev_warn_once(dev, 1771 + "MSS %u too small for LSO, disabling GSO\n", 1772 + skb_shinfo(skb)->gso_size); 1773 + features &= ~NETIF_F_GSO_MASK; 1774 + } 1775 + } 1776 + 1777 + return vlan_features_check(skb, features); 1778 + } 1779 + 1759 1780 static const struct net_device_ops ibmveth_netdev_ops = { 1760 1781 .ndo_open = ibmveth_open, 1761 1782 .ndo_stop = ibmveth_close, ··· 1788 1767 .ndo_set_features = ibmveth_set_features, 1789 1768 .ndo_validate_addr = eth_validate_addr, 1790 1769 .ndo_set_mac_address = ibmveth_set_mac_addr, 1770 + .ndo_features_check = ibmveth_features_check, 1791 1771 #ifdef CONFIG_NET_POLL_CONTROLLER 1792 1772 .ndo_poll_controller = ibmveth_poll_controller, 1793 1773 #endif
+1
drivers/net/ethernet/ibm/ibmveth.h
··· 37 37 #define IBMVETH_ILLAN_IPV4_TCP_CSUM 0x0000000000000002UL 38 38 #define IBMVETH_ILLAN_ACTIVE_TRUNK 0x0000000000000001UL 39 39 40 + #define IBMVETH_MIN_LSO_MSS 224 /* Minimum MSS for LSO */ 40 41 /* hcall macros */ 41 42 #define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \ 42 43 plpar_hcall_norets(H_REGISTER_LOGICAL_LAN, ua, buflst, rxq, fltlst, mac)