summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2026-07-16 15:23:10 +0200
committerLeon Romanovsky <leon@kernel.org>2026-07-26 03:11:00 -0400
commitbca2c9d781bccb5103a1b22de0e3fc103fa5131a (patch)
tree7ec70b7e041f8ff4ee7f66c820e3609ef8be998b
parentc4ef67e5aa3e08637dcd6c3fd325c0938a428058 (diff)
downloadlinux-next-bca2c9d781bccb5103a1b22de0e3fc103fa5131a.tar.gz
linux-next-bca2c9d781bccb5103a1b22de0e3fc103fa5131a.zip
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>
-rw-r--r--Documentation/ABI/testing/configfs-rdma_cm4
-rw-r--r--drivers/infiniband/core/cma_configfs.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/configfs-rdma_cm b/Documentation/ABI/testing/configfs-rdma_cm
index 74f9506f42e7..739f7b6a1259 100644
--- a/Documentation/ABI/testing/configfs-rdma_cm
+++ b/Documentation/ABI/testing/configfs-rdma_cm
@@ -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
diff --git a/drivers/infiniband/core/cma_configfs.c b/drivers/infiniband/core/cma_configfs.c
index 891e52afb8f4..c389d4e37b6b 100644
--- a/drivers/infiniband/core/cma_configfs.c
+++ b/drivers/infiniband/core/cma_configfs.c
@@ -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);