summaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorHaggai Eran <haggaie@mellanox.com>2015-07-30 17:50:18 +0300
committerDoug Ledford <dledford@redhat.com>2015-08-30 15:48:22 -0400
commit067b171b8679f99e170feae2e1d2eae319736420 (patch)
treee5eadaddc00308d38bd2ed5ba5b92afa24a0f34c /include/rdma
parent15865e7dab62a58407f1b7decdafd89dd0a8b063 (diff)
downloadop-kernel-dev-067b171b8679f99e170feae2e1d2eae319736420.zip
op-kernel-dev-067b171b8679f99e170feae2e1d2eae319736420.tar.gz
IB/cm: Share listening CM IDs
Enabling network namespaces for RDMA CM will allow processes on different namespaces to listen on the same port. In order to leave namespace support out of the CM layer, this requires that multiple RDMA CM IDs will be able to share a single CM ID. This patch adds infrastructure to retrieve an existing listening ib_cm_id, based on its device and service ID, or create a new one if one does not already exist. It also adds a reference count for such instances (cm_id_private.listen_sharecount), and prevents cm_destroy_id from destroying a CM if it is still shared. See the relevant discussion [1]. [1] Re: [PATCH v3 for-next 05/13] IB/cm: Reference count ib_cm_ids http://www.spinics.net/lists/netdev/msg328860.html Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Haggai Eran <haggaie@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_cm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h
index 1b567bb..9cc496e 100644
--- a/include/rdma/ib_cm.h
+++ b/include/rdma/ib_cm.h
@@ -362,6 +362,10 @@ struct ib_cm_compare_data {
int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask,
struct ib_cm_compare_data *compare_data);
+struct ib_cm_id *ib_cm_insert_listen(struct ib_device *device,
+ ib_cm_handler cm_handler,
+ __be64 service_id);
+
struct ib_cm_req_param {
struct ib_sa_path_rec *primary_path;
struct ib_sa_path_rec *alternate_path;
OpenPOWER on IntegriCloud