Message ID | 20241018012225.90409-2-kuniyu@amazon.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ipv4: Convert RTM_{NEW,DEL}ADDR and more to per-netns RTNL. | expand |
On Fri, Oct 18, 2024 at 3:23 AM Kuniyuki Iwashima <kuniyu@amazon.com> wrote: > > We will push RTNL down to each doit() as rtnl_net_lock(). > > We can use RTNL_FLAG_DOIT_UNLOCKED to call doit() without RTNL, but doit() > will still hold RTNL. > > Let's define RTNL_FLAG_DOIT_PERNET as an alias of RTNL_FLAG_DOIT_UNLOCKED. > > Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Eric Dumazet <edumazet@google.com>
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index bb49c5708ce7..3fa9da93364b 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h @@ -11,6 +11,7 @@ typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *); enum rtnl_link_flags { RTNL_FLAG_DOIT_UNLOCKED = BIT(0), +#define RTNL_FLAG_DOIT_PERNET RTNL_FLAG_DOIT_UNLOCKED RTNL_FLAG_BULK_DEL_SUPPORTED = BIT(1), RTNL_FLAG_DUMP_UNLOCKED = BIT(2), RTNL_FLAG_DUMP_SPLIT_NLM_DONE = BIT(3), /* legacy behavior */
We will push RTNL down to each doit() as rtnl_net_lock(). We can use RTNL_FLAG_DOIT_UNLOCKED to call doit() without RTNL, but doit() will still hold RTNL. Let's define RTNL_FLAG_DOIT_PERNET as an alias of RTNL_FLAG_DOIT_UNLOCKED. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> --- include/net/rtnetlink.h | 1 + 1 file changed, 1 insertion(+)