Skip to contentSkip to conversation

Does rtnl_lock inhibit incoming traffic?

DISCUSSION Oliver Hartkopp 2 participants 2 messages May 29, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

AFAIK the rtnl_lock is used (at least) to protect the configuration of netdevices and routing tables.

Is the reception of incoming traffic inhibited while the rtnl_lock is set, or would i need to protect the data structures to be modified with an additional spinlock_bh() / write_lock_bh()?

Like this one here:

http://lxr.linux.no/#linux+v3.9.4/net/ipv6/ip6mr.c#L1573

Regards,
Oliver

#1 lore raw
Quoted 5 lines · Oliver Hartkopp

Hello,

AFAIK the rtnl_lock is used (at least) to protect the configuration of netdevices and routing tables.

Quoted 7 lines

Is the reception of incoming traffic inhibited while the rtnl_lock is set, or would i need to protect the data structures to be modified with an additional spinlock_bh() / write_lock_bh()?

Like this one here:

http://lxr.linux.no/#linux+v3.9.4/net/ipv6/ip6mr.c#L1573

Reception of incoming traffic is not inhibited by rtnl.

And spinlock_bh()/write_lock_bh() only disable current cpu from receiving frames, but other cpus can still handle incoming traffic.