[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABAhCOS3BC+spLNrb_P8Ovzo18BwHU6UEc6Aq80_YKUoc8rfMQ@mail.gmail.com>
Date: Fri, 21 Feb 2025 15:34:27 +0800
From: Xiao Liang <shaw.leon@...il.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: alex.aring@...il.com, andrew+netdev@...n.ch,
b.a.t.m.a.n@...ts.open-mesh.org, bpf@...r.kernel.org, bridge@...ts.linux.dev,
davem@...emloft.net, donald.hunter@...il.com, dsahern@...nel.org,
edumazet@...gle.com, herbert@...dor.apana.org.au, horms@...nel.org,
kuba@...nel.org, linux-can@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-ppp@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-wireless@...r.kernel.org,
linux-wpan@...r.kernel.org, miquel.raynal@...tlin.com, netdev@...r.kernel.org,
osmocom-net-gprs@...ts.osmocom.org, pabeni@...hat.com, shuah@...nel.org,
stefan@...enfreihafen.org, steffen.klassert@...unet.com,
wireguard@...ts.zx2c4.com
Subject: Re: [PATCH net-next v10 07/13] net: ipv6: Init tunnel link-netns
before registering dev
On Fri, Feb 21, 2025 at 12:07 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> From: Xiao Liang <shaw.leon@...il.com>
> Date: Wed, 19 Feb 2025 20:50:33 +0800
> > Currently some IPv6 tunnel drivers set tnl->net to dev_net(dev) in
> > ndo_init(), which is called in register_netdevice(). However, it lacks
> > the context of link-netns when we enable cross-net tunnels at device
> > registration time.
> >
> > Let's move the init of tunnel link-netns before register_netdevice().
> >
> > ip6_gre has already initialized netns, so just remove the redundant
> > assignment.
> >
> > Signed-off-by: Xiao Liang <shaw.leon@...il.com>
>
> Reviewed-by: Kuniyuki Iwashima <kuniyu@...zon.com>
>
> left a small comment, but not a blocker.
>
>
> > @@ -1565,6 +1565,7 @@ static int ipip6_newlink(struct net_device *dev,
> > int err;
> >
> > nt = netdev_priv(dev);
> > + nt->net = net;
>
> This hunk is not necessary as we'll call ipip6_tunnel_locate(),
> but it's harmless and not worth reposting the whole series given
> we are alredy in v10. You can just post a follow-up patch after
> the series is applied.
Seems ipip6_tunnel_locate() only sets netns for newly created
devices (for ioctl). ipip6_newlink() is calling it to check for
conflicts, so we might need this line.
Thanks for your review!
Powered by blists - more mailing lists