From: Jiri Pirko <[email protected]>

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 <[email protected]>
---
 Documentation/ABI/testing/configfs-rdma_cm | 4 ++++
 drivers/infiniband/core/cma_configfs.c     | 4 ++++
 2 files changed, 8 insertions(+)

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);
-- 
2.54.0


Reply via email to