Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4a85c30 authored by Steve Wise's avatar Steve Wise Committed by Doug Ledford
Browse files

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: default avatarSteve Wise <swise@opengridcomputing.com>
Reviewed-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent fffb0383
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1353,6 +1353,7 @@ struct ib_mr *ib_get_dma_mr(struct ib_pd *pd, int mr_access_flags)
		mr->pd      = pd;
		mr->uobject = NULL;
		atomic_inc(&pd->usecnt);
		mr->need_inval = false;
	}

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

	return mr;
+1 −0
Original line number Diff line number Diff line
@@ -1446,6 +1446,7 @@ struct ib_mr {
	u64		   iova;
	u32		   length;
	unsigned int	   page_size;
	bool		   need_inval;
	union {
		struct ib_uobject	*uobject;	/* user */
		struct list_head	qp_entry;	/* FR */