diff options
| author | Toke Høiland-Jørgensen <toke@redhat.com> | 2025-12-11 12:50:05 +0100 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-12-22 12:25:11 +0100 |
| commit | 5498227676303e3ffa9a3a46214af96bc3e81314 (patch) | |
| tree | a9b42fb881d7278ab1a3067f17f8100a350b2fe3 /scripts/basic/git@git.tavy.me:linux.git | |
| parent | 1e5a541420b8c6d87d88eb50b6b978cdeafee1c9 (diff) | |
net: openvswitch: Avoid needlessly taking the RTNL on vport destroy
The openvswitch teardown code will immediately call
ovs_netdev_detach_dev() in response to a NETDEV_UNREGISTER notification.
It will then start the dp_notify_work workqueue, which will later end up
calling the vport destroy() callback. This callback takes the RTNL to do
another ovs_netdev_detach_port(), which in this case is unnecessary.
This causes extra pressure on the RTNL, in some cases leading to
"unregister_netdevice: waiting for XX to become free" warnings on
teardown.
We can straight-forwardly avoid the extra RTNL lock acquisition by
checking the device flags before taking the lock, and skip the locking
altogether if the IFF_OVS_DATAPATH flag has already been unset.
Fixes: b07c26511e94 ("openvswitch: fix vport-netdev unregister")
Tested-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/20251211115006.228876-1-toke@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/basic/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
