From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [Patch net] netns: avoid allocating idr when dumping info
Date: Fri, 27 Feb 2015 18:48:59 +0100 [thread overview]
Message-ID: <54F0AE0B.5080101@6wind.com> (raw)
In-Reply-To: <CAM_iQpUPQVodJRGmf=GYOVK+R_84w-+yDtqyHCJGbCDH0hb44A@mail.gmail.com>
Le 27/02/2015 18:28, Cong Wang a écrit :
> On Fri, Feb 27, 2015 at 8:25 AM, Nicolas Dichtel
> <nicolas.dichtel@6wind.com> wrote:
>> Le 27/02/2015 09:01, Eric Dumazet a écrit :
>>
>>> On Thu, 2015-02-26 at 22:32 -0800, Cong Wang wrote:
[snip]
>>>
>>> BTW, (void)peernet2id(dev_net(dev), src_net) can fail, and your fix is
>>> not complete anyway.
>>
>> That's true. The patch does not cover the following case:
>> ip link add foo type bar
>> ip link set foo netns netns1
>>
>> In this case, the second command will call dev_change_net_namespace() and
>> the
>> id will not be allocated.
>
> Then call it in do_setlink(). This is not a reason we _have to_
> allocate it in dumping.
Sure, but that just shows the 'over engineering' side ;-)
The reason to allocate it in dumping is that you need it in dumping, not before ;-)
next prev parent reply other threads:[~2015-02-27 17:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 6:32 [Patch net] netns: avoid allocating idr when dumping info Cong Wang
2015-02-27 8:01 ` Eric Dumazet
2015-02-27 16:25 ` Nicolas Dichtel
2015-02-27 16:55 ` Eric Dumazet
2015-02-27 17:07 ` [PATCH] net: do not use rcu in rtnl_dump_ifinfo() Eric Dumazet
2015-02-27 17:19 ` Daniel Borkmann
2015-02-27 17:40 ` Eric Dumazet
2015-02-27 18:35 ` Cong Wang
2015-02-27 17:42 ` [PATCH v2 net] " Eric Dumazet
2015-02-28 0:43 ` Jεan Sacren
2015-02-28 1:05 ` Eric Dumazet
2015-03-01 5:29 ` David Miller
2015-02-27 17:28 ` [Patch net] netns: avoid allocating idr when dumping info Cong Wang
2015-02-27 17:48 ` Nicolas Dichtel [this message]
2015-02-28 0:56 ` Cong Wang
2015-02-28 6:17 ` Cong Wang
2015-02-27 18:04 ` Eric Dumazet
2015-02-28 0:48 ` Cong Wang
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=54F0AE0B.5080101@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.