[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52D88BA3.5010201@huawei.com>
Date: Fri, 17 Jan 2014 09:47:15 +0800
From: chenweilong <chenweilong@...wei.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: fix "queues" uevent between network namespaces
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@...wei.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@...wei.com>
>> Signed-off-by: Libo Chen <chenlibo@...wei.com>
>> Signed-off-by: Weilong Chen <chenweilong@...wei.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@...uxfoundation.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)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists