[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHNKnsRrpSJtEVwjTV8dNLmmMFH+H0AmF=+22HVy39mMquNe8Q@mail.gmail.com>
Date: Sun, 16 May 2021 16:47:23 +0300
From: Sergey Ryazanov <ryazanov.s.a@...il.com>
To: Leon Romanovsky <leon@...nel.org>
Cc: Jakub Kicinski <kuba@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
"list@...ke-m.de:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
Nicolas Dichtel <nicolas.dichtel@...nd.com>
Subject: Re: [PATCH net] netns: export get_net_ns_by_id()
Hello Leon,
On Sun, May 16, 2021 at 2:05 PM Leon Romanovsky <leon@...nel.org> wrote:
> On Fri, May 14, 2021 at 11:52:51PM +0300, Sergey Ryazanov wrote:
> > On Fri, May 14, 2021 at 10:14 PM Jakub Kicinski <kuba@...nel.org> wrote:
> > > On Thu, 13 May 2021 00:29:56 +0300 Sergey Ryazanov wrote:
> > > > No one loadable module is able to obtain netns by id since the
> > > > corresponding function has not been exported. Export it to be able to
> > > > use netns id API in loadable modules too as already done for
> > > > peernet2id_alloc().
> > >
> > > peernet2id_alloc() is used by OvS, what's the user for get_net_ns_by_id()?
> >
> > There are currently no active users of get_net_ns_by_id(), that is why
> > I did not add a "Fix" tag. Missed function export does not break
> > existing code in any way.
>
> It is against kernel rule to do not expose APIs, even internal to the kernel,
> without real users. There are many patches every cycle that remove such EXPORT_*()s.
>
> EXPORT_*() creates extra entries in Module.symvers and can be seen as unnecessary
> namespace pollution.
Ok, I got it. Maintainers do not like uncontrollable API experiments
:) I have no more arguments and I give up. Jakub, please drop this
patch.
BTW, for those who might be interested in experimenting with netnsid.
I found another way to search netns by its id without the kernel
rebuild. get_net_ns_by_id() is a simple container for the idr_found()
invocation, which is wrapped with the RCU lock. So it is no big deal
to implement this function locally to a module.
--
Sergey
Powered by blists - more mailing lists