netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Patrick McHardy <kaber@trash.net>,
	stephen hemminger <stephen@networkplumber.org>,
	Cong Wang <cwang@twopensource.com>
Subject: Re: [Patch net-next] net: make neigh tables per netns
Date: Wed, 25 Jun 2014 17:22:32 -0700	[thread overview]
Message-ID: <CAM_iQpVeVpcQLPz7GDuni_v5+bJikQkc2cSzrKee72eGuOecDQ@mail.gmail.com> (raw)
In-Reply-To: <87d2dwsfh6.fsf@x220.int.ebiederm.org>

On Wed, Jun 25, 2014 at 5:04 PM, Eric W. Biederman
<ebiederm@xmission.com> wrote:
> Cong Wang <xiyou.wangcong@gmail.com> writes:
>
>> From: Cong Wang <cwang@twopensource.com>
>>
>> Different net namespaces have different devices, routes, neighbours,
>> so their neigh table should be separated as well.
>
> This justification doesn't work.  Neighbour entries are per network
> device which are already per network device.

I knew, this is why I never say I am fixing a bug. I just don't see the
point of holding all such entries in one big table. Routing tables
are already separated.

>
> The only thing I see that you can gain by this work is getting around
> global limits on neighbor table size.  Something that I think is most
> unwise.

Yes, this is one the benefits.

>
> We may want a smarter limits infrastructure as it is possible to DOS one
> interface by hitting the global neigh table limit on other interfaces.
> That problem really isn't a network namespace problem except that with
> network namespaces you typically have more interfaces and can see the
> problem more easily.
>
>> This patch makes
>> gloable arp_tbl and nd_tbl etc. be per netns.
>
>> Also, as we don't support multiple tables per family, there is no
>> point to make tables chained by linked list, they can just be
>> statically compiled. This will eliminate the global neigh_tbl_lock.
>
> There might to this lock removal, but mixing the lock removal in with
> everything else winds up with extra noise, and code that looks
> suspiciously messy.
>
> At the very least neigh_tbl_lock today protects against rmmod decnet
> and rmmod ipv6, which while unlikely can oops they kernel if they aren't
> handled carefully.  So it definitely feels inappropriate to mush these
> all together.

At module exit, we should call unregister_pernet_subsys(), where
each ->exit() will called.

>
> If your goal is to deal with the issue of the limited set of neighbour
> limits say so and let's look at that problem.
>
> If your goal is just to kill neigh_tbl_lock please take that to a
> separate patch where the pros and cons can be weighed, and people can
> focus on the issue.
>

Neither.

> As it stands this patch does too much, and seems to do nothing except
> bypass controls on global kernel memory consumption.
>

I agree it's too big, I can split it into two if you want. One for removing
neigh_tbl_lock, one for making it per netns.

Thanks.

  reply	other threads:[~2014-06-26  0:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 22:09 [Patch net-next] net: make neigh tables per netns Cong Wang
2014-06-25 23:33 ` David Miller
2014-06-26  0:04 ` Eric W. Biederman
2014-06-26  0:22   ` Cong Wang [this message]
2014-06-26  1:17     ` Eric W. Biederman
2014-06-26  6:14       ` Michal Kubecek
2014-06-26 12:10         ` Eric W. Biederman
2014-06-26 20:43       ` David Miller
     [not found]         ` <87egybibh5.fsf@x220.int.ebiederm.org>
2014-06-26 22:44           ` David Miller
2014-06-28  0:09             ` Cong Wang
2014-06-28  5:12               ` Eric W. Biederman
2014-06-30 18:15                 ` Jesper Dangaard Brouer
2014-06-30 18:54                   ` Hannes Frederic Sowa
2014-11-04 15:49                     ` Stéphane Graber

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=CAM_iQpVeVpcQLPz7GDuni_v5+bJikQkc2cSzrKee72eGuOecDQ@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=cwang@twopensource.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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).