Re: [PATCH 04/17] RMDA/core: Introduce ib_scatterlist structure

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

 



On Mon, 2019-02-04 at 19:50 +-0200, Max Gurtovoy wrote:
+AD4 diff --git a/drivers/infiniband/ulp/srp/ib+AF8-srp.c b/drivers/infiniband/ulp/srp/ib+AF8-srp.c
+AD4 index 31d91538bbf4..fa56343aeb98 100644
+AD4 --- a/drivers/infiniband/ulp/srp/ib+AF8-srp.c
+AD4 +-+-+- b/drivers/infiniband/ulp/srp/ib+AF8-srp.c
+AD4 +AEAAQA -1511,15 +-1511,15 +AEAAQA static void srp+AF8-reg+AF8-mr+AF8-err+AF8-done(struct ib+AF8-cq +ACo-cq, struct ib+AF8-wc +ACo-wc)
+AD4  +AH0
+AD4  
+AD4  /+ACo
+AD4 - +ACo Map up to sg+AF8-nents elements of state-+AD4-sg where +ACo-sg+AF8-offset+AF8-p is the offset
+AD4 - +ACo where to start in the first element. If sg+AF8-offset+AF8-p +ACEAPQ NULL then
+AD4 - +ACo +ACo-sg+AF8-offset+AF8-p is updated to the offset in state-+AD4-sg+AFs-retval+AF0 of the first
+AD4 +- +ACo Map up to ib+AF8-sg-+AD4-dma+AF8-nents elements of state-+AD4-sg where ib+AF8-sg-+AD4-offset
+AD4 +- +ACo is the offset where to start in the first element. If ib+AF8-sg-+AD4-offset +ACEAPQ 0 then
+AD4 +- +ACo ib+AF8-sg-+AD4-offset is updated to the offset in state-+AD4-sg+AFs-retval+AF0 of the first
+AD4   +ACo byte that has not yet been mapped.
+AD4   +ACo-/

The above change modifies a correct comment into an incorrect comment. Since
this patch guarantees that +ACY-ib+AF8-sg-+AD4-offset +ACEAPQ NULL I think the references to
+ACY-ib+AF8-sg-+AD4-offset +AD0APQ NULL should be left out.

+AD4  	if (unlikely(n +ADw 0)) +AHs
+AD4  		srp+AF8-fr+AF8-pool+AF8-put(ch-+AD4-fr+AF8-pool, +ACY-desc, 1)+ADs
+AD4  		pr+AF8-debug(+ACIAJQ-s: ib+AF8-map+AF8-mr+AF8-sg(+ACU-d, +ACU-d) returned +ACU-d.+AFw-n+ACI,
+AD4 -			 dev+AF8-name(+ACY-req-+AD4-scmnd-+AD4-device-+AD4-sdev+AF8-gendev), sg+AF8-nents,
+AD4 -			 sg+AF8-offset+AF8-p ? +ACo-sg+AF8-offset+AF8-p : -1, n)+ADs
+AD4 +-			 dev+AF8-name(+ACY-req-+AD4-scmnd-+AD4-device-+AD4-sdev+AF8-gendev),
+AD4 +-			 ib+AF8-sg-+AD4-dma+AF8-nents, ib+AF8-sg-+AD4-offset ? : -1, n)+ADs

Same mistake here: you are changing sg+AF8-offset+AF8-p ? +ACo-sg+AF8-offset+AF8-p : -1 into the
following: +ACo-sg+AF8-offset+AF8-p ? +ACo-sg+AF8-offset+AF8-p : -1. These expressions are not
equivalent+ACE

+AD4 
+AD4 diff --git a/include/rdma/ib+AF8-verbs.h b/include/rdma/ib+AF8-verbs.h
+AD4 index 9044356e3bb7..f5d0df8d9fcb 100644
+AD4 --- a/include/rdma/ib+AF8-verbs.h
+AD4 +-+-+- b/include/rdma/ib+AF8-verbs.h
+AD4 +AEAAQA -2157,6 +-2157,18 +AEAAQA struct ib+AF8-counters+AF8-read+AF8-attr +AHs
+AD4  	u32	flags+ADs /+ACo use enum ib+AF8-read+AF8-counters+AF8-flags +ACo-/
+AD4  +AH0AOw
+AD4  
+AD4 +-/+ACo
+AD4 +- +ACo struct ib+AF8-scatterlist - Mapped scatterlist for RDMA operations
+AD4 +- +ACo +AEA-sg:        dma mapped sg list
+AD4 +- +ACo +AEA-dma+AF8-nents: returned by dma+AF8-map+AF8-sg
+AD4 +- +ACo +AEA-offset:    start offset in bytes into the first sg element
+AD4 +- +ACo-/
+AD4 +-struct ib+AF8-scatterlist +AHs
+AD4 +-	struct scatterlist	+ACo-sg+ADs
+AD4 +-	int			dma+AF8-nents+ADs
+AD4 +-	unsigned int		offset+ADs
+AD4 +-+AH0AOw

There is nothing in this data structure that is RDMA specific. Are you sure
the name +ACI-ib+AF8-scatterlist+ACI is a good choice?

Thanks,

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