Thread (7 messages) 7 messages, 3 authors, 14d ago

Re: [PATCH v2 net 2/3] net: udp_tunnel: convert state flags to atomic bitops

From: Eric Dumazet <edumazet@google.com>
Date: 2026-06-25 15:18:14

On Thu, Jun 25, 2026 at 8:08 AM Jakub Kicinski [off-list ref] wrote:
On Thu, 25 Jun 2026 06:59:37 +0000 Eric Dumazet wrote:
quoted
These flags can be modified concurrently from different contexts:
- RTNL-locked paths (like add_port/del_port) write to need_sync and
  work_pending.
These should hold utn->lock. Not sure why udp_tunnel_nic_lock()
is locking in the callers rather than directly in
__udp_tunnel_nic_add_port() / __udp_tunnel_nic_del_port()..
quoted
- The RTNL-less reset path (reset_ntf, used by netdevsim) writes to
  need_sync and need_replay under utn->lock.
I'd rather add asserts to confirm utn lock is held everywhere.
This code is hard enough to follow as is, without having to
think through potential concurrent accesses.
Ah ok, I will let you finish this, it seems I am wasting your time.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help