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 Signed-off-by: Mohsin Bashir --- 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