Skip to content

Commit d4a85c3

Browse files
Steve Wisedledford
authored andcommitted
IB/core: add a need_inval flag to struct ib_mr
This is the first step toward moving MR invalidation decisions to the core. It will be needed by the upcoming RW API. Signed-off-by: Steve Wise <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent fffb038 commit d4a85c3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

drivers/infiniband/core/verbs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,7 @@ struct ib_mr *ib_get_dma_mr(struct ib_pd *pd, int mr_access_flags)
13531353
mr->pd = pd;
13541354
mr->uobject = NULL;
13551355
atomic_inc(&pd->usecnt);
1356+
mr->need_inval = false;
13561357
}
13571358

13581359
return mr;
@@ -1399,6 +1400,7 @@ struct ib_mr *ib_alloc_mr(struct ib_pd *pd,
13991400
mr->pd = pd;
14001401
mr->uobject = NULL;
14011402
atomic_inc(&pd->usecnt);
1403+
mr->need_inval = false;
14021404
}
14031405

14041406
return mr;

include/rdma/ib_verbs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,7 @@ struct ib_mr {
14461446
u64 iova;
14471447
u32 length;
14481448
unsigned int page_size;
1449+
bool need_inval;
14491450
union {
14501451
struct ib_uobject *uobject; /* user */
14511452
struct list_head qp_entry; /* FR */

0 commit comments

Comments
 (0)