Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] net: add retry mechanism to ndo_set_rx_mode_async
@ 2026-06-03 22:35 Stanislav Fomichev
  2026-06-03 22:35 ` [PATCH net-next v2 1/3] net: change ndo_set_rx_mode_async return type to int Stanislav Fomichev
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stanislav Fomichev @ 2026-06-03 22:35 UTC (permalink / raw)
  To: netdev; +Cc: davem, edumazet, kuba, pabeni, Zijing Yin

Original async ndo_set_rx_mode work left one place where we do netdev_WARN
in response to a ENOMEM. The intent was to see whether actual real
users can hit that (adding uc/mc under memory pressure seems like a
very unlikely thing to do). However, it was quickly triggered by
syzbot's failslab. Add a retry mechanism and downgrade netdev_WARN
to netdev_err. The retry logic is a typical exponential backoff:
1, 2, 4, 8 seconds, 15 in total, hopefully enough for a system to resolve
memory pressure.

Link: https://lore.kernel.org/netdev/20260416185712.2155425-1-sdf@fomichev.me/
Link: https://lore.kernel.org/netdev/20260519095557.3749407-1-yzjaurora@gmail.com/
Cc: Zijing Yin <yzjaurora@gmail.com>

v2:
- rx_mode_retry_work -> rx_mode_retry_timer (Jakub)
- (ulong) rx_mode_retry_delay -> (uint) rx_mode_retry_count (Jakub)
- remove dev_get/put (Jakub)
- drop fwd decl (Jakub)
- move comment about total retires to NETIF_RX_MODE_RETRY_MAX (Jakub)
- use -EAGAIN in bnxt to signal retry (Michael)

Stanislav Fomichev (3):
  net: change ndo_set_rx_mode_async return type to int
  net: add retry mechanism to ndo_set_rx_mode_async
  bnxt: convert to core rx_mode retry mechanism

 drivers/infiniband/ulp/ipoib/ipoib_main.c     |  9 ++--
 drivers/net/dummy.c                           |  7 +--
 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 38 +++++--------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  2 -
 drivers/net/ethernet/intel/iavf/iavf_main.c   | 10 ++--
 .../net/ethernet/mellanox/mlx5/core/en_main.c |  8 +--
 .../net/ethernet/meta/fbnic/fbnic_netdev.c    |  8 +--
 drivers/net/netdevsim/netdev.c                |  7 +--
 drivers/net/netkit.c                          |  7 +--
 include/linux/netdevice.h                     | 16 ++++--
 net/core/dev.c                                |  4 +-
 net/core/dev.h                                |  2 +
 net/core/dev_addr_lists.c                     | 53 ++++++++++++++++++-
 13 files changed, 114 insertions(+), 57 deletions(-)

-- 
2.53.0-Meta


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

end of thread, other threads:[~2026-06-05 16:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 22:35 [PATCH net-next v2 0/3] net: add retry mechanism to ndo_set_rx_mode_async Stanislav Fomichev
2026-06-03 22:35 ` [PATCH net-next v2 1/3] net: change ndo_set_rx_mode_async return type to int Stanislav Fomichev
2026-06-03 22:35 ` [PATCH net-next v2 2/3] net: add retry mechanism to ndo_set_rx_mode_async Stanislav Fomichev
2026-06-05  2:00   ` Jakub Kicinski
2026-06-05  2:01   ` Jakub Kicinski
2026-06-05 16:21     ` Stanislav Fomichev
2026-06-03 22:35 ` [PATCH net-next v2 3/3] bnxt: convert to core rx_mode retry mechanism Stanislav Fomichev
2026-06-04 17:47   ` Michael Chan
2026-06-05 16:21     ` Stanislav Fomichev

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