netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Sergey Ryazanov <ryazanov.s.a@gmail.com>
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 14:05:35 +0300	[thread overview]
Message-ID: <YKD8f7wP2EzUU7PX@unreal> (raw)
In-Reply-To: <CAHNKnsSM6dcMDnOOEo5zs6wdzdA1S43pMpB+rkKpuuBrBxj3pg@mail.gmail.com>

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.

Thanks

  reply	other threads:[~2021-05-16 11:06 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 [this message]
2021-05-16 13:47       ` Sergey Ryazanov
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=YKD8f7wP2EzUU7PX@unreal \
    --to=leon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=ryazanov.s.a@gmail.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).