RDMA/cma: Document that CM configfs cannot be net namespace scoped

Document the rdma_cm configfs limitation: configfs is global, so same-named
RDMA devices in different net namespaces cannot both be represented there.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20260716132316.1495242-10-jiri@resnulli.us
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
Jiri Pirko 2026-07-16 15:23:10 +02:00 committed by Leon Romanovsky
parent c4ef67e5aa
commit bca2c9d781
2 changed files with 8 additions and 0 deletions

View File

@ -12,6 +12,10 @@ Description: Interface is used to configure RDMA-cable HCAs in respect to
for this HCA has to be created:
mkdir -p /config/rdma_cm/<hca>
Note: configfs has no network namespace support, so this
interface cannot represent two devices that share a name in
different network namespaces (possible in exclusive netns mode).
What: /config/rdma_cm/<hca>/ports/<port-num>/default_roce_mode
Date: November 29, 2015

View File

@ -65,6 +65,10 @@ static struct cma_dev_port_group *to_dev_port_group(struct config_item *item)
return container_of(group, struct cma_dev_port_group, group);
}
/*
* configfs is not net namespace aware, so a name shared by devices in
* different namespaces resolves to the first match here.
*/
static bool filter_by_name(struct ib_device *ib_dev, void *cookie)
{
return !strcmp(dev_name(&ib_dev->dev), cookie);