From: chenweilong <chenweilong@huawei.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: fix "queues" uevent between network namespaces
Date: Fri, 17 Jan 2014 09:47:15 +0800 [thread overview]
Message-ID: <52D88BA3.5010201@huawei.com> (raw)
In-Reply-To: <20140116161912.GB7476@kroah.com>
On 2014/1/17 0:19, Greg KH wrote:
> On Thu, Jan 16, 2014 at 05:24:31PM +0800, Chen Weilong wrote:
>> From: Weilong Chen <chenweilong@huawei.com>
>>
>> When I create a new namespace with 'ip netns add net0', or add/remove
>> new links in a namespace with 'ip link add/delete type veth', rx/tx
>> queues events can be got in all namespaces. That is because rx/tx queue
>> ktypes do not have namespace support, and their kobj parents are setted to
>> NULL. This patch is to fix it.
>>
>> Reported-by: Libo Chen <chenlibo@huawei.com>
>> Signed-off-by: Libo Chen <chenlibo@huawei.com>
>> Signed-off-by: Weilong Chen <chenweilong@huawei.com>
>> ---
>> lib/kobject_uevent.c | 10 ++++++++--
>> net/core/net-sysfs.c | 26 ++++++++++++++++++++++++++
>> 2 files changed, 34 insertions(+), 2 deletions(-)
>
> I can't test this, but it looks good to me:
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
>
Hi,
Here's detail about the test, I hope it can be useful:
step1: create two netns
suse11-sp3:~ # ip netns add net0
suse11-sp3:~ # ip netns add net1
suse11-sp3:~ # ip netns list
net1
net0
setp2: monitor udev events
Term1:
suse11-sp3:~ # ip netns exec net0 udevadm monitor
Term2:
suse11-sp3:~ # ip netns exec net1 udevadm monitor
setp3: add link to net0
suse11-sp3:~ # ip netns exec net0 ip link add type veth
Then you'll see the below events in net0 and net1.
KERNEL[1389972662.984988] add /devices/virtual/net/veth0/queues/rx-0 (queues)
KERNEL[1389972662.985008] add /devices/virtual/net/veth0/queues/tx-0 (queues)
KERNEL[1389972662.985234] add /devices/virtual/net/veth1/queues/rx-0 (queues)
KERNEL[1389972662.985247] add /devices/virtual/net/veth1/queues/tx-0 (queues)
next prev parent reply other threads:[~2014-01-17 1:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 9:24 [PATCH] net: fix "queues" uevent between network namespaces Chen Weilong
2014-01-16 16:19 ` Greg KH
2014-01-17 1:47 ` chenweilong [this message]
2014-01-20 4:04 ` David Miller
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=52D88BA3.5010201@huawei.com \
--to=chenweilong@huawei.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=netdev@vger.kernel.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 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.