[PATCH net-next v2 0/2] Allow disabling pause frames on panic

Florian Fainelli posted 2 patches 1 month, 2 weeks ago
There is a newer version of this series
Documentation/ABI/testing/sysfs-class-net     | 16 ++++
.../net/ethernet/broadcom/genet/bcmgenet.c    |  8 ++
.../net/ethernet/broadcom/genet/bcmgenet.h    |  1 +
drivers/net/ethernet/broadcom/genet/bcmmii.c  | 10 +++
include/linux/ethtool.h                       |  3 +
include/linux/netdevice.h                     |  1 +
net/core/net-sysfs.c                          | 34 ++++++++
net/ethernet/Makefile                         |  3 +-
net/ethernet/pause_panic.c                    | 81 +++++++++++++++++++
9 files changed, 156 insertions(+), 1 deletion(-)
create mode 100644 net/ethernet/pause_panic.c
[PATCH net-next v2 0/2] Allow disabling pause frames on panic
Posted by Florian Fainelli 1 month, 2 weeks ago
This patch set allows disabling pause frame generation upon encountering
a kernel panic. This has proven to be helpful in lab environments where
devices are still being worked on, will panic for various reasons, and
will occasionally take down the entire Ethernet switch they are attached
to.

Changes in v2:

- introduce a dedicated callback that runs in panic context

Florian Fainelli (2):
  net: ethernet: Allow disabling pause on panic
  net: bcmgenet: Add support for set_pauseparam_panic

 Documentation/ABI/testing/sysfs-class-net     | 16 ++++
 .../net/ethernet/broadcom/genet/bcmgenet.c    |  8 ++
 .../net/ethernet/broadcom/genet/bcmgenet.h    |  1 +
 drivers/net/ethernet/broadcom/genet/bcmmii.c  | 10 +++
 include/linux/ethtool.h                       |  3 +
 include/linux/netdevice.h                     |  1 +
 net/core/net-sysfs.c                          | 34 ++++++++
 net/ethernet/Makefile                         |  3 +-
 net/ethernet/pause_panic.c                    | 81 +++++++++++++++++++
 9 files changed, 156 insertions(+), 1 deletion(-)
 create mode 100644 net/ethernet/pause_panic.c

-- 
2.34.1
Re: [PATCH net-next v2 0/2] Allow disabling pause frames on panic
Posted by Jakub Kicinski 1 month, 2 weeks ago
On Tue,  4 Nov 2025 14:13:46 -0800 Florian Fainelli wrote:
> This patch set allows disabling pause frame generation upon encountering
> a kernel panic. This has proven to be helpful in lab environments where
> devices are still being worked on, will panic for various reasons, and
> will occasionally take down the entire Ethernet switch they are attached to.

FWIW this still feels like a hack to work around having broken switches
to me :( Not sure how to stomach having a sysfs knob for every netdev on
the planet for one lab with cheap switches..

If anyone else has similar problems please speak up?
Re: [PATCH net-next v2 0/2] Allow disabling pause frames on panic
Posted by Florian Fainelli 1 month, 1 week ago
On 11/4/25 15:57, Jakub Kicinski wrote:
> On Tue,  4 Nov 2025 14:13:46 -0800 Florian Fainelli wrote:
>> This patch set allows disabling pause frame generation upon encountering
>> a kernel panic. This has proven to be helpful in lab environments where
>> devices are still being worked on, will panic for various reasons, and
>> will occasionally take down the entire Ethernet switch they are attached to.
> 
> FWIW this still feels like a hack to work around having broken switches
> to me :( Not sure how to stomach having a sysfs knob for every netdev on
> the planet for one lab with cheap switches..

That's understandable, we have seen it with any sort of Ethernet 
adapter, GENET is the one that we have the most deployed, but we have 
seen that with Asix USB Ethernet dongles happen, which is why this made 
me look for a common solution, rather than a driver specific solution.

> 
> If anyone else has similar problems please speak up?


-- 
Florian