public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH ethtool-next 0/2] Pause storm tracking
@ 2026-03-14  0:17 Mohsin Bashir
  2026-03-14  0:17 ` [PATCH ethtool-next 1/2] ethtool: Update pause stats struct Mohsin Bashir
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mohsin Bashir @ 2026-03-14  0:17 UTC (permalink / raw)
  To: mkubecek; +Cc: netdev, kuba, alexander.duyck

This series adds TX pause storm event tracking support and updates the
documentation for the PFC storm prevention timeout tunable.

Mohsin Bashir (2):
  ethtool: Update pause stats struct
  ethtool: Update doc for tunable

 ethtool.8.in         | 19 +++++++++++++++++--
 netlink/pause.c      |  1 +
 uapi/linux/ethtool.h |  2 +-
 3 files changed, 19 insertions(+), 3 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH ethtool-next 1/2] ethtool: Update pause stats struct
  2026-03-14  0:17 [PATCH ethtool-next 0/2] Pause storm tracking Mohsin Bashir
@ 2026-03-14  0:17 ` Mohsin Bashir
  2026-03-14  0:17 ` [PATCH ethtool-next 2/2] ethtool: Update doc for tunable Mohsin Bashir
  2026-03-23 19:10 ` [PATCH ethtool-next 0/2] Pause storm tracking patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Mohsin Bashir @ 2026-03-14  0:17 UTC (permalink / raw)
  To: mkubecek; +Cc: netdev, kuba, alexander.duyck

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.

Kernel commit: 8d282b680c72 ("eth: fbnic: Fetch TX pause storm stats")

./ethtool -I -a eth0
Pause parameters for eth0:
Autonegotiate:	off
RX:		off
TX:		on
Statistics:
  tx_pause_frames: 1
  rx_pause_frames: 0
  tx_pause_storm_events: 0

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
---
 netlink/pause.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/netlink/pause.c b/netlink/pause.c
index da444bd..a22c7a3 100644
--- a/netlink/pause.c
+++ b/netlink/pause.c
@@ -116,6 +116,7 @@ static int show_pause_stats(const struct nlattr *nest)
 	} stats[] = {
 		{ ETHTOOL_A_PAUSE_STAT_TX_FRAMES, "tx_pause_frames" },
 		{ ETHTOOL_A_PAUSE_STAT_RX_FRAMES, "rx_pause_frames" },
+		{ ETHTOOL_A_PAUSE_STAT_TX_PAUSE_STORM_EVENTS, "tx_pause_storm_events" },
 	};
 	bool header = false;
 	unsigned int i;
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH ethtool-next 2/2] ethtool: Update doc for tunable
  2026-03-14  0:17 [PATCH ethtool-next 0/2] Pause storm tracking Mohsin Bashir
  2026-03-14  0:17 ` [PATCH ethtool-next 1/2] ethtool: Update pause stats struct Mohsin Bashir
@ 2026-03-14  0:17 ` Mohsin Bashir
  2026-03-23 19:10 ` [PATCH ethtool-next 0/2] Pause storm tracking patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Mohsin Bashir @ 2026-03-14  0:17 UTC (permalink / raw)
  To: mkubecek; +Cc: netdev, kuba, alexander.duyck

ETHTOOL_PFC_PREVENTION_TOUT enables the configuration of timeout value
for PFC storm prevention. This can also be used to configure storm
detection timeout for global pause settings. In fact some existing
drivers are already using it for the said purpose.
Update the documentation to formalizes the use of this knob to
configure timeout value for pause storm prevention mechanism

Kernel commit: 817de93c348a ("net: ethtool: Update doc for tunable")

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
---
 ethtool.8.in         | 19 +++++++++++++++++--
 uapi/linux/ethtool.h |  2 +-
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ethtool.8.in b/ethtool.8.in
index e10a252..daac5a2 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -1550,7 +1550,13 @@ Get the current tx copybreak value in bytes.
 Get the current tx copybreak buffer size in bytes.
 .TP
 .B pfc\-prevention\-tout
-Get the current pfc prevention timeout value in msecs.
+Get the PFC storm prevention timeout value in milliseconds.
+This timeout value applies to both PFC (Priority Flow Control) and standard
+link-level pause storms (IEEE 802.3x). A pause storm occurs when a device
+continously sends TX pause frames to the switch, resulting in persistent
+backpressure. When enabled, if the NIC detects that pause assertion has
+exceeded the configured timeout, the device takes protective action (stops
+sending pause frames) to prevent a complete traffic stall.
 .RE
 .TP
 .B \-\-set\-tunable
@@ -1567,7 +1573,16 @@ Set the tx copybreak value in bytes.
 Set the tx copybreak buffer size in bytes.
 .TP
 .BI pfc\-prevention\-tout \ N
-Set pfc prevention timeout in msecs. Value of 0 means disable and 65535 means auto.
+Set the PFC storm prevention timeout in milliseconds. The range of valid
+values is device specific. Special values:
+.RS 4
+.TP
+.B 0
+Disable storm prevention.
+.TP
+.B 65535
+Use device-local default timeout (auto).
+.RE
 .RE
 .TP
 .B \-\-reset
diff --git a/uapi/linux/ethtool.h b/uapi/linux/ethtool.h
index 7a13192..a5d7d24 100644
--- a/uapi/linux/ethtool.h
+++ b/uapi/linux/ethtool.h
@@ -225,7 +225,7 @@ enum tunable_id {
 	ETHTOOL_ID_UNSPEC,
 	ETHTOOL_RX_COPYBREAK,
 	ETHTOOL_TX_COPYBREAK,
-	ETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */
+	ETHTOOL_PFC_PREVENTION_TOUT, /* both pause and pfc, see man ethtool */
 	ETHTOOL_TX_COPYBREAK_BUF_SIZE,
 	/*
 	 * Add your fresh new tunable attribute above and remember to update
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH ethtool-next 0/2] Pause storm tracking
  2026-03-14  0:17 [PATCH ethtool-next 0/2] Pause storm tracking Mohsin Bashir
  2026-03-14  0:17 ` [PATCH ethtool-next 1/2] ethtool: Update pause stats struct Mohsin Bashir
  2026-03-14  0:17 ` [PATCH ethtool-next 2/2] ethtool: Update doc for tunable Mohsin Bashir
@ 2026-03-23 19:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-23 19:10 UTC (permalink / raw)
  To: Mohsin Bashir; +Cc: mkubecek, netdev, kuba, alexander.duyck

Hello:

This series was applied to ethtool/ethtool.git (next)
by Michal Kubecek <mkubecek@suse.cz>:

On Fri, 13 Mar 2026 17:17:35 -0700 you wrote:
> This series adds TX pause storm event tracking support and updates the
> documentation for the PFC storm prevention timeout tunable.
> 
> Mohsin Bashir (2):
>   ethtool: Update pause stats struct
>   ethtool: Update doc for tunable
> 
> [...]

Here is the summary with links:
  - [ethtool-next,1/2] ethtool: Update pause stats struct
    https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=582ce2791d19
  - [ethtool-next,2/2] ethtool: Update doc for tunable
    (no matching commit)

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-23 19:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-14  0:17 [PATCH ethtool-next 0/2] Pause storm tracking Mohsin Bashir
2026-03-14  0:17 ` [PATCH ethtool-next 1/2] ethtool: Update pause stats struct Mohsin Bashir
2026-03-14  0:17 ` [PATCH ethtool-next 2/2] ethtool: Update doc for tunable Mohsin Bashir
2026-03-23 19:10 ` [PATCH ethtool-next 0/2] Pause storm tracking patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox