From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 25B6C234964 for ; Sat, 7 Feb 2026 01:05:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770426337; cv=none; b=s7c1ZzdA7P2aB8cy6EceRnpI3GwLdhm1/K8YL+rVE/poAVnt37OtVR9DOslMVXmWfj159W6gfk4Y9cFSiN/DMH7f5HP7JqjJtK1r5xmWTV5AYOnTi7tg13j4TMsM0th/bdwhxanJtfpoBL9A2ACtAi6TCnjwnDre5gQhh6e0v3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770426337; c=relaxed/simple; bh=4c97E3l1fDx5rP31BJdStxGgz1jks7S0fHhu8URAe6A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=szgpMPjL/vL919VPirv/QipazG1xnzkHn8uZ8ibCedoLfo6yJWpJ1InWOOOf6FcBvupXypj/AR4CVLJHhzZdW8bucoCDXU37aaMcctaZdzUFNlwEogRRn2q2bYDp2ONUphhfvhi9GOi2wIC8TyZmb8E+ROrz5dYTmcKH6uHmFKw= 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=WEZJgR3I; arc=none smtp.client-ip=209.85.221.49 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="WEZJgR3I" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-4362ab556f5so875735f8f.3 for ; Fri, 06 Feb 2026 17:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770426335; x=1771031135; 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=5h0Bl07+wUVkPYukWTkRgRpTRDTreTtiujhSkbJvfK8=; b=WEZJgR3IMgaZgVrA129f8Fv0CIkLDYJmZBTNGBNWTeRAbszKBLspOvb3OYujlkQG0k f76ZyG1DmGal4yTb6w3dLtZsBys8QlTObrqILVy25xK9cd8g8hBBy15CIvH0zp6qpYC2 w+O7hKr/fuG2rGaJgpcSMLArXRKHkZzFIXjasA+wzMzP3cc1vmwocdJw12zLq90bEPZk VldvUJmyJdolXwECLeqw0b74G0J9fXjxlQv9m7PVl4i5KrYWzs0mYBGEaxenSoFGB09Y Xuovh8u0O1NbG3qotPZGWsRkX4zHb8mLLPptdXCodK9Y9PDItImSTQHOEMspW/U1CyIa rxqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770426335; x=1771031135; 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=5h0Bl07+wUVkPYukWTkRgRpTRDTreTtiujhSkbJvfK8=; b=mkl7XWBJExnCet2qmX6wiJprdPv4hw9lop3xAq1ahe163pRtapapGstL7AEyqf258S z7WvZ0/NY06pnJuE2H/tS6B5XKMBzeqkjx7O85PCTrU2IWqzdA7oMJECJ+98Kup/ow7C aeMZFVoW+dbLBRU3EKsemXh0ag6RbXmO/1A4B8H56+SaBhYgPNhJuCuZovyR29bCWiEZ 7EaxZYYbaTMKSU4jupux9p+jONlb5oLngk/dnWNBDevs6rbzHoyUN8CuzGrx9SxgX33u IGFCqvPSL93VXFfboN9Bzh7+qzACgnBDb3lJVLH8jnloTzjIY2U121pxbT3Xr4HAE8Og B5+g== X-Gm-Message-State: AOJu0Yw5D3YWNBtdFLjca0AhyYuxvsC7Gcv3aZTtO+X0PLsykUSamGWf ajFQ6njMtGNXIzkkgoaJLWS98rfQ9MvNbyXe4yMKMHonXi89NpFO2RRr8CZBUvL9 X-Gm-Gg: AZuq6aKc09wZxYGRZSJsDwF5Xa3SzxEJCd2MFU9D/V3XaVAGnBUtItYemo81gorEUwa nt1BFS4v2ZlWVzeFmi3u2+AT2XdruckQ1ulkt8nhKxMDSNGGau+apAQFzzd+21P67vNGgdYGZn3 xl9fzfDxtfUYWRvixFNPnZRxlD+UVSxxYpF7yy0iMPl/MXcJt9LFfadP+mGle7/vHPN9VDK2XQm ktyZn8FRBPYgC0QJ3SyVP32lVdqToic5YkwyW7qT1/GM8xFgtQG32nYQKDI/DtlFyoaKiojZntl NVEyChSqqZF3Vxy3/cCezgzEVZsQpov1ccZHf+OojrfrJTTFy103NI9VY884hP57LJvcFr/iXkJ KXUqB7vGcT8RyPfMrDPE2NMjbcUqSL0gyFSrxUJQ8/jPILK8Vt3z6Uw2a/ifE85MESDKCfAf+v8 JMwmHTrkwPNNPAfyM8xA== X-Received: by 2002:a05:6000:288b:b0:435:975d:33b0 with SMTP id ffacd0b85a97d-4362967e068mr6267345f8f.35.1770426335035; Fri, 06 Feb 2026 17:05:35 -0800 (PST) Received: from localhost ([2a03:2880:31ff:8::]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4362974b230sm10555280f8f.36.2026.02.06.17.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Feb 2026 17:05:32 -0800 (PST) From: Mohsin Bashir To: netdev@vger.kernel.org Cc: alexanderduyck@fb.com, andrew+netdev@lunn.ch, andrew@lunn.ch, davem@davemloft.net, 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-rdma@vger.kernel.org, linux@armlinux.org.uk, mbloch@nvidia.com, mohsin.bashr@gmail.com, o.rempel@pengutronix.de, pabeni@redhat.com, saeedm@nvidia.com, tariqt@nvidia.com, vadim.fedorenko@linux.dev Subject: [PATCH net-next V2 1/5] net: ethtool: Track pause storm events Date: Fri, 6 Feb 2026 17:05:21 -0800 Message-ID: <20260207010525.3808842-2-mohsin.bashr@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260207010525.3808842-1-mohsin.bashr@gmail.com> References: <20260207010525.3808842-1-mohsin.bashr@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. 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/netlink/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; ); }; 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, __ETHTOOL_A_PAUSE_STAT_CNT, ETHTOOL_A_PAUSE_STAT_MAX = (__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; nla_nest_end(skb, nest); -- 2.47.3