From: Sergey Ryazanov <ryazanov.s.a@gmail.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Jakub Kicinski <kuba@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
"list@hauke-m.de:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: Re: [PATCH net] netns: export get_net_ns_by_id()
Date: Sun, 16 May 2021 16:47:23 +0300 [thread overview]
Message-ID: <CAHNKnsRrpSJtEVwjTV8dNLmmMFH+H0AmF=+22HVy39mMquNe8Q@mail.gmail.com> (raw)
In-Reply-To: <YKD8f7wP2EzUU7PX@unreal>
Hello Leon,
On Sun, May 16, 2021 at 2:05 PM Leon Romanovsky <leon@kernel.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@kernel.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
next prev parent reply other threads:[~2021-05-16 13:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 21:29 [PATCH net] netns: export get_net_ns_by_id() Sergey Ryazanov
2021-05-14 19:14 ` Jakub Kicinski
2021-05-14 20:52 ` Sergey Ryazanov
2021-05-16 11:05 ` Leon Romanovsky
2021-05-16 13:47 ` Sergey Ryazanov [this message]
2021-05-17 7:18 ` Nicolas Dichtel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHNKnsRrpSJtEVwjTV8dNLmmMFH+H0AmF=+22HVy39mMquNe8Q@mail.gmail.com' \
--to=ryazanov.s.a@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).