{"id":2227984,"url":"http://patchwork.ozlabs.org/api/patches/2227984/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260424162917.65725-1-mmc@linux.ibm.com/","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/","list_archive_url":"https://lore.kernel.org/linuxppc-dev/","list_archive_url_format":"https://lore.kernel.org/linuxppc-dev/{}/","commit_url_format":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"},"msgid":"<20260424162917.65725-1-mmc@linux.ibm.com>","list_archive_url":"https://lore.kernel.org/linuxppc-dev/20260424162917.65725-1-mmc@linux.ibm.com/","date":"2026-04-24T16:29:17","name":"[v3] ibmveth: Disable GSO for packets with small MSS","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"21af75c23794aa4192913a6fede01adf646f226c","submitter":{"id":91298,"url":"http://patchwork.ozlabs.org/api/people/91298/?format=json","name":"Mingming Cao","email":"mmc@linux.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260424162917.65725-1-mmc@linux.ibm.com/mbox/","series":[{"id":501393,"url":"http://patchwork.ozlabs.org/api/series/501393/?format=json","web_url":"http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=501393","date":"2026-04-24T16:29:17","name":"[v3] ibmveth: Disable GSO for packets with small MSS","version":3,"mbox":"http://patchwork.ozlabs.org/series/501393/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2227984/comments/","check":"success","checks":"http://patchwork.ozlabs.org/api/patches/2227984/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linuxppc-dev+bounces-20090-incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=ZMEyTdGE;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=112.213.38.117; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-20090-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)","lists.ozlabs.org;\n arc=none smtp.remote-ip=148.163.156.1","lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com","lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=ZMEyTdGE;\n\tdkim-atps=neutral","lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com\n (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com;\n envelope-from=mmc@linux.ibm.com; receiver=lists.ozlabs.org)"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g2JMT049vz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 02:29:40 +1000 (AEST)","from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4g2JMR46WFz2ybQ;\n\tSat, 25 Apr 2026 02:29:39 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n [148.163.156.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4g2JMQ5dy7z2yC9\n\tfor <linuxppc-dev@lists.ozlabs.org>; Sat, 25 Apr 2026 02:29:38 +1000 (AEST)","from pps.filterd (m0353729.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63OAqZpa3292244;\n\tFri, 24 Apr 2026 16:29:28 GMT","from ppma22.wdc07v.mail.ibm.com\n (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92])\n\tby mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dphfrp659-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tFri, 24 Apr 2026 16:29:27 +0000 (GMT)","from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1])\n\tby ppma22.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id\n 63OGKLYv032021;\n\tFri, 24 Apr 2026 16:29:26 GMT","from smtprelay03.wdc07v.mail.ibm.com ([172.16.1.70])\n\tby ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4dpjkybjad-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tFri, 24 Apr 2026 16:29:26 +0000 (GMT)","from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com\n [10.39.53.229])\n\tby smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 63OGSufB28377822\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n\tFri, 24 Apr 2026 16:28:56 GMT","from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 99CAF5805C;\n\tFri, 24 Apr 2026 16:29:22 +0000 (GMT)","from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 86A7058058;\n\tFri, 24 Apr 2026 16:29:20 +0000 (GMT)","from localhost.localdomain (unknown [9.67.24.140])\n\tby smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP;\n\tFri, 24 Apr 2026 16:29:20 +0000 (GMT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1777048179;\n\tcv=none;\n b=M0/Zhaqda1JX8Ecwi4zTUkpYiWcuN74YM83QInXNibRUaWfgOugKbdg99PwpXTqRPUr63TAGvbroI+DYuxRdGV5eRYrrC1i8zouP8cZ6U7cYIao94774RHlriiRVElbQdxlK4WgJUTCtNTHQATl6IBG7dSWX7P6iCsBka2Sq95xrlCpaxjHTOrs+QinAIGOO9oKEkqlNB7m5NW01tUjTl5eMbI82YgiZ9LYx+ww6lXu0zttTIRK3d60kGA0AV0wXXkU7AFBBH24EkKP/85gQs+Ge8KeBIBH8omIF64PpiJs+L4ZYDwHERU+VZynLpNHfyWiDtEtzRjYMJI+4htAhrA==","ARC-Message-Signature":"i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1777048179; c=relaxed/relaxed;\n\tbh=ckwhgSUaP7LH9m/h4L7W5HcS4Chg6ISwqU+JO7cotMo=;\n\th=From:To:Cc:Subject:Date:Message-Id:MIME-Version;\n b=Ec04SRzI6jnR1rjSAYjWKh1oOWwzHYzfsb2ViY7h77MKfXHSJRmpubE7/qcpoPdyFyrgVfkPH9QzFf6pxT5EaQa2GyNSJScd63NmkUkduVtu0nnEc1/4RVawUwrqH1TI3Pt1u5xTYjuvlO60zWBgxThEZqPWWzjrkZsdE2okfy+fG5X6gpN3Ko7Pt6FJthsFDiQD/vZhIQb6Ldp0JRtB51AyuliVOZGCxPlUKa1FJMikNyL7FkzQgQ9Mzd5tbUpqNYP+Kr08AJJK9m4h/4nejhR/CNIjOmTPVHpbi6vES4t0eopkvR5lImRFem4eLcPuB61U8msnh4BaWNceyuk6+w==","ARC-Authentication-Results":"i=1; lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com;\n dkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=ZMEyTdGE; dkim-atps=neutral;\n spf=pass (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com;\n envelope-from=mmc@linux.ibm.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=linux.ibm.com","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n\t:content-transfer-encoding:date:from:message-id:mime-version\n\t:subject:to; s=pp1; bh=ckwhgSUaP7LH9m/h4L7W5HcS4Chg6ISwqU+JO7cot\n\tMo=; b=ZMEyTdGExiivj2XALhSOiS3lnICOjFyO+ZrsLHKWvX3v+EYgYFlRXGiJp\n\tZIIIQLChwfEnbAHTUTsbOW32baOrQBSPebbqfbQRGT89/31fYZ1LN3JQccxt5zqo\n\tilsO+IPRZRqNw82T28peHBmDMRkLOIVY4HCj9lZD3gwdpemOIyGRNwfWpav54Ve2\n\tbXTVBVEd6JPrWtC0w0gsOgT6zSbf+h5gaUC6BQ6etyz4HJt3qVL8fmShx3ayNsDt\n\tjn2HM8+Wky5VGGUXcP07jzW08I9D61OjJYJXvSlqInULUd0+T6Fw7lR9LuUe28Xe\n\t76A+lwg4mc9yvaN2F2cNswy7IVoIQ==","From":"Mingming Cao <mmc@linux.ibm.com>","To":"netdev@vger.kernel.org","Cc":"davem@davemloft.net, kuba@kernel.org, edumazet@google.com,\n        pabeni@redhat.com, horms@kernel.org, bjking1@linux.ibm.com,\n        maddy@linux.ibm.com, mpe@ellerman.id.au,\n linuxppc-dev@lists.ozlabs.org,\n        stable@vger.kernel.org, Mingming Cao <mmc@linux.ibm.com>,\n        Shaik Abdulla <shaik.abdulla1@ibm.com>,\n        Naveed Ahmed <naveedaus@in.ibm.com>","Subject":"[PATCH v3] ibmveth: Disable GSO for packets with small MSS","Date":"Fri, 24 Apr 2026 09:29:17 -0700","Message-Id":"<20260424162917.65725-1-mmc@linux.ibm.com>","X-Mailer":"git-send-email 2.39.3 (Apple Git-146)","X-Mailing-List":"linuxppc-dev@lists.ozlabs.org","List-Id":"<linuxppc-dev.lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev+help@lists.ozlabs.org>","List-Owner":"<mailto:linuxppc-dev+owner@lists.ozlabs.org>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Archive":"<https://lore.kernel.org/linuxppc-dev/>,\n  <https://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Subscribe":"<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n  <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>","List-Unsubscribe":"<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>","Precedence":"list","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-TM-AS-GCONF":"00","X-Proofpoint-Reinject":"loops=2 maxloops=12","X-Proofpoint-GUID":"Ezjy5Ob4oUAQdfX0fVUxoRkGAaFCfE-r","X-Proofpoint-ORIG-GUID":"VHY8sa6bnoQIzbYQJcpzf9tct2Oza9zB","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDI0MDE1OCBTYWx0ZWRfX2UAHSO8Otbyd\n vFiSyn9IcJegoYyPSC7QQKDHdc5MawBeuaO1AjvEGHDrCGoZknvMKba6e+rgpJUIoBNttAmiJ4b\n AlUsVxHTV6Yk3BnmDAKF4WozMd3H+mobd1QQiEBMg/mN0pqQC3BAGxqOPpxRp2lFsLdcK2Si5+3\n fRnTR/OLSQPBYPv42546i6NQFQp8cI1bI9OL1jG410Hf1RlzncxdBD1UtXe9cbLnrsR+YchZYC+\n xDTkuDvad3DgWsA2yi0Jj6T56PmAiXaj1lSxohz9aarjJ1QnIDK9EkKnO0EiJ4bqRTQRxJH1POt\n ZfE0RmMeR8Q7vQaVStVqf8et8YpKL8sGn9Tg3OpiM+RXRdU17Ptzsvf/OglBGINwQoj7v/EiEO0\n lWt6W3Mx0UvcfUuJ/Wrvrfb+nnAMPpEmhXoGD34U50pJ+zzeqt+dOYAyyp/hBEb5Owh+DBgHeiP\n zRFvDuA0VGAEQ81Sxtg==","X-Authority-Analysis":"v=2.4 cv=SJxykuvH c=1 sm=1 tr=0 ts=69eb9a68 cx=c_pps\n a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=uAbxVGIbfxUO_5tXvNgY:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8\n a=pS6RR9H1IJa285FGuL8A:9","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-24_02,2026-04-21_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n priorityscore=1501 suspectscore=0 malwarescore=0 impostorscore=0 bulkscore=0\n lowpriorityscore=0 phishscore=0 clxscore=1015 adultscore=0 spamscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604240158","X-Spam-Status":"No, score=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,\n\tSPF_PASS autolearn=disabled version=4.0.1 OzLabs 8","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org"},"content":"Some physical adapters on Power systems do not support segmentation\noffload when the MSS is less than 224 bytes. Attempting to send such\npackets causes the adapter to freeze, stopping all traffic until\nmanually reset.\n\nImplement ndo_features_check to disable GSO for packets with small MSS\nvalues. The network stack will perform software segmentation instead.\n\nThe 224-byte minimum matches ibmvnic\ncommit <f10b09ef687f> (\"ibmvnic: Enforce stronger sanity checks\non GSO packets\")\nwhich uses the same physical adapters in SEA configurations.\n\nThe issue occurs specifically when the hardware attempts to perform\nsegmentation (gso_segs > 1) with a small MSS. Single-segment GSO packets\n(gso_segs == 1) do not trigger the problematic LSO code path and are\ntransmitted normally without segmentation.\n\nAdd an ndo_features_check callback to disable GSO when MSS < 224 bytes.\nAlso call vlan_features_check() to ensure proper handling of VLAN packets,\nparticularly QinQ (802.1ad) configurations where the hardware parser may\nnot support certain offload features.\n\nValidated using iptables to force small MSS values. Without the fix,\nthe adapter freezes. With the fix, packets are segmented in software\nand transmission succeeds. Comprehensive regression testing completedd \n(MSS tests, performance, stability).\n\nFixes: 8641dd85799f (\"ibmveth: Add support for TSO\")\nCc: stable@vger.kernel.org\nReviewed-by: Brian King <bjking1@linux.ibm.com>\nTested-by: Shaik Abdulla <shaik.abdulla1@ibm.com>\nTested-by: Naveed Ahmed <naveedaus@in.ibm.com>\nSigned-off-by: Mingming Cao <mmc@linux.ibm.com>\n---\nChanges in v3:\n- Call vlan_features_check() to handle VLAN packets correctly\n- Clarified that gso_segs == 1 check is not needed for ibmveth\n  (unlike ibmvnic, single-segment packets don't enter LSO path)\n- Updated commit message to explain the difference\n\nChanges in v2:\n- Add Fixes tag as requested by automated checks\n---\n drivers/net/ethernet/ibm/ibmveth.c | 22 ++++++++++++++++++++++\n drivers/net/ethernet/ibm/ibmveth.h |  1 +\n 2 files changed, 23 insertions(+)","diff":"diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c\nindex 58cc3147afe2..73e051d26b9d 100644\n--- a/drivers/net/ethernet/ibm/ibmveth.c\n+++ b/drivers/net/ethernet/ibm/ibmveth.c\n@@ -1756,6 +1756,27 @@ static int ibmveth_set_mac_addr(struct net_device *dev, void *p)\n \treturn 0;\n }\n \n+static netdev_features_t ibmveth_features_check(struct sk_buff *skb,\n+\t\t\t\t\t\tstruct net_device *dev,\n+\t\t\t\t\t\tnetdev_features_t features)\n+{\n+\t/* Some physical adapters do not support segmentation offload with\n+\t * MSS < 224. Disable GSO for such packets to avoid adapter freeze.\n+\t * Note: Single-segment packets (gso_segs == 1) don't need this check\n+\t * as they bypass the LSO path and are transmitted without segmentation.\n+\t */\n+\tif (skb_is_gso(skb)) {\n+\t\tif (skb_shinfo(skb)->gso_size < IBMVETH_MIN_LSO_MSS) {\n+\t\t\tnetdev_warn_once(dev,\n+\t\t\t\t\t \"MSS %u too small for LSO, disabling GSO\\n\",\n+\t\t\t\t\t skb_shinfo(skb)->gso_size);\n+\t\t\tfeatures &= ~NETIF_F_GSO_MASK;\n+\t\t}\n+\t}\n+\n+\treturn vlan_features_check(skb, features);\n+}\n+\n static const struct net_device_ops ibmveth_netdev_ops = {\n \t.ndo_open\t\t= ibmveth_open,\n \t.ndo_stop\t\t= ibmveth_close,\n@@ -1767,6 +1788,7 @@ static const struct net_device_ops ibmveth_netdev_ops = {\n \t.ndo_set_features\t= ibmveth_set_features,\n \t.ndo_validate_addr\t= eth_validate_addr,\n \t.ndo_set_mac_address    = ibmveth_set_mac_addr,\n+\t.ndo_features_check\t= ibmveth_features_check,\n #ifdef CONFIG_NET_POLL_CONTROLLER\n \t.ndo_poll_controller\t= ibmveth_poll_controller,\n #endif\ndiff --git a/drivers/net/ethernet/ibm/ibmveth.h b/drivers/net/ethernet/ibm/ibmveth.h\nindex 068f99df133e..d87713668ed3 100644\n--- a/drivers/net/ethernet/ibm/ibmveth.h\n+++ b/drivers/net/ethernet/ibm/ibmveth.h\n@@ -37,6 +37,7 @@\n #define IBMVETH_ILLAN_IPV4_TCP_CSUM\t\t0x0000000000000002UL\n #define IBMVETH_ILLAN_ACTIVE_TRUNK\t\t0x0000000000000001UL\n \n+#define IBMVETH_MIN_LSO_MSS\t\t224\t/* Minimum MSS for LSO */\n /* hcall macros */\n #define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \\\n   plpar_hcall_norets(H_REGISTER_LOGICAL_LAN, ua, buflst, rxq, fltlst, mac)\n","prefixes":["v3"]}