From nobody Fri Oct 2 07:45:22 2026 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5A4E34EF1F for ; Mon, 3 Aug 2026 22:22:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785795740; cv=none; b=u8mOON8Yn4xP2sFZTFRKM2UgS/Vxws9gr/Kp5GlN47eDw656YFZftxtpQ+Xl6ZrP9m9O8LMvkXuQTRGzFFY/YF+J53aQ67T0qXL3PWdG5UqMAm0Hhcf8bufg2KdOd2CH9t/uxx+GnFFUVXZ7AP3fuowGUxTpCiZ7h2MYBUKTg2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785795740; c=relaxed/simple; bh=2mtwsZnBWcBamwUChkhFW4fWi6Ue37VU5u6ER8FoQBg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E7vPKuixzTTLR/hz21kjChr5Rq80g1rJk5C4xx//2aXplZApI7Z6lwtmjmXVp/r0plhnphuS7+ZBGmtNLn5wX6MGDHhc0TZpabJXkmPYB4mFii25Soe+8x4R8iuvD05jOVhTZ/x0YfvT6toqTWx+UXQKsVz78G0F1xOTJAGZnCo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IWnMUF/d; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IWnMUF/d" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-47fe45db360so156553f8f.2 for ; Mon, 03 Aug 2026 15:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785795736; x=1786400536; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gefTegpE8rsUQOeWJ5th3V/xI+OSspzBtM2w9vJy2Dk=; b=IWnMUF/dxetL/VdopkUV89QqxPxuJy6k+wcT3I47LCI0DiBgMxdQoU6JwSeEx4VfJv G2fGlwXSKPFxgMAkmtmz0RxfnQXb2lOQ/3MTrszKfiSn3+BjshfONxjKIyBqyscQ2s7o 9DSO8QLJfwRxkUjKo39TuxmBEdUVU3SZnJe1GcczPV2jm7+fRdg98UGXk3ARGBjujvaR HlMNQ3rhakrO+Kc5XBotj63KAn1NS1tT048XVQCsZ2GHlDN2M5IXKzjP/qS0EqYK+cJh m7GZwDdOm+R0lvHiuOhAZp5f4Gn+b2TdT+BGRFKmukGGHDYcHWcrY1wO0O9+N0Ss+6jL ewog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785795736; x=1786400536; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=gefTegpE8rsUQOeWJ5th3V/xI+OSspzBtM2w9vJy2Dk=; b=NH8W5iVan6U1DE6xbs3kzJFJ3Yknbet+UfEqnGgpzDj5tGe3P5+X+hjJuflpL9GyzD eswyxuabuxbGLMuIYg8OSxPBtbKSay0wzJ/liNw+oAoKjgdJ6qnqOFFu283tAVxyqXFI tAyrmfdsfT6qKp2HQZyIA9Frn3APfhGdmACLfo7fEw6xrjSnO13Gej6BYmdLSXYgRlHY yL3zvDElqh83rC323qU7zjAcyM+jhf83gs4jPvkFsmy1DdGWvdoGrrA6aZI8vpn+hpFQ +s5XygymXcCd+8KuXQL7EvDPxHZZEsUXYIYxDCf+qFIamiyMtpTAA9CQHd8PjpuHfiDi RK6A== X-Forwarded-Encrypted: i=1; AHgh+RrARb30viraP1KDXZF0ze48R2NU8S4IheoLQtkn+jE6tnOtdBWbf7dWqWhIyDEFOWIe1HbcvapE6Avxw/g=@vger.kernel.org X-Gm-Message-State: AOJu0YxFWc5PMBK8NqTUHRlWORwJkN22afEiR5Ip3ldxcUB7ZpjsoTGF /ZB0HoqyDN8qbYUG4Hrokzsb1clZjnW8qrpJBsbav4yjKCFNaq01uxG5 X-Gm-Gg: AR+sD10FwadGUQa68yLJwZK53/az1054S1BEblgmey4ZMUrg+D2E4zlQPtCvOTo1NJe HZIYm4+wjoSEO1s2oHOMAViRRbgShlp/6T/0Z3fDczdWel48y4HbEIHK76m9u+z4ql7nTKDTf/j haMgr0m2QisvYYFEcZ612ecu7sy//gUVKLaT080HWHlcY4BOXgnIqoUXvCzPDXOSyCRRm+mi1pJ GxJ9/0ji9wsNKo9hTiea5xagAez48NF+th9irzMZOJMr8opG4WAne7iwN2ZXICQ1+dV9gdx+Shy UTbSiIjtUUUpTIyg0lK6pU5teM1VKalxi2w4eKOhKJ4e+bbt7KnXPOZLnIglrOmnDzivquCwEMt GzKKgzZZ3of95HpZIlpFLdPHlkfbRwSSD1bOdsGEvBn7PFwqZ1CYpI+13hoVeX6kcOc6E64KRB2 UkWjysAEkZ1nqHhTFaOhwYdEQYALQRLcb4nBikqZ5LFbUcLfeT+eP+0YIg1IAQn40WmHyY51up7 tm5hGpTP683BwTSD/AGYhsd0fi946RYfPrEFsJgph/+lFfP7krTJLxvSEbVK6N8fw1zkcKcLOWb hKTf/gpNpmiFkGY+teI= X-Received: by 2002:a05:600c:1c21:b0:496:c249:ddb1 with SMTP id 5b1f17b1804b1-4980c694674mr131501185e9.4.1785795736026; Mon, 03 Aug 2026 15:22:16 -0700 (PDT) Received: from L-022584.energy.envision.com (dynamic-077-012-149-099.77.12.pool.telefonica.de. [77.12.149.99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49949fc2da2sm31668145e9.3.2026.08.03.15.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 15:22:15 -0700 (PDT) From: Xin Xie To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, andrew+netdev@lunn.ch, shuah@kernel.org, kees@kernel.org, petr.wozniak@gmail.com, qingfang.deng@linux.dev, fmaurer@redhat.com, luka.gejak@linux.dev, bigeasy@linutronix.de, xiaoliang.yang_1@nxp.com, skhawaja@google.com, stable@vger.kernel.org, sdf.kernel@gmail.com, Xin Xie , Ali Ahmet Memis Subject: [PATCH net v4 1/4] net: hsr: fix packet drops caused by GRO superpackets Date: Tue, 4 Aug 2026 00:22:08 +0200 Message-ID: <20260803222211.877-2-xiexinet@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260803222211.877-1-xiexinet@gmail.com> References: <20260803222211.877-1-xiexinet@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" HSR/PRP append a 6-byte tag/RCT to every forwarded frame and process each frame individually (sequence numbering, duplicate discard). When a lower device aggregates received frames into a GRO super-packet -- in software, or in hardware on GRO_HW-capable NICs -- the HSR receive/forward path sees a single skb instead of the individual frames. Depending on the lower device, that super-skb is then either rejected outright (for example when it exceeds the lower MTU at egress), or forwarded without valid per-wire-frame HSR/PRP processing: its single trailing tag/RCT cannot represent the per-frame trailers and sequence numbers of the aggregated frames. On memory-constrained devices, processing super-skbs in softirq context can also pressure atomic memory allocation. The HSR/PRP stack already disables LRO on enslaved devices for the same reason. Extend that treatment to GRO: add netif_disable_gro() and dev_disable_gro() mirroring netif_disable_lro()/dev_disable_lro(), and call dev_disable_gro() from hsr_portdev_setup() so enslavement to an HSR/PRP master automatically strips NETIF_F_GRO and NETIF_F_GRO_HW on the lower device (recursively on its own lowers, as with LRO). This is a setup-time default, not an immutable feature policy: a later privileged feature override, or a lower newly attached below a stacked slave, can re-enable GRO without re-walking the HSR enslavement path. Patch 3 is the fail-safe for that case: a GSO skb that nevertheless reaches the forward entry is segmented on the plain master/interlink paths or rejected on the LAN/tagged paths, so invalid aggregates are never forwarded as-is -- though a later override can still cost traffic on a LAN ingress. Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamle= ss Redundancy protocol (HSRv0)") Cc: stable@vger.kernel.org Reviewed-by: Ali Ahmet Memis Tested-by: Ali Ahmet Memis Signed-off-by: Xin Xie --- include/linux/netdevice.h | 2 ++ net/core/dev.c | 18 ++++++++++++++++++ net/core/dev_api.c | 16 ++++++++++++++++ net/hsr/hsr_slave.c | 1 + 4 files changed, 37 insertions(+) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9981d637f8b5..eba2c26a49ba 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3434,6 +3434,8 @@ void dev_close(struct net_device *dev); void netif_close_many(struct list_head *head, bool unlink); void netif_disable_lro(struct net_device *dev); void dev_disable_lro(struct net_device *dev); +void netif_disable_gro(struct net_device *dev); +void dev_disable_gro(struct net_device *dev); int dev_loopback_xmit(struct net *net, struct sock *sk, struct sk_buff *ne= wskb); u16 dev_pick_tx_zero(struct net_device *dev, struct sk_buff *skb, struct net_device *sb_dev); diff --git a/net/core/dev.c b/net/core/dev.c index 5933c5dab09e..a6cf2adc8625 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1840,6 +1840,24 @@ void netif_disable_lro(struct net_device *dev) } } =20 +void netif_disable_gro(struct net_device *dev) +{ + struct net_device *lower_dev; + struct list_head *iter; + + dev->wanted_features &=3D ~(NETIF_F_GRO | NETIF_F_GRO_HW); + netdev_update_features(dev); + + if (unlikely(dev->features & (NETIF_F_GRO | NETIF_F_GRO_HW))) + netdev_WARN(dev, "failed to disable GRO!\n"); + + netdev_for_each_lower_dev(dev, lower_dev, iter) { + netdev_lock_ops(lower_dev); + netif_disable_gro(lower_dev); + netdev_unlock_ops(lower_dev); + } +} + /** * dev_disable_gro_hw - disable HW Generic Receive Offload on a device * @dev: device diff --git a/net/core/dev_api.c b/net/core/dev_api.c index 437947dd08ed..02fb21629512 100644 --- a/net/core/dev_api.c +++ b/net/core/dev_api.c @@ -269,6 +269,22 @@ void dev_disable_lro(struct net_device *dev) } EXPORT_SYMBOL(dev_disable_lro); =20 +/** + * dev_disable_gro() - disable Generic Receive Offload on a device + * @dev: device + * + * Disable Generic Receive Offload (GRO) on a net device. Must be + * called under RTNL. This is needed if received packets may be + * forwarded to another interface. + */ +void dev_disable_gro(struct net_device *dev) +{ + netdev_lock_ops(dev); + netif_disable_gro(dev); + netdev_unlock_ops(dev); +} +EXPORT_SYMBOL(dev_disable_gro); + /** * dev_set_promiscuity() - update promiscuity count on a device * @dev: device diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c index 01c73b4b50dd..da06b21cdf51 100644 --- a/net/hsr/hsr_slave.c +++ b/net/hsr/hsr_slave.c @@ -170,6 +170,7 @@ static int hsr_portdev_setup(struct hsr_priv *hsr, stru= ct net_device *dev, if (res) goto fail_rx_handler; dev_disable_lro(dev); + dev_disable_gro(dev); =20 return 0; =20 --=20 2.43.0 From nobody Fri Oct 2 07:45:22 2026 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C74F34A3D6 for ; Mon, 3 Aug 2026 22:22:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785795743; cv=none; b=MDaIFpFh11D1fLWN+t0rW4bnn0ya87ZFf6uVfaQhzAy2sWP/+QoT0mvqqqD6WdjFr2fHSD+O0T1Qg4gDpf3vVlzVMlmYDXsYONlhPoBHuBqWaZxGIoT3HdA1RqrjNCXotCg4l7pzSubkBG8h+/3kxjf/xwjFUbUhmWTqSqWJrak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785795743; c=relaxed/simple; bh=sVFYWZ1XuiPfDGKWFK/5tqL6S6klCUn61832Ns2knso=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dZvEG/MN/noo7RJ4PlouSnUSbtSLVTDTt5Lgk+M0CvpM6VGBnU62RSjS8O6CpiKdfWeUP4Blyi0+hwSJM3+jDQWYrELsp7naYngv1DwbAFhWx/1DYjKY3dCjNcB6G7ao1GThSDOlNuR33Wf9CIAzvzlPYIV4FFGL7zidHXvYEiA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=m5XTmZzZ; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m5XTmZzZ" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-47f706438c3so234575f8f.3 for ; Mon, 03 Aug 2026 15:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785795737; x=1786400537; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MuOCmk+tuRMcAT8nRuni6ulgAlSHsEr+xAYylNAkCZU=; b=m5XTmZzZxque3/iyX9eLA+46q/KbHptK7y4uxqg+DUchTStWBHnkcOjfcytGFEYbhg PRgbv8NZi4RKZF2XafOBoUS9zywVodEYOyhHWmHnc5xETwr8WJ+NMRSEvtgZOFyIGiM4 2+hyxgt9ihjyM7TG/Q1ygLcjsoki/qyn7W5B+p252U9RZDC4nLV83b/Km6Me+/Vg1CsZ 0bwdaErieH8uqopCQ6+PQMRWBGayv51UKxP0CPcd7sswy86UzeqYEKX8Fqnly7e9VQJU GQc6v5TM73EUi8EuW6UGSrhr5ouf5zIF42k1+NRVoOUh2Y2xWc96Bl+ju6fhYVMglH0X gbeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785795737; x=1786400537; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=MuOCmk+tuRMcAT8nRuni6ulgAlSHsEr+xAYylNAkCZU=; b=lxCVZ6YcXH/1GrCbIgVB8z9R53jh6b2eCsF+em8tR8hUtc5vCBe/vcpmy5ZWj1dki0 hSpRUIyK4UtXsGpSjaHD+8balE6ImXzSI2qmBGaXAIG2Te7FCu+ZR1oDEKb9a2ySlsYf EZvnjpbEHS6IxG+G7ePqbdNQrUV9NmBl3wPwGCGmSF1jPi8s4Vg2xgMGrxWFrr0KSn/9 4PaAMvy5PXsu/cKkEJAPxUvDlikh7HxTuohW53TJst1MY+5riiGUeuZ5mKk1fOfh+/t1 nCZYUPVncgpNP12p4ES6QC4SUArjs31WecOe8r0u6ZzQ6JAZPqCnETO6quUZv7bdBuiC pwDQ== X-Forwarded-Encrypted: i=1; AHgh+RqjGLJWUt9pHYfk8mwaA4eT10Sfx1jOhFq5yQHTqsGBdtSLRzla5LyUdNLGnyByUX+Cm0qbOumC3YtrSgY=@vger.kernel.org X-Gm-Message-State: AOJu0Yws3cfapkUAZT5z4+q6533SyyHs+5CEJB6WooUy07WvXNQ1QhSe +JuEksiu/gS6w6nyk8iaMbw8Ml3yJsofbXiuC+v7O7aSjBaxdNWUeDc4 X-Gm-Gg: AR+sD10RDOF6m0fuy5HfMb9OQhgGnFHX8tN53uLEzR1VIMbyvNPIoCkir9niMsbS7Ze qzgjv/avWWt/NPNvNJ5QhYWLepm7uzCz+OT//JqhwmIFWiEYv7/Emrs6ibJyH1OlBAUe0YWyXDO lm4hm8TjgRO5vnrc2UMW5pAxM3dtwlfaGxemjVeEuJlAhUYJyDIpwtFVqKHbAAezV4awbbDsEOh H/TbcXX5xq/oNfVJ/JWQv+8BsxmLV9/ROWjAgP3KwzYZdCSi0T335SvOcOnUjPWwOOjCBa7PDNh g6ZaewR3wzFbWzYDrwx98+PZbWteueW3K7Y8PdA0RpZ/3RV+JVvAqZakz6uAKbPWWN4m6hwbwMD 1SdrDCbeOnttD7CvsxUMeQtWDwO8pYawiUNw5qHThzKmjA+kEtPWa3oO8+tG1ZaibILI2fPTS3z YkMYlASOJvLY+kU/wyBTw0+ZRAfpj/900jpcI6wtw2WR6PnlYJokO6KtG8/xQT+Qt37JtqN8IUP I/kWf2+9mdZPeWGZAvfiVIN5b0FtYFSezFJuBrR+n8D7GlvGPOtCI9/IPDlxtL3hFTJs1k6h9jQ ZJlOMJXe82qEL4p3UeY= X-Received: by 2002:a05:600c:1d0a:b0:492:7082:92e9 with SMTP id 5b1f17b1804b1-4980c5ec794mr147276605e9.0.1785795737182; Mon, 03 Aug 2026 15:22:17 -0700 (PDT) Received: from L-022584.energy.envision.com (dynamic-077-012-149-099.77.12.pool.telefonica.de. [77.12.149.99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49949fc2da2sm31668145e9.3.2026.08.03.15.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 15:22:16 -0700 (PDT) From: Xin Xie To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, andrew+netdev@lunn.ch, shuah@kernel.org, kees@kernel.org, petr.wozniak@gmail.com, qingfang.deng@linux.dev, fmaurer@redhat.com, luka.gejak@linux.dev, bigeasy@linutronix.de, xiaoliang.yang_1@nxp.com, skhawaja@google.com, stable@vger.kernel.org, sdf.kernel@gmail.com, Xin Xie Subject: [PATCH net v4 2/4] net: hsr: shrink seqnr_lock to sequence counter updates Date: Tue, 4 Aug 2026 00:22:09 +0200 Message-ID: <20260803222211.877-3-xiexinet@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260803222211.877-1-xiexinet@gmail.com> References: <20260803222211.877-1-xiexinet@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" hsr->seqnr_lock is currently held across entire hsr_forward_skb() calls: master TX (hsr_dev_xmit()), interlink RX (hsr_handle_frame()), and both supervision frame builders hold it while frames are built, classified, duplicated and forwarded on every port. The only state that actually needs the lock is the sequence counters themselves (hsr->sequence_nr / hsr->sup_sequence_nr). Shrink the locking to the individual counter updates: handle_std_frame() now takes the lock around its sequence number allocation (replacing the lockdep assertion), the master TX and interlink RX paths drop their outer lock, and the supervision builders release the lock right after updating their counter instead of holding it across frame construction and forwarding. Statistics: the outer seqnr_lock also incidentally serialized the tx_packets/tx_bytes/tx_dropped updates in hsr_forward_skb(), which are reachable from the concurrently callable master-TX, supervision and interlink-RX paths. Those updates now use DEV_STATS_INC()/ DEV_STATS_ADD(), the atomic legacy-stat helpers, so narrowing the lock does not turn them into lossy plain read-modify-writes. Ordering: with IFF_NO_QUEUE and dev->lltx, hsr_dev_xmit() is concurrently callable, and this change removes the old allocation-through-forward ordering guarantee there: master-TX frames may now be emitted out of sequence-allocation order. On the current tree this is safe because duplicate discard tracks individual sequence numbers in sparse bitmaps (commit aae9d6b616b5 ("hsr: Implement more robust duplicate discard for HSR") and commit 415e6367512b ("hsr: Implement more robust duplicate discard for PRP")) rather than requiring monotonic arrival. Sequence numbers remain unique and monotonically allocated per counter. This is a latency/critical-section prerequisite for unfolding GSO super-packets at the forward entry (not a functional prerequisite): the segmentation work should not extend the global sequence lock's critical section. Patch 3 depends on this change; their automatic stable selection is limited to 7.0 and newer, where sparse-bitmap duplicate discard accepts out-of-order arrival. Older stable branches require an adapted backport. History of the lock being narrowed: it was introduced by commit 06afd2c31d33 ("hsr: Synchronize sending frames to have always incremented outgoing seq nr.") and briefly removed by commit b3c9e65eb227 ("net: hsr: remove seqnr_lock") in net. Merge commit 46ae4d0a4897 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/n= etdev/net") reverted that removal because commit 430d67bdcb04 ("net: hsr: Use the seqnr lock for frames received via interlink port.") in net-next had already superseded it by adding locking for the interlink RX path. All sequence counter updates remain protected; only the forwarding work moves out of the critical section. Cc: # 7.0.x Signed-off-by: Xin Xie Reported-by: syzbot+fbf74291c3b7e753b481@syzkaller.appspotmail.com --- net/hsr/hsr_device.c | 15 ++++----------- net/hsr/hsr_forward.c | 9 +++++---- net/hsr/hsr_slave.c | 11 +---------- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index 5555b71ab19b..3fd1762d8916 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -232,9 +232,7 @@ static netdev_tx_t hsr_dev_xmit(struct sk_buff *skb, st= ruct net_device *dev) skb->dev =3D master->dev; skb_reset_mac_header(skb); skb_reset_mac_len(skb); - spin_lock_bh(&hsr->seqnr_lock); hsr_forward_skb(skb, master); - spin_unlock_bh(&hsr->seqnr_lock); } else { dev_core_stats_tx_dropped_inc(dev); dev_kfree_skb_any(skb); @@ -335,6 +333,7 @@ static void send_hsr_supervision_frame(struct hsr_port = *port, hsr_stag->sequence_nr =3D htons(hsr->sequence_nr); hsr->sequence_nr++; } + spin_unlock_bh(&hsr->seqnr_lock); =20 hsr_stag->tlv.HSR_TLV_type =3D type; /* HSRv0 has 6 unused bytes after the MAC */ @@ -356,14 +355,10 @@ static void send_hsr_supervision_frame(struct hsr_por= t *port, ether_addr_copy(hsr_sp->macaddress_A, hsr->macaddress_redbox); } =20 - if (skb_put_padto(skb, ETH_ZLEN)) { - spin_unlock_bh(&hsr->seqnr_lock); + if (skb_put_padto(skb, ETH_ZLEN)) return; - } =20 hsr_forward_skb(skb, port); - spin_unlock_bh(&hsr->seqnr_lock); - return; } =20 static void send_prp_supervision_frame(struct hsr_port *master, @@ -390,6 +385,7 @@ static void send_prp_supervision_frame(struct hsr_port = *master, spin_lock_bh(&hsr->seqnr_lock); hsr_stag->sequence_nr =3D htons(hsr->sup_sequence_nr); hsr->sup_sequence_nr++; + spin_unlock_bh(&hsr->seqnr_lock); hsr_stag->tlv.HSR_TLV_type =3D PRP_TLV_LIFE_CHECK_DD; hsr_stag->tlv.HSR_TLV_length =3D sizeof(struct hsr_sup_payload); =20 @@ -397,13 +393,10 @@ static void send_prp_supervision_frame(struct hsr_por= t *master, hsr_sp =3D skb_put(skb, sizeof(struct hsr_sup_payload)); ether_addr_copy(hsr_sp->macaddress_A, master->dev->dev_addr); =20 - if (skb_put_padto(skb, ETH_ZLEN)) { - spin_unlock_bh(&hsr->seqnr_lock); + if (skb_put_padto(skb, ETH_ZLEN)) return; - } =20 hsr_forward_skb(skb, master); - spin_unlock_bh(&hsr->seqnr_lock); } =20 /* Announce (supervision frame) timer function diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c index 0774981a65c1..87cd72a1dc65 100644 --- a/net/hsr/hsr_forward.c +++ b/net/hsr/hsr_forward.c @@ -621,9 +621,10 @@ static void handle_std_frame(struct sk_buff *skb, if (port->type =3D=3D HSR_PT_MASTER || port->type =3D=3D HSR_PT_INTERLINK) { /* Sequence nr for the master/interlink node */ - lockdep_assert_held(&hsr->seqnr_lock); + spin_lock_bh(&hsr->seqnr_lock); frame->sequence_nr =3D hsr->sequence_nr; hsr->sequence_nr++; + spin_unlock_bh(&hsr->seqnr_lock); } } =20 @@ -746,8 +747,8 @@ void hsr_forward_skb(struct sk_buff *skb, struct hsr_po= rt *port) * So check and increment stats for master port only here. */ if (port->type =3D=3D HSR_PT_MASTER || port->type =3D=3D HSR_PT_INTERLINK= ) { - port->dev->stats.tx_packets++; - port->dev->stats.tx_bytes +=3D skb->len; + DEV_STATS_INC(port->dev, tx_packets); + DEV_STATS_ADD(port->dev, tx_bytes, skb->len); } =20 kfree_skb(frame.skb_hsr); @@ -757,6 +758,6 @@ void hsr_forward_skb(struct sk_buff *skb, struct hsr_po= rt *port) =20 out_drop: rcu_read_unlock(); - port->dev->stats.tx_dropped++; + DEV_STATS_INC(port->dev, tx_dropped); kfree_skb(skb); } diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c index da06b21cdf51..0ca55d9323c5 100644 --- a/net/hsr/hsr_slave.c +++ b/net/hsr/hsr_slave.c @@ -73,16 +73,7 @@ static rx_handler_result_t hsr_handle_frame(struct sk_bu= ff **pskb) } skb_reset_mac_len(skb); =20 - /* Only the frames received over the interlink port will assign a - * sequence number and require synchronisation vs other sender. - */ - if (port->type =3D=3D HSR_PT_INTERLINK) { - spin_lock_bh(&hsr->seqnr_lock); - hsr_forward_skb(skb, port); - spin_unlock_bh(&hsr->seqnr_lock); - } else { - hsr_forward_skb(skb, port); - } + hsr_forward_skb(skb, port); =20 finish_consume: return RX_HANDLER_CONSUMED; --=20 2.43.0 From nobody Fri Oct 2 07:45:22 2026 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CAFA3515EE for ; Mon, 3 Aug 2026 22:22:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785795747; cv=none; b=HYJt+jE4OCUKidKjjTrCVB5ayevOSbjx1B1pLL6tuvqS82sZ69Iv89PtMb4QvI+2qPphKYxn79DzHB/DcSxo77jerYq5e5yyJfLkYrHs5fGTr9TlE5U5xpt4Wkx7YGwPgJgCZ5QPFeuEJSbWs7QvIeN62/TGC/hCpJm3tzGnFZA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785795747; c=relaxed/simple; bh=KOrzoFMc/M42D9OEiprV8gaUX5Hexkl9nZf5de3PolE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=vFPAtRb6ofeniZ8IkLl4VY26B8fVG2O3yWGLVCZXViAzssCy+PuevG6L2SxDO1eZu2FAmlz3tKSYxBR+J8Rk3LMb37uFA+7ck7IsKoQeeR7ckV73IwAeSsi2mhUU4p+VrLwdZudRcaWuZdUxoR1KfV83ryAatdcYWL0Kz0x4TDk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mGx0s4UG; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mGx0s4UG" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-495773ee3edso2590145e9.3 for ; Mon, 03 Aug 2026 15:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785795740; x=1786400540; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=taQYtKaGJ1AUPlJREC2nCfE3DkYRBYSu2aGQCYa2qxg=; b=mGx0s4UG2X6cR0A4l6cFeUXoZWdWeh0eQJJfnpicRiGw7zkq72mpaEnUD/DkcZFPzN hPM3udOD14VS4VQkfE3s3P0kKhlwAGKaUg3oIIYTJtC+kFrIo007cqTLuT7nqNY90rEn e1fg5xZxsUe9woTzb7OkvEXvFe5vFZWZTUGx20Y/RZOI1k9oU0NHIe4bR2coJP1buawI vaE6dsH6CwYxfJjJUUsFmJtTYX63IzLiJpSXfQVKmshd950fmZpJmopIfYAdjYWW+O43 3Cpo5ZBlwHJHwwI4jCG7yuwA8ItSP/vjrSivKlFykkPKYD3pZdWoBVZTmBHCR4r4JYU2 8gjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785795740; x=1786400540; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=taQYtKaGJ1AUPlJREC2nCfE3DkYRBYSu2aGQCYa2qxg=; b=cG7t5FJdb2btVaQiR3RPNx+qXLmel4fpSOc7KmRgV3VlwgQYSjBRqv8an0uUGMhui2 iS/O4SiKl8/9e2TnRUgl24lKFhCA8WYEOs2cjzgWlPUhPmE0ZK3eBcJnZVjN5nZLGOuA P2T4dcVEaSrWce5EAdqI3jBpd1U1yjgPmBd91RZOiOKZNmR/2merBYP1tePT0Q+4pUXM owXwyJxIAk4XOEwMNk65pJCrk+VwWqFEG6D8ZQe8pExRoExvXPzwlXwdEO8M5gNAeEl1 vbYCQ+e8+gJmn0nluVvK5L4h2vj1AjbGVDBkb8wQk1opMrZrk7PG3lRI8vwfB47viGcK VGIg== X-Forwarded-Encrypted: i=1; AHgh+RqjAY0yZuM/7dH++ocWJVVWy5sSL5GCeUE8hsMOtqqcjFgEOtOSjBgClv1DJuM6YrvA7wp4gW81gKxzPRY=@vger.kernel.org X-Gm-Message-State: AOJu0YzKWE9NMyfS//QJo07lXehi/0pGNDzmgJqMvCcLgWL+ZBq5YbkP 0hqYc3GHmdcl/3XDJ5eRHuzTYPUBQETRzEjvAQPnPWdfAtm6UX2tJ0C5 X-Gm-Gg: AR+sD10ogI1//5lr9lt3l3u5pZ1OpiCFJjOA5Neb/ILWfzr8nbe8DXg/z9mPyzld15t 66IKntoq0WlkifvI395WBT4R+WppwolJrkeDmj8K9PQT4Hi6h+y66HviDi7591eAPFhG3+eNZVJ f43AZVG0AG82pFjSEOtAwzkpGNVXt7SZYaASf21rC843fFUwzBZ0HCf9/h2PSpgxCI4w9V9BKnZ wI7yrN4IO7PDt1UOfHbFuBWHJVjY7tKCAYmRjN7hwz2nbv3cjwUf0/UDfhcIG2lEsSP9UaM6ZAV a9oEczBHewYFYlC/aobUsGUGV8/kfciJJ848KaEAdnFZe3CODkrYvAIN/rUDAkKWx8O6yXt2nRZ FYAT+o1MlCKqbe8JQNPScNkli+HJBKhURYlWiFNK6yZbJColpHMh8IC3b6kdhOxBlm/tIrPWXFH nAGHrVl196W64tiztUnGua++hzqvK8sf4B9zBqjqO6j0w5JVLlj5vicYZ0+Dp7k6lb5lLSk1XDz mczKmLuIXHDZw4lPrgwfT0tO26KCSOg+uczSuKURtsrFEKB/86IOkncsPQsL6HFG2kToLjShckS aw7n9/cXFYEUdbuJNcf1+siv5IuHLA== X-Received: by 2002:a05:600c:a01:b0:493:bea7:6b67 with SMTP id 5b1f17b1804b1-4980c6a1082mr130474085e9.3.1785795739723; Mon, 03 Aug 2026 15:22:19 -0700 (PDT) Received: from L-022584.energy.envision.com (dynamic-077-012-149-099.77.12.pool.telefonica.de. [77.12.149.99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49949fc2da2sm31668145e9.3.2026.08.03.15.22.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 15:22:18 -0700 (PDT) From: Xin Xie To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, andrew+netdev@lunn.ch, shuah@kernel.org, kees@kernel.org, petr.wozniak@gmail.com, qingfang.deng@linux.dev, fmaurer@redhat.com, luka.gejak@linux.dev, bigeasy@linutronix.de, xiaoliang.yang_1@nxp.com, skhawaja@google.com, stable@vger.kernel.org, sdf.kernel@gmail.com, Xin Xie Subject: [PATCH net v4 3/4] net: hsr: unfold GSO super-packets at the forward entry Date: Tue, 4 Aug 2026 00:22:10 +0200 Message-ID: <20260803222211.877-4-xiexinet@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260803222211.877-1-xiexinet@gmail.com> References: <20260803222211.877-1-xiexinet@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" HSR/PRP forward frames one by one: each wire frame gets its own tag and sequence number, and duplicate discard is per frame. A GSO super-packet reaching hsr_forward_skb() breaks that per-frame semantics: it would be tagged and forwarded as a single frame. Unfold such super-packets at the forward entry with the top-level GSO dispatch: __skb_gso_segment() initializes SKB_GSO_CB() and performs the L2->L3->L4 protocol dispatch (calling the low-level skb_segment() helper directly is not allowed here -- it reads SKB_GSO_CB(skb) state that only __skb_gso_segment() sets up). features =3D 0 requests full software segmentation; tx_path is selected by ingress port (master =3D locally generated TX, interlink =3D RX) to get the right checksum semantics. Each segment then runs through the existing per-frame path, which is split out as hsr_forward_skb_one() so that no GSO skb can reach it. Segmentation is only offered for the ingress roles whose frames are known to be plain Ethernet: the master (locally generated) and the interlink (SAN side, untagged). A super-packet received from a LAN slave may carry per-frame HSR tags or PRP RCT trailers that software segmentation cannot recover, and an already-tagged HSR/PRP super-packet violates per-frame wire semantics; both are rejected by ingress-port policy. (ETH_P_PRP identifies supervision traffic only; a PRP data frame keeps its payload EtherType, so RCT carriage cannot be tested by protocol.) Also drop NETIF_F_GSO_MASK from the HSR master's hw_features so locally generated traffic is segmented before reaching the forward path whenever possible. Patch 2 (seqnr_lock shrink) is a latency/critical-section prerequisite for this change; their automatic stable selection is limited to 7.0 and newer. Older stable branches require an adapted backport. The GSO-drop accounting uses the same atomic legacy-stat helper because the forwarding entry is concurrently callable. Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamle= ss Redundancy protocol (HSRv0)") Cc: # 7.0.x Signed-off-by: Xin Xie --- net/hsr/hsr_device.c | 2 +- net/hsr/hsr_forward.c | 50 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index 3fd1762d8916..248cbb142e21 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -652,7 +652,7 @@ void hsr_dev_setup(struct net_device *dev) dev->needs_free_netdev =3D true; =20 dev->hw_features =3D NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | - NETIF_F_GSO_MASK | NETIF_F_HW_CSUM | + NETIF_F_HW_CSUM | NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_FILTER; =20 diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c index 87cd72a1dc65..b1b75a25a01a 100644 --- a/net/hsr/hsr_forward.c +++ b/net/hsr/hsr_forward.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "hsr_main.h" #include "hsr_framereg.h" =20 @@ -732,7 +733,7 @@ static int fill_frame_info(struct hsr_frame_info *frame, } =20 /* Must be called holding rcu read lock (because of the port parameter) */ -void hsr_forward_skb(struct sk_buff *skb, struct hsr_port *port) +static void hsr_forward_skb_one(struct sk_buff *skb, struct hsr_port *port) { struct hsr_frame_info frame; =20 @@ -761,3 +762,50 @@ void hsr_forward_skb(struct sk_buff *skb, struct hsr_p= ort *port) DEV_STATS_INC(port->dev, tx_dropped); kfree_skb(skb); } + +/* GSO fan-out funnel: unfold super-packets before per-frame processing so + * each wire frame gets its own HSR/PRP tag and sequence number. + */ +void hsr_forward_skb(struct sk_buff *skb, struct hsr_port *port) +{ + struct sk_buff *segs, *next; + + if (likely(!skb_is_gso(skb))) { + hsr_forward_skb_one(skb, port); + return; + } + + /* Unfold only plain-Ethernet GSO super-packets: locally generated + * on the master, or arriving untagged from the SAN side on the + * interlink. A super-packet from a LAN slave may carry per-frame + * HSR tags / PRP RCT trailers that software segmentation cannot + * recover; an already-tagged HSR/PRP super-packet violates + * per-frame wire semantics. Drop both. + */ + if (port->type !=3D HSR_PT_MASTER && port->type !=3D HSR_PT_INTERLINK) + goto drop_gso; + if (skb->protocol =3D=3D htons(ETH_P_HSR) || + skb->protocol =3D=3D htons(ETH_P_PRP)) + goto drop_gso; + + /* features =3D 0: request full software segmentation. tx_path is true + * only for locally generated traffic on the master; ingress from + * the interlink follows RX checksum semantics. + */ + segs =3D __skb_gso_segment(skb, 0, port->type =3D=3D HSR_PT_MASTER); + if (IS_ERR(segs) || unlikely(!segs)) + goto drop_gso; + + consume_skb(skb); + while (segs) { + next =3D segs->next; + segs->next =3D NULL; + hsr_forward_skb_one(segs, port); + segs =3D next; + } + return; + +drop_gso: + DEV_STATS_INC(port->dev, tx_dropped); + kfree_skb(skb); +} --=20 2.43.0 From nobody Fri Oct 2 07:45:22 2026 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6E413515D3 for ; Mon, 3 Aug 2026 22:22:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785795749; cv=none; b=drnVN1A1No42jNPl/xihyUx1CGaT7lpJo8vYamMl0emZoISyLNUmGR5u5ol2PgGw1qbEqHqjyDyWYvBBMlEc3VIxlGDwvLyAJ2Cy5nNF58vQPoa+NwvJqofUeOf517s7Z7KmU65p50tyBXWL1GyswhKVdf+T4INrnV1vgAJxqEs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785795749; c=relaxed/simple; bh=kMtPOkzSyHAmd8LVpKQ++9IZtaOPYOO8eNQ0z347O40=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=p7JIVb059fBPyDv/N5WgFuTGPChg+Se8MQiGT0Fmq5T2/OmDOYfOEIBhkswkZkQEV/EZT4XyKesSSi+UO2fTcyGvv0e2F0LRxDx4L9dzQjWFNVKMeXHdQM8tY4628zK7HHKrRXs8CX4x8zZBjA93K0njhb2G+yM4+C2wjkkJxf8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mzfjirEP; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mzfjirEP" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4954b3c5cbeso3781325e9.1 for ; Mon, 03 Aug 2026 15:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785795742; x=1786400542; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=E7LAGrB25Rm/bsTMEWa/Q6nmRV7NY9NanZO0ZwAGU+Q=; b=mzfjirEPuKkEHxnbawnKUGUTZS7JW1JQg/1AKMcHVDl2r2wz4EOZNdN2+eYW1jjS+k hqRINRNULL8ouw8hpH1YUz59jLzSmHtKvMixGFoF0OrXgB7GstKq5jBUEFr0zRb3Z+bj 8QE0Xq+prCg3ao6VuIZJV3MKs2G3OecmAYm9p+EuDUjWHaOSBxL0t5KvReV+kPQMAZCb T3XFszKuc35WuabBHnmeR6tZ5H3JWE1lZTc21Tw2euc5ZlhyN4YjXNrfGt4EWOMQLbzz fgg0JfNI2RGmZo4YsgPxrm6s297Xjbj5rLRMpxuWmXEkzUggrPlKa0qZIdd3Efi3thF9 ZeYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785795742; x=1786400542; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=E7LAGrB25Rm/bsTMEWa/Q6nmRV7NY9NanZO0ZwAGU+Q=; b=Df9WH1j+UnFKXcmA1sKJ3v2zgvW2SwVgDMnFfTiVk8n3tuEeqBq1XUKwexaU8xgTzD K9+aS7UwBd+pkQPSIuKlYFZEYAVQjt1Pghz81VoYMq7xmF8RoMeT7hcJjaYMGej5sItC AcMOyzHO+A17jxR/Nfl9Y7RwnkagP3Xbb2p+r6Th+nUsKSBZ6gSDngwYo+p2oLaXNzj1 xauldax0QNb/5f/2YpDm8LhgdIpXQsYKYTL3VSkHKhp8i5dIhvz2K303qiDfts0XG2Dz 2mAz7aT7J5FQvGrss60c70cOaNYumdbFeXj3x+uPP9gNs3pKt4Pb1M9V7sPIexWRxCUk TkVA== X-Forwarded-Encrypted: i=1; AHgh+RqSfu4gQuB+0ZWbmlEKf4HfPSOJLk+AeYJIFxOjglSLIZj5vMAqlNVrdwsVC+/2GHtqidRwoZWwjZNgPsE=@vger.kernel.org X-Gm-Message-State: AOJu0YyzaYnRVgx4n/FkKze8xImWXEmfYDTdCa8JYKAIBGycvPXEL5vP 7MLLFIY500fyST6yVrU5XKpfEfDm48dM+7xE3PZg4z0xfMQ0XDprzw4V X-Gm-Gg: AR+sD12nDuGnDnaBGBur7lWqN7Djq9DOmcOQk6G/r5ZhJqDJPx/qRvOZNX/64WDQdoc 109alAuVG/ihmnPnczssTG5v7WSAFImp9nr/hhPfeVqS098iDgyzYsXb27BGQruJQhnx1R7rR5B EB59QiRWLQJ4fuXvc/C10j0npfs4n/GoIRkOyA8w/9g1s7VTTaw4dKj5AeTEAFKSoii/+BfyPNK RfgGxWa6lObn0DW7al2AdhL07XJcbxezvLea8zhc2AsBasU5K2pXoMOpNLUIWQ92dgjrfsmKqX+ 3yI7D8VucWJQMZ40l+Zj6ip+VsLE8z5RLzjm+WhbcWZqVI7A12PVx9p7QFwZEalI6NOh1hcmrl9 FPpkLXQrEpZ5+hkRbHlY8N9D17kPddIHcFvKW/pJtec9M7q+6JeFc/cBgGkHPqDAvRaK5OtW5Gq jKsis1EnZXU6kNmTJYieEhRYQhj5Ca9YhEtpX2pIcrgWVFjKgmu07WSjjesN/EYH50E/Huqawhb 0wQ+n3l8Oicw6VZJ59oKUPsfm7dWNotPGMDWDNwk3xZ89RLO4seoNUosOJRJGPVJoetYQ31nODI uK44DIcf7lXYE2DlSw4= X-Received: by 2002:a05:600c:1c11:b0:495:7561:a9cc with SMTP id 5b1f17b1804b1-4980c6aa664mr144681325e9.4.1785795741614; Mon, 03 Aug 2026 15:22:21 -0700 (PDT) Received: from L-022584.energy.envision.com (dynamic-077-012-149-099.77.12.pool.telefonica.de. [77.12.149.99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49949fc2da2sm31668145e9.3.2026.08.03.15.22.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 15:22:21 -0700 (PDT) From: Xin Xie To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, andrew+netdev@lunn.ch, shuah@kernel.org, kees@kernel.org, petr.wozniak@gmail.com, qingfang.deng@linux.dev, fmaurer@redhat.com, luka.gejak@linux.dev, bigeasy@linutronix.de, xiaoliang.yang_1@nxp.com, skhawaja@google.com, stable@vger.kernel.org, sdf.kernel@gmail.com, Xin Xie Subject: [PATCH net v4 4/4] selftests: net: hsr: add GRO super-packet forwarding test Date: Tue, 4 Aug 2026 00:22:11 +0200 Message-ID: <20260803222211.877-5-xiexinet@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260803222211.877-1-xiexinet@gmail.com> References: <20260803222211.877-1-xiexinet@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Add a test exercising the HSR forward path with GSO super-packets: a TSO-enabled SAN behind the interlink streams TCP through an HSR DUT to a peer node. The test verifies that: * enslaved devices have GRO and HW-GRO disabled automatically, * the HSR master does not advertise GSO/TSO features (including tx-tcp6/udp/gso-list, to catch future hw_features leaks), * super-packets really leave the SAN (TX average frame size above a fixed threshold) while bulk output on the DUT's LAN legs stays at per-frame size =E2=80=94 aggregate counter evidence that GSO enters the forward path and is unfolded at the forward entry. Zero TCP retransmits is reported as a secondary health signal. The one-shot iperf3 server lives in a private mktemp -d workdir (mode 0700): its exact PID is retained only after numeric, alive, comm=3D=3Diperf3 and netns-membership checks, its real exit status is propagated through an rc file, and cleanup kills by exact PID with a bounded wrapper reap plus a namespace-scoped iperf3 sweep. Server startup failure, client failure and a never-published PID are all bounded exits with no process or directory leaks. Environments whose iproute2 lacks the HSR interlink syntax are skipped with ksft_skip. Without this series the feature checks fail, and on drivers that hand GRO super-packets to the HSR receive path the stream degrades or stalls. Signed-off-by: Xin Xie --- tools/testing/selftests/net/hsr/Makefile | 1 + .../selftests/net/hsr/hsr_gro_superpacket.sh | 465 ++++++++++++++++++ 2 files changed, 466 insertions(+) create mode 100755 tools/testing/selftests/net/hsr/hsr_gro_superpacket.sh diff --git a/tools/testing/selftests/net/hsr/Makefile b/tools/testing/selft= ests/net/hsr/Makefile index 31fb9326cf53..0d105476e7c5 100644 --- a/tools/testing/selftests/net/hsr/Makefile +++ b/tools/testing/selftests/net/hsr/Makefile @@ -3,6 +3,7 @@ top_srcdir =3D ../../../../.. =20 TEST_PROGS :=3D \ + hsr_gro_superpacket.sh \ hsr_ping.sh \ hsr_redbox.sh \ link_faults.sh \ diff --git a/tools/testing/selftests/net/hsr/hsr_gro_superpacket.sh b/tools= /testing/selftests/net/hsr/hsr_gro_superpacket.sh new file mode 100755 index 000000000000..ec05754274c8 --- /dev/null +++ b/tools/testing/selftests/net/hsr/hsr_gro_superpacket.sh @@ -0,0 +1,465 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# Test HSR handling of GRO/GSO super-packets: +# +# 1. Enslaving a device to an HSR master disables GRO on it +# (dev_disable_gro()). +# 2. The HSR master does not advertise GSO/TSO features. +# 3. A TCP stream from a TSO-enabled SAN (which therefore emits GSO +# super-packets) is unfolded at the HSR forward entry. Evidence: +# interface-counter deltas show super-packet-sized frames leaving +# the SAN and per-frame-sized traffic leaving the DUT's LAN ports. +# +# Topology (100.64.0.0/24): +# +# ns_san ns_dut ns_peer +# +-----------+ interlink +---------------+ LAN A/B +-----------+ +# | s0 [0.1] |-------------| d_il hsr0 |-----------| hsr1 [0.3]| +# +-----------+ | d_a / d_b | | p_a / p_b | +# +---------------+ +-----------+ +# +# SAN traffic reaches ns_peer only through hsr0's forward path +# (interlink RX -> LAN A/B TX), so every SAN frame is tagged and +# forwarded by the DUT. + +source ./hsr_common.sh + +san_ip=3D"100.64.0.1" +peer_ip=3D"100.64.0.3" + +# Aggregate counter thresholds for the stream test (bytes/packets): +# SAN_AVG_MIN proves GSO super-packets left the SAN; LAN_AVG_MAX is a +# guard with margin, not the protocol maximum (see do_tso_stream_test). +SAN_AVG_MIN=3D2048 +LAN_AVG_MAX=3D1514 + +iperf_pid=3D"" +server_wrapper=3D"" +workdir=3D"" +pidfile=3D"" +ns_dut=3D"" +ns_san=3D"" +ns_peer=3D"" +rcfile=3D"" + +cleanup() +{ + # exact-PID kill only after RE-validating identity (guards against + # PID reuse between publication and cleanup) + if [ -n "${iperf_pid}" ] && valid_server_pid "${iperf_pid}"; then + kill "${iperf_pid}" 2>/dev/null + fi + iperf_pid=3D"" + if [ -n "${server_wrapper}" ]; then + # the wrapper waits on the server; reap it with a 5s bound so a + # live-but-unpublished server can never hang cleanup + for _ in $(seq 1 50); do + kill -0 "${server_wrapper}" 2>/dev/null || break + sleep 0.1 + done + kill "${server_wrapper}" 2>/dev/null + wait "${server_wrapper}" 2>/dev/null + server_wrapper=3D"" + fi + # last resort, namespace-scoped only: TERM the iperf3 processes that + # actually live in the peer netns, poll for bounded exit, then + # SIGKILL any survivor before touching the namespace name. A blind + # pkill would scan the host PID space and hit unrelated tests. + local _p _still + for _p in $(ip netns pids "$ns_peer" 2>/dev/null); do + if is_iperf3_pid "$_p"; then + kill "$_p" 2>/dev/null + fi + done + for _ in $(seq 1 50); do + _still=3D0 + for _p in $(ip netns pids "$ns_peer" 2>/dev/null); do + if is_iperf3_pid "$_p"; then + _still=3D1 + break + fi + done + [ "$_still" -eq 0 ] && break + sleep 0.1 + done + for _p in $(ip netns pids "$ns_peer" 2>/dev/null); do + if is_iperf3_pid "$_p"; then + kill -9 "$_p" 2>/dev/null + fi + done + # remove only the known non-empty private directory + if [ -n "${workdir}" ] && [ -d "${workdir}" ]; then + rm -rf "${workdir}" + fi + workdir=3D"" + pidfile=3D"" + rcfile=3D"" + cleanup_all_ns +} + +trap cleanup EXIT + +check_tool() +{ + if ! command -v "$1" > /dev/null 2>&1; then + echo "SKIP: Could not run test without $1" + exit $ksft_skip + fi +} + +nsx() +{ + ip netns exec "$1" bash -c "$2" +} + +is_iperf3_pid() +{ + [ "$(cat /proc/"$1"/comm 2>/dev/null)" =3D "iperf3" ] +} + +# Decimal-counter validation for the snapshot blocks: every value must +# be a plain decimal number. A parse failure in read_tx_counters yields +# empty/garbled fields, which this check turns into an immediate FAIL. +valid_decimals() +{ + local v + + for v in "$@"; do + [[ "$v" =3D~ ^[0-9]+$ ]] || return 1 + done + return 0 +} + +setup_topo() +{ + setup_ns ns_dut ns_san ns_peer || exit $? + + ip link add d_a netns "$ns_dut" type veth peer name p_a netns "$ns_peer" + ip link add d_b netns "$ns_dut" type veth peer name p_b netns "$ns_peer" + ip link add d_il netns "$ns_dut" type veth peer name s0 netns "$ns_san" + + # HSR tags add 6 bytes per frame; give the LAN legs headroom. + for iface in d_a d_b; do + nsx "$ns_dut" "ip link set $iface mtu 1600; \ + ip link set $iface up" + done + for iface in p_a p_b; do + nsx "$ns_peer" "ip link set $iface mtu 1600; \ + ip link set $iface up" + done + + nsx "$ns_dut" "ip link set d_il up" + nsx "$ns_san" "ip link set s0 up; ip addr add $san_ip/24 dev s0" + + nsx "$ns_dut" "ip link add hsr0 type hsr \ + slave1 d_a slave2 d_b interlink d_il proto 0; \ + ip link set hsr0 up" + nsx "$ns_peer" "ip link add hsr1 type hsr \ + slave1 p_a slave2 p_b proto 0; \ + ip link set hsr1 up; ip addr add $peer_ip/24 dev hsr1" + + # Let the nodes see each other's supervision frames. + sleep 2 +} + +check_feature() +{ + local ns=3D"$1" + local iface=3D"$2" + local feature=3D"$3" + local want=3D"$4" + + if nsx "$ns" "ethtool -k $iface" | grep -q "^$feature: $want"; then + echo "INFO: $ns/$iface $feature is $want [ OK ]" + else + echo "FAIL: $ns/$iface $feature is not $want" 1>&2 + ret=3D1 + fi +} + +# Off-or-absent variant: fails only when the feature is present AND on, +# so devices that simply do not list the feature do not fail it. +check_feature_not_on() +{ + local ns=3D"$1" + local iface=3D"$2" + local feature=3D"$3" + + if nsx "$ns" "ethtool -k $iface" | grep -q "^$feature: on"; then + echo "FAIL: $ns/$iface $feature is on" 1>&2 + ret=3D1 + else + echo "INFO: $ns/$iface $feature not on [ OK ]" + fi +} + +do_gro_feature_checks() +{ + echo "INFO: Checking that enslavement disabled GRO." + check_feature "$ns_dut" d_a generic-receive-offload off + check_feature "$ns_dut" d_b generic-receive-offload off + check_feature "$ns_dut" d_il generic-receive-offload off + stop_if_error "GRO not disabled on enslaved devices." + + echo "INFO: Checking that enslavement disabled HW-GRO." + check_feature "$ns_dut" d_a rx-gro-hw off + check_feature "$ns_dut" d_b rx-gro-hw off + check_feature "$ns_dut" d_il rx-gro-hw off + stop_if_error "HW-GRO not disabled on enslaved devices." + + echo "INFO: Checking that the HSR master does not advertise GSO/TSO." + check_feature "$ns_dut" hsr0 generic-segmentation-offload off + check_feature "$ns_dut" hsr0 tcp-segmentation-offload off + check_feature_not_on "$ns_dut" hsr0 tx-tcp6-segmentation + check_feature_not_on "$ns_dut" hsr0 tx-udp-segmentation + check_feature_not_on "$ns_dut" hsr0 tx-gso-list + stop_if_error "HSR master still advertises GSO-family features." +} + +alloc_workdir() +{ + # Allocated only here, long after the initial topology cleanup, so + # cleanup() at setup_topo() time can never remove it. mktemp failure + # is a hard test failure. + workdir=3D$(mktemp -d /tmp/hsr_gro_test.XXXXXX) || { + echo "FAIL: mktemp -d failed" 1>&2 + exit 1 + } + chmod 700 "${workdir}" + pidfile=3D"${workdir}/iperf.pid" + rcfile=3D"${workdir}/iperf.rc" +} + +# Numeric, alive, comm =3D=3D iperf3, and really owned by the peer netns. +valid_server_pid() +{ + local p=3D"$1" + + [[ "$p" =3D~ ^[0-9]+$ ]] || return 1 + kill -0 "$p" 2>/dev/null || return 1 + [ "$(cat /proc/"$p"/comm 2>/dev/null)" =3D "iperf3" ] || return 1 + ip netns pids "$ns_peer" 2>/dev/null | grep -qx "$p" +} + +start_iperf_server() +{ + local candidate_pid + + # One-shot server, no -D: the wrapper records its exact PID and its + # real exit status (netns shares the PID namespace and the host fs). + alloc_workdir + ( nsx "$ns_peer" "iperf3 -s -1 > /dev/null 2>&1 & \ + echo \$! > ${pidfile}; \ + wait \$!; \ + echo \$? > ${rcfile}" ) & + server_wrapper=3D$! + # the wrapper writes the pidfile asynchronously; wait for it to + # appear instead of racing the read + for _ in $(seq 1 50); do + [ -s "${pidfile}" ] && break + sleep 0.1 + done + if [ ! -s "${pidfile}" ]; then + echo "FAIL: iperf3 server did not publish a pid" \ + "(no pidfile)" 1>&2 + ret=3D1 + return 1 + fi + candidate_pid=3D$(<"${pidfile}") + if ! valid_server_pid "${candidate_pid}"; then + echo "FAIL: iperf3 server pid '${candidate_pid}'" \ + "failed validation" 1>&2 + ret=3D1 + return 1 + fi + # publish only after full validation + iperf_pid=3D"${candidate_pid}" + sleep 1 + return 0 +} + +# Print " " for exactly one TX record of ns/dev; anything +# else (missing, duplicated, non-numeric) is a hard FAIL. +read_tx_counters() +{ + local ns=3D"$1" dev=3D"$2" + local out cnt + + out=3D$(nsx "$ns" "ip -s link show $dev" | \ + awk '/^ +TX:/{getline; print $1, $2}') + cnt=3D$(echo "$out" | grep -c '^[0-9]* [0-9]*$') + if [ "$cnt" -ne 1 ]; then + echo "FAIL: cannot parse TX counters of $ns/$dev" \ + "(records=3D$cnt)" 1>&2 + return 1 + fi + echo "$out" + return 0 +} + +eval_counter_delta() +{ + local name=3D"$1" b0=3D"$2" p0=3D"$3" b1=3D"$4" p1=3D"$5" op=3D"$6" limit= =3D"$7" + local bd pd + + if ! [[ "$b0" =3D~ ^[0-9]+$ && "$b1" =3D~ ^[0-9]+$ && \ + "$p0" =3D~ ^[0-9]+$ && "$p1" =3D~ ^[0-9]+$ ]]; then + echo "FAIL: non-numeric counter input for $name" 1>&2 + ret=3D1 + return 1 + fi + bd=3D$((b1 - b0)) + pd=3D$((p1 - p0)) + if [ "$bd" -lt 0 ] || [ "$pd" -le 0 ]; then + echo "FAIL: counter delta invalid for $name" \ + "(bytes=3D$bd pkts=3D$pd)" 1>&2 + ret=3D1 + return 1 + fi + if [ "$op" =3D "gt" ]; then + if [ "$bd" -le $((pd * limit)) ]; then + echo "FAIL: $name bytes/packets $bd/$pd <=3D $limit" 1>&2 + ret=3D1 + return 1 + fi + else + if [ "$bd" -gt $((pd * limit)) ]; then + echo "FAIL: $name bytes/packets $bd/$pd > $limit" 1>&2 + ret=3D1 + return 1 + fi + fi + echo "INFO: $name counter delta bytes=3D$bd packets=3D$pd" \ + "(op $op limit $limit) [ OK ]" + return 0 +} + +do_tso_stream_test() +{ + local out sender_retr server_rc + local san_b0 san_p0 san_b1 san_p1 + local a_b0 a_p0 a_b1 a_p1 b_b0 b_p0 b_b1 b_p1 + + echo "INFO: Enabling TSO/GSO on the SAN interface." + nsx "$ns_san" "ethtool -K s0 tso on gso on" + check_feature "$ns_san" s0 tcp-segmentation-offload on + stop_if_error "Could not enable TSO on the SAN interface." + + echo "INFO: Running 10s TCP stream SAN -> peer through the HSR DUT." + start_iperf_server || return + + # Counter snapshots around the stream window. The SAN-side average + # must exceed SAN_AVG_MIN (aggregate proof that GSO super-packets + # really left the SAN); each DUT LAN leg must stay under LAN_AVG_MAX + # (aggregate proof that bulk output was segmented per-frame). These + # are aggregate discriminators, not a per-frame maximum proof. + san_b0=3D0; san_p0=3D0; a_b0=3D0; a_p0=3D0; b_b0=3D0; b_p0=3D0 + read -r san_b0 san_p0 <&2 + ret=3D1 + return 1 + fi + + # rate-capped: the PRIMARY discriminator is the counter inequality + # above, not max throughput; retransmits are informational only. + # Uncapped runs flap at VM/CI edge rates without indicating a + # functional problem. + if ! out=3D$(nsx "$ns_san" "timeout 60 iperf3 -c $peer_ip -M 1446 \ + -b 2G -t 10" 2>&1); then + echo "FAIL: iperf3 client failed:" 1>&2 + echo "$out" 1>&2 + ret=3D1 + return + fi + + read -r san_b1 san_p1 <&2 + ret=3D1 + return 1 + fi + + eval_counter_delta "SAN s0 TX" "$san_b0" "$san_p0" "$san_b1" "$san_p1" \ + gt "$SAN_AVG_MIN" + eval_counter_delta "DUT d_a TX" "$a_b0" "$a_p0" "$a_b1" "$a_p1" \ + le "$LAN_AVG_MAX" + eval_counter_delta "DUT d_b TX" "$b_b0" "$b_p0" "$b_b1" "$b_p1" \ + le "$LAN_AVG_MAX" + [ "${ret:-0}" -eq 0 ] || return + + # success path: the one-shot server exits by itself; reap the + # wrapper, then REQUIRE the rcfile with the server's real status + wait "${server_wrapper}" + server_wrapper=3D"" + if [ ! -s "${rcfile}" ]; then + echo "FAIL: iperf3 server status file missing (${rcfile})" 1>&2 + ret=3D1 + return + fi + server_rc=3D$(cat "${rcfile}") + if ! [[ "$server_rc" =3D~ ^[0-9]+$ ]] || [ "$server_rc" -ne 0 ]; then + echo "FAIL: iperf3 server exited with rc=3D'${server_rc}'" 1>&2 + ret=3D1 + return + fi + iperf_pid=3D"" + + # secondary health signal only: anchored, single-match, numeric =E2=80=94 + # any parse anomaly is a loud FAIL, but the value itself no longer + # gates (the counter inequalities above are the primary evidence). + sender_retr=3D$(echo "$out" | awk '/sec .* sender$/ {print $(NF-1)}') + if [ "$(echo "$sender_retr" | grep -Ec '^[0-9]+$')" -ne 1 ]; then + echo "FAIL: cannot parse sender retransmits reliably" 1>&2 + echo "$out" 1>&2 + ret=3D1 + return + fi + echo "INFO: TCP stream done;" \ + "sender retransmits=3D$sender_retr (secondary signal)" + echo "$out" | grep -E "sender|receiver" +} + +check_prerequisites +check_tool ethtool +check_tool iperf3 +check_tool timeout + +# iproute2 must know the HSR interlink syntax. +if ! ip link help hsr 2>&1 | grep -qi interlink; then + echo "SKIP: iproute2 has no HSR interlink support" + exit $ksft_skip +fi + +setup_topo + +echo "INFO: Initial validation ping (SAN -> peer through the DUT)." +do_ping "$ns_san" "$peer_ip" +stop_if_error "Initial validation failed." + +do_gro_feature_checks +do_tso_stream_test +stop_if_error "GSO super-packet stream test failed." + +echo "INFO: All good." +cleanup +exit $ret --=20 2.43.0