Re: [PATCH] rdma: not display the rdma link in other net namespace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在 2022/10/7 14:21, Leon Romanovsky 写道:
On Thu, Oct 06, 2022 at 01:23:05PM -0300, Jason Gunthorpe wrote:
On Thu, Oct 06, 2022 at 07:21:39PM +0300, Leon Romanovsky wrote:

And in exclusive mode, a rdma link that can not be accessed in net namespace
A still

appears in net namespace A when running "rdma link show" in net namespace A.

The above is different from others in net namespace.

For example, in net namespace, if net device NIC0 is moved to net namespace
B from net namespace A,

this NIC0 will not appear in net namespace A when running "ip link" command
in net namespace A.

Is it a problem?
rdmatool presents IB devices. It has no logic that decides if that
device is usable/operable or not.
It should really not report an IB device that is not in the net
namespace..
It is kernel (nldev.c) job to hide such IB devices and it seems like it
does. For devices with help of ib_enum_all_devs() and for links with
ib_device_get_by_index().

Thanks, Jason and Leon

I am working on it. I will send the patch out very soon.

Zhu Yanjun


They both checks netns - rdma_dev_access_netns(device, net).

Thanks



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux