[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191221081406.GB2246@nanopsycho.orion>
Date: Sat, 21 Dec 2019 09:14:06 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: David Ahern <dsahern@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
jakub.kicinski@...ronome.com, saeedm@...lanox.com, leon@...nel.org,
tariqt@...lanox.com, ayal@...lanox.com, vladbu@...lanox.com,
michaelgur@...lanox.com, moshe@...lanox.com, mlxsw@...lanox.com
Subject: Re: [patch net-next 0/4] net: allow per-net notifier to follow
netdev into namespace
Fri, Dec 20, 2019 at 07:30:22PM CET, dsahern@...il.com wrote:
>On 12/20/19 5:35 AM, Jiri Pirko wrote:
>> However if netdev can change namespace, per-net notifier cannot be used.
>> Introduce dev_net variant that is basically per-net notifier with an
>> extension that re-registers the per-net notifier upon netdev namespace
>> change. Basically the per-net notifier follows the netdev into
>> namespace.
>
>This is getting convoluted.
>
>If the driver wants notifications in a new namespace, then it should
>register for notifiers in the new namespace. The info for
>NETDEV_UNREGISTER event could indicate the device is getting moved to a
>new namespace and the driver register for notifications in the new
Yes, I considered this option. However, that would lead to having a pair
of notifier block struct for every registration and basically the same
tracking code would be implemented in every driver.
That is why i chose this implementation where there is still one
notifier block structure and the core takes care of the tracking for
all.
>namespace. If the drivers are trying to be efficient wrt to
>notifications then it will need to unregister when all netdevices leave
>a namespace which it means it has work to do on namespace changes.
Powered by blists - more mailing lists