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(). They both checks netns - rdma_dev_access_netns(device, net). Thanks