From 606152107bbdbc0e21f25e0d15ef2787a4ab90fd Mon Sep 17 00:00:00 2001 From: Leon Romanovsky Date: Wed, 28 Nov 2018 13:16:43 +0200 Subject: RDMA/restrack: Track ucontext Add ability to track allocated ib_ucontext, which are limited resource and worth to be visible by users. Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford --- include/rdma/ib_verbs.h | 4 ++++ include/rdma/restrack.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'include/rdma') diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 92633c15125b..85021451eee0 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1505,6 +1505,10 @@ struct ib_ucontext { #endif struct ib_rdmacg_object cg_obj; + /* + * Implementation details of the RDMA core, don't use in drivers: + */ + struct rdma_restrack_entry res; }; struct ib_uobject { diff --git a/include/rdma/restrack.h b/include/rdma/restrack.h index 2638fa7cd702..f34aa96e4518 100644 --- a/include/rdma/restrack.h +++ b/include/rdma/restrack.h @@ -38,6 +38,10 @@ enum rdma_restrack_type { * @RDMA_RESTRACK_MR: Memory Region (MR) */ RDMA_RESTRACK_MR, + /** + * @RDMA_RESTRACK_CTX: Verbs contexts (CTX) + */ + RDMA_RESTRACK_CTX, /** * @RDMA_RESTRACK_MAX: Last entry, used for array dclarations */ -- cgit v1.2.3