eth: fbnic: Add protection against pause storm
authorMohsin Bashir <mohsin.bashr@gmail.com>
Mon, 2 Mar 2026 23:01:47 +0000 (15:01 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 5 Mar 2026 15:26:52 +0000 (16:26 +0100)
commit9b7c8728f53a5652a5184651c7b78ed1587542a4
treef6ee6e62a5af0561267931a38e736289288e72be
parent817de93c348a3086ecca6e03ff459138832157cc
eth: fbnic: Add protection against pause storm

Add protection against TX pause storms. A pause storm occurs when a
device fails to send received packets up to the stack. When a pause
storm is detected (pause state persists beyond the configured timeout),
the device stops sending the pause frames and begins dropping packets
instead of back-pressuring.

The timeout is configurable via ethtool tunable (pfc-prevention-tout)
with a maximum value of 10485ms, and the default value of 500ms.

Once the device transitions to the storm-detected state, the service
task periodically attempts recovery, returning the device to normal
operation to handle any subsequent pause storm episodes.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
Link: https://patch.msgid.link/20260302230149.1580195-4-mohsin.bashr@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/meta/fbnic/fbnic.h
drivers/net/ethernet/meta/fbnic/fbnic_csr.h
drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c
drivers/net/ethernet/meta/fbnic/fbnic_irq.c
drivers/net/ethernet/meta/fbnic/fbnic_mac.c
drivers/net/ethernet/meta/fbnic/fbnic_mac.h
drivers/net/ethernet/meta/fbnic/fbnic_pci.c