Re: [PATCH 02/18] RDMA/core: Save the MR type in the ib_mr structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2019-03-07 at 20:02 +-0200, Max Gurtovoy wrote:
+AD4 This is a preparation for the signature verbs API change. This change is
+AD4 needed since the MR type will define, in the upcoming patches, the need
+AD4 for allocating internal resources in LLD for signature handover related
+AD4 operations. It will also help to make sure that signature related
+AD4 functions are called with an appropriate MR type and fail otherwise.
+AD4 
+AD4 Signed-off-by: Max Gurtovoy +ADw-maxg+AEA-mellanox.com+AD4
+AD4 Signed-off-by: Israel Rukshin +ADw-israelr+AEA-mellanox.com+AD4
+AD4 Reviewed-by: Sagi Grimberg +ADw-sagi+AEA-grimberg.me+AD4
+AD4 ---
+AD4  drivers/infiniband/core/uverbs+AF8-cmd.c +AHw 1 +-
+AD4  drivers/infiniband/core/verbs.c      +AHw 1 +-
+AD4  include/rdma/ib+AF8-verbs.h              +AHw 1 +-
+AD4  3 files changed, 3 insertions(+-)
+AD4 
+AD4 diff --git a/drivers/infiniband/core/uverbs+AF8-cmd.c b/drivers/infiniband/core/uverbs+AF8-cmd.c
+AD4 index 3317300ab036..72c5a8daf558 100644
+AD4 --- a/drivers/infiniband/core/uverbs+AF8-cmd.c
+AD4 +-+-+- b/drivers/infiniband/core/uverbs+AF8-cmd.c
+AD4 +AEAAQA -737,6 +-737,7 +AEAAQA static int ib+AF8-uverbs+AF8-reg+AF8-mr(struct uverbs+AF8-attr+AF8-bundle +ACo-attrs)
+AD4  
+AD4  	mr-+AD4-device  +AD0 pd-+AD4-device+ADs
+AD4  	mr-+AD4-pd      +AD0 pd+ADs
+AD4 +-	mr-+AD4-type    +AD0 IB+AF8-MR+AF8-TYPE+AF8-MEM+AF8-REG+ADs
+AD4  	mr-+AD4-dm	    +AD0 NULL+ADs
+AD4  	mr-+AD4-uobject +AD0 uobj+ADs
+AD4  	atomic+AF8-inc(+ACY-pd-+AD4-usecnt)+ADs
+AD4 diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
+AD4 index ac011836bb54..4588b933d4b4 100644
+AD4 --- a/drivers/infiniband/core/verbs.c
+AD4 +-+-+- b/drivers/infiniband/core/verbs.c
+AD4 +AEAAQA -1992,6 +-1992,7 +AEAAQA struct ib+AF8-mr +ACo-ib+AF8-alloc+AF8-mr(struct ib+AF8-pd +ACo-pd,
+AD4  		mr-+AD4-need+AF8-inval +AD0 false+ADs
+AD4  		mr-+AD4-res.type +AD0 RDMA+AF8-RESTRACK+AF8-MR+ADs
+AD4  		rdma+AF8-restrack+AF8-kadd(+ACY-mr-+AD4-res)+ADs
+AD4 +-		mr-+AD4-type +AD0 mr+AF8-type+ADs
+AD4  	+AH0
+AD4  
+AD4  	return mr+ADs
+AD4 diff --git a/include/rdma/ib+AF8-verbs.h b/include/rdma/ib+AF8-verbs.h
+AD4 index f89b521245ec..42a9e297c21f 100644
+AD4 --- a/include/rdma/ib+AF8-verbs.h
+AD4 +-+-+- b/include/rdma/ib+AF8-verbs.h
+AD4 +AEAAQA -1695,6 +-1695,7 +AEAAQA struct ib+AF8-mr +AHs
+AD4  	u64		   iova+ADs
+AD4  	u64		   length+ADs
+AD4  	unsigned int	   page+AF8-size+ADs
+AD4 +-	enum ib+AF8-mr+AF8-type	   type+ADs
+AD4  	bool		   need+AF8-inval+ADs
+AD4  	union +AHs
+AD4  		struct ib+AF8-uobject	+ACo-uobject+ADs	/+ACo user +ACo-/

How about +AF8AXw-ib+AF8-alloc+AF8-pd() and UVERBS+AF8-HANDLER(UVERBS+AF8-METHOD+AF8-DM+AF8-MR+AF8-REG)()?
I think those functions also create a memory region. Shouldn't mr-+AD4-type
be initialized from these functions too?

Bart.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux