[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJX8fQXCqRcuaTw1VN+dOh5oURtYBW=Ag3=GpeLBPFWXw@mail.gmail.com>
Date: Tue, 5 Nov 2024 11:18:48 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>, Marc Kleine-Budde <mkl@...gutronix.de>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>, Daniel Borkmann <daniel@...earbox.net>,
Nikolay Aleksandrov <razor@...ckwall.org>, Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v1 net-next 2/8] rtnetlink: Factorise rtnl_link_get_net_tb().
On Tue, Nov 5, 2024 at 3:06 AM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> In ops->newlink(), veth, vxcan, and netkit call rtnl_link_get_net() with
> a net pointer, which is the first argument of ->newlink().
>
> rtnl_link_get_net() could return another netns based on IFLA_NET_NS_PID
> and IFLA_NET_NS_FD in the peer device's attributes.
>
> We want to get it and fill rtnl_nets->nets[] in advance.
>
> Let's factorise the peer netns part from rtnl_link_get_net().
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists