]> git.ipfire.org Git - thirdparty/linux.git/commit
net: add retry mechanism to ndo_set_rx_mode_async
authorStanislav Fomichev <sdf.kernel@gmail.com>
Mon, 8 Jun 2026 15:40:13 +0000 (08:40 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 10 Jun 2026 01:15:30 +0000 (18:15 -0700)
commitd90b85c23b3d64cc58a2bc59ceda6f6aa4df9ea3
tree8aded6b3e030939df1ea3f905dd2a34d90a8817a
parentd11706b56a3f738a93bb2af8e94d6fab506e81b6
net: add retry mechanism to ndo_set_rx_mode_async

When ndo_set_rx_mode_async returns an error, schedule a retry with
exponential backoff (1s, 2s, 4s, 8s -- 15s total). Give up after the
4th retry and log an error via netdev_err().

This moves retry logic from individual drivers into the core stack.

Timer callback does not hold a ref on dev. Safe because the timer can
only be armed when dev is IFF_UP, and __dev_close_many runs
timer_delete_sync before clearing IFF_UP. Unregister always closes
IFF_UP devices first, so by the time dev can be freed the timer is
dead and cannot be re-armed.

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20260608154014.227538-3-sdf@fomichev.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netdevice.h
net/core/dev.c
net/core/dev.h
net/core/dev_addr_lists.c