[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABAhCORyjkagq=PBy2YOXSwF8yu9dT5bFGKkgGaNikqVSHxDjQ@mail.gmail.com>
Date: Wed, 23 Oct 2024 12:36:04 +0800
From: Xiao Liang <shaw.leon@...il.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com,
idosch@...dia.com, kuba@...nel.org, netdev@...r.kernel.org, pabeni@...hat.com
Subject: Re: [PATCH net-next 2/5] rtnetlink: Add netns_atomic flag in rtnl_link_ops
On Wed, Oct 23, 2024 at 12:03 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> From: Xiao Liang <shaw.leon@...il.com>
> Date: Wed, 23 Oct 2024 10:31:43 +0800
> > Currently these two steps are needed to create a net device with
> > IFLA_LINK_NETNSID attr:
> >
> > 1. create and setup the netdev in the link netns with
> > rtnl_create_link()
> > 2. move it to the target netns with dev_change_net_namespace()
>
> IIRC, this is to send the notification in the link netns.
>
Yes. This patch changes this behavior only when the new flag is set.
I doubt if it's really necessary to send link create/delete notifications
to link-netns. Also the current behavior is somewhat inconsistent, say
1) ip link add netns n1 link-netns n2 link eth0 mac0 type macvlan
2) ip -n n2 link add netns n1 link eth0 mac0 type macvlan
Intuitively, the two commands are equivalent. But notification is sent
only for 1.
Powered by blists - more mailing lists