From nobody Tue Mar 3 05:05:27 2026 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.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 C221E320CCF for ; Mon, 2 Mar 2026 23:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772492520; cv=none; b=eOYmtOGZsfv6gvBanD8GBN1AIUWYDAOZX6RPjnFGp2dJIRdKXcNdiqljD1AoW4FeX8j2qc7iaH0MjgdFIrJI0pTG/GXWJvL+jDOBAAsirIhv+33P05cuj1ZO8CASYMaTEVYcg6Hf6bckuN7mPOCY+vT81UBwZSaqIT0SCQVIHzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772492520; c=relaxed/simple; bh=D9A1mjx3Bo2dp6Mntk51MlHtoIWxAsQL+/MQZTZBMrs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gCRxXGj/SQ0KIz5JPOvf5YJjG4AaD0eNQ8NrpOb8+4o1/gTEv+QHg7qOP4S0IgxTkVhsZS2ferd34C/30Ku9EeHOkXqSNAYtc8MPW0cCYpJB70W+MWVxiRYk7sjXxsq2aE26AU9zPZ9XAx3vwJImU5QsX0ueROsdQb4ZKuq7BPc= 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=KSZPDkoL; arc=none smtp.client-ip=209.85.128.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="KSZPDkoL" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4836f4cbe0bso42814655e9.3 for ; Mon, 02 Mar 2026 15:01:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772492517; x=1773097317; 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; bh=CU2WMDwR3VgGVbtB5/gNO1+KxRbSdrRzqbkeoh8a3to=; b=KSZPDkoLm/mALs/aq2swRZoX3KY1HPLt3YBz3LuJIdZjk6lLCaKxInR4sM3HA3/m9Z dB32IaH2I2tFykaAPHOhW/NuJAL0sHbOqxKpP1Pd9AJz4tXHhvdyOJGudeJlN4F1hHmm IOpGKrISvXdL7irouAOkNaa4TebXP+OxI61fXA2El0uaJAQ4lrcoJhZMEx92oPRSWErW 0BFwHGYsbkr4P0K6B5sUObguOhORN73UV7JJ0oaDjSQgCBxnVziLyAhF2n19iCFW6BIU 8d8G34Aedbwhv2l0GxaLBwjT01OLt6GXM3sN66es7QNzhZ4E3AI76WH5W6EeYx+uDZGQ rEOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772492517; x=1773097317; 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; bh=CU2WMDwR3VgGVbtB5/gNO1+KxRbSdrRzqbkeoh8a3to=; b=dw9J8OQVTkp7Gtt+beXFxSioLbkAuFR2y/GUsmH25O4xhXvkWImDo2dE6JYJt6T3Ee sqg6DMFPZnaLgxqeQJVqawYtK9+SU0kziisqbmJLgrJFc9Pt4ptI/4CvB6SFaJ/mMuMV b3MeqXqWQEa09LqpkJAX8E9OhzOmlXDeuNNhU6nEH7CotGm5eI1FzEDvSBzLFhvOYmZA Q1yMPSP2ICJbEUstnJ46FzUjn3EHsrP0ZIvku64FK6FibSHAYMYDsO5kGJu3PKxbaNLQ dc+DnDrBZtw+UVsh1vdrq27o28CRAWT6bQeemF4H2p+Y9m/moFTVQpC7Di0KTrww50p/ k4Iw== X-Forwarded-Encrypted: i=1; AJvYcCUvcfqypvScCampVhh9lWJpgQwRx3uXLcg2PznAvdAk8kepq9tnz7y/fCGoz8H8ri+PRIPHzDavpnitCAk=@vger.kernel.org X-Gm-Message-State: AOJu0Yxv+3GvNIBYKfRLx70bdvtK3O/fgQw7h37LcsSdK1ulyYY7E4// 9EoO5GrmBhzPGYoTtdq0bu+y3qQXaaC90q7CaHrZq4uqIvq/Mdyg+5rx X-Gm-Gg: ATEYQzxSDeSjJs4V6HrkjvHGoD+cCyNuTv7aP1nBH3zqx0kNV9LDCuXv7GA5D6gti/L b2yE17K+8k9UQtTO1pBPszJ9i25qSE2tVSf6wk46lUaYB46E0loQ24Wz3hB8cvrvP/1IquBnD/E X4irU8T4pSwU1IqoW8lPmUiJiKuQMAMCVlMM1X62sviRI+2XVnKEwTHkRe1HuXJOMiOVuFNa1El nSEt5dsicE8lBlx/pQttuh2u+YxnCRCqQGIImkmmrOUY55QO+L8pherMiMOMubGL0ibOt+qzSdf Mh1/Yq0cMi0t02B0togQXuRwRBROnyuIZ4+XxwiLhLy0fUGP8acQHCSkxq1y8Uq2XTe0IysAXn9 netc/BumMcBVMon7yrRC3p63SHbFplpPcOoHwBWnY0N+t/cgbuwRIzvTywte0ApMUqYyGimvhLY xazsUG3uZPShjCSs3E0jx1 X-Received: by 2002:a05:600c:4fc8:b0:47b:e2a9:2bd7 with SMTP id 5b1f17b1804b1-483c9beaca0mr292444625e9.19.1772492516969; Mon, 02 Mar 2026 15:01:56 -0800 (PST) Received: from localhost ([2a03:2880:31ff:57::]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439ae3f31dbsm17149216f8f.1.2026.03.02.15.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Mar 2026 15:01:55 -0800 (PST) From: Mohsin Bashir To: netdev@vger.kernel.org Cc: alexanderduyck@fb.com, alok.a.tiwari@oracle.com, andrew+netdev@lunn.ch, andrew@lunn.ch, davem@davemloft.net, dg573847474@gmail.com, donald.hunter@gmail.com, edumazet@google.com, gal@nvidia.com, horms@kernel.org, idosch@nvidia.com, jacob.e.keller@intel.com, kernel-team@meta.com, kory.maincent@bootlin.com, kuba@kernel.org, lee@trager.us, leon@kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, linux@armlinux.org.uk, mbloch@nvidia.com, mike.marciniszyn@gmail.com, mohsin.bashr@gmail.com, o.rempel@pengutronix.de, pabeni@redhat.com, saeedm@nvidia.com, tariqt@nvidia.com, vadim.fedorenko@linux.dev Subject: [net-next V4 1/5] net: ethtool: Track pause storm events Date: Mon, 2 Mar 2026 15:01:45 -0800 Message-ID: <20260302230149.1580195-2-mohsin.bashr@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260302230149.1580195-1-mohsin.bashr@gmail.com> References: <20260302230149.1580195-1-mohsin.bashr@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" With TX pause enabled, if a device is unable to pass packets up to the stack (e.g., CPU is hanged), the device can cause pause storm. Given that devices can have native support to protect the neighbor from such flooding, such events need some tracking. This support is to track TX pause storm events for better observability. Reviewed-by: Oleksij Rempel Signed-off-by: Jakub Kicinski Signed-off-by: Mohsin Bashir --- Documentation/netlink/specs/ethtool.yaml | 13 +++++++++++++ include/linux/ethtool.h | 2 ++ include/uapi/linux/ethtool_netlink_generated.h | 1 + net/ethtool/pause.c | 4 +++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netli= nk/specs/ethtool.yaml index 0a2d2343f79a..4707063af3b4 100644 --- a/Documentation/netlink/specs/ethtool.yaml +++ b/Documentation/netlink/specs/ethtool.yaml @@ -879,6 +879,19 @@ attribute-sets: - name: rx-frames type: u64 + - + name: tx-pause-storm-events + type: u64 + doc: >- + TX pause storm event count. Increments each time device + detects that its pause assertion condition has been true + for too long for normal operation. As a result, the device + has temporarily disabled its own Pause TX function to + protect the network from itself. + This counter should never increment under normal overload + conditions; it indicates catastrophic failure like an OS + crash. The rate of incrementing is implementation specific. + - name: pause attr-cnt-name: __ethtool-a-pause-cnt diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 798abec67a1b..83c375840835 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -512,12 +512,14 @@ struct ethtool_eth_ctrl_stats { * * Equivalent to `30.3.4.3 aPAUSEMACCtrlFramesReceived` * from the standard. + * @tx_pause_storm_events: TX pause storm event count (see ethtool.yaml). */ struct ethtool_pause_stats { enum ethtool_mac_stats_src src; struct_group(stats, u64 tx_pause_frames; u64 rx_pause_frames; + u64 tx_pause_storm_events; ); }; =20 diff --git a/include/uapi/linux/ethtool_netlink_generated.h b/include/uapi/= linux/ethtool_netlink_generated.h index 556a0c834df5..114b83017297 100644 --- a/include/uapi/linux/ethtool_netlink_generated.h +++ b/include/uapi/linux/ethtool_netlink_generated.h @@ -381,6 +381,7 @@ enum { ETHTOOL_A_PAUSE_STAT_PAD, ETHTOOL_A_PAUSE_STAT_TX_FRAMES, ETHTOOL_A_PAUSE_STAT_RX_FRAMES, + ETHTOOL_A_PAUSE_STAT_TX_PAUSE_STORM_EVENTS, =20 __ETHTOOL_A_PAUSE_STAT_CNT, ETHTOOL_A_PAUSE_STAT_MAX =3D (__ETHTOOL_A_PAUSE_STAT_CNT - 1) diff --git a/net/ethtool/pause.c b/net/ethtool/pause.c index 0f9af1e66548..5d28f642764c 100644 --- a/net/ethtool/pause.c +++ b/net/ethtool/pause.c @@ -130,7 +130,9 @@ static int pause_put_stats(struct sk_buff *skb, if (ethtool_put_stat(skb, pause_stats->tx_pause_frames, ETHTOOL_A_PAUSE_STAT_TX_FRAMES, pad) || ethtool_put_stat(skb, pause_stats->rx_pause_frames, - ETHTOOL_A_PAUSE_STAT_RX_FRAMES, pad)) + ETHTOOL_A_PAUSE_STAT_RX_FRAMES, pad) || + ethtool_put_stat(skb, pause_stats->tx_pause_storm_events, + ETHTOOL_A_PAUSE_STAT_TX_PAUSE_STORM_EVENTS, pad)) goto err_cancel; =20 nla_nest_end(skb, nest); --=20 2.47.3