Re: [PATCH v4 14/17] net/rds: Simplify ib_post_(send|recv|srq_recv)() calls

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

 



On Mon, 2018-07-16 at 17:20 -0700, Santosh Shilimkar wrote:
+AD4- On 7/16/2018 4:59 PM, Bart Van Assche wrote:
+AD4- +AD4- Instead of declaring and passing a dummy 'bad+AF8-wr' pointer, pass NULL
+AD4- +AD4- as third argument to ib+AF8-post+AF8-(send+AHw-recv+AHw-srq+AF8-recv)().
+AD4- +AD4- 
+AD4- +AD4- Signed-off-by: Bart Van Assche +ADw-bart.vanassche+AEA-wdc.com+AD4-
+AD4- +AD4- Cc: Santosh Shilimkar +ADw-santosh.shilimkar+AEA-oracle.com+AD4-
+AD4- +AD4- ---
+AD4- +AD4-   net/rds/ib+AF8-frmr.c +AHw- 11 +-+-+---------
+AD4- +AD4-   net/rds/ib+AF8-recv.c +AHw-  6 +-+-----
+AD4- +AD4-   2 files changed, 5 insertions(+-), 12 deletions(-)
+AD4- +AD4- 
+AD4- +AD4- diff --git a/net/rds/ib+AF8-frmr.c b/net/rds/ib+AF8-frmr.c
+AD4- +AD4- index 48332a6ed738..09ab97475fc9 100644
+AD4- +AD4- --- a/net/rds/ib+AF8-frmr.c
+AD4- +AD4- +-+-+- b/net/rds/ib+AF8-frmr.c
+AD4- +AD4- +AEAAQA- -102,7 +-102,6 +AEAAQA- static void rds+AF8-ib+AF8-free+AF8-frmr(struct rds+AF8-ib+AF8-mr +ACo-ibmr, bool drop)
+AD4- +AD4-   static int rds+AF8-ib+AF8-post+AF8-reg+AF8-frmr(struct rds+AF8-ib+AF8-mr +ACo-ibmr)
+AD4- +AD4-   +AHs-
+AD4- +AD4-   	struct rds+AF8-ib+AF8-frmr +ACo-frmr +AD0- +ACY-ibmr-+AD4-u.frmr+ADs-
+AD4- +AD4- -	struct ib+AF8-send+AF8-wr +ACo-failed+AF8-wr+ADs-
+AD4- +AD4-   	struct ib+AF8-reg+AF8-wr reg+AF8-wr+ADs-
+AD4- +AD4-   	int ret, off +AD0- 0+ADs-
+AD4- +AD4-   
+AD4- +AD4- +AEAAQA- -135,9 +-134,7 +AEAAQA- static int rds+AF8-ib+AF8-post+AF8-reg+AF8-frmr(struct rds+AF8-ib+AF8-mr +ACo-ibmr)
+AD4- +AD4-   			IB+AF8-ACCESS+AF8-REMOTE+AF8-WRITE+ADs-
+AD4- +AD4-   	reg+AF8-wr.wr.send+AF8-flags +AD0- IB+AF8-SEND+AF8-SIGNALED+ADs-
+AD4- +AD4-   
+AD4- +AD4- -	failed+AF8-wr +AD0- +ACY-reg+AF8-wr.wr+ADs-
+AD4- +AD4- -	ret +AD0- ib+AF8-post+AF8-send(ibmr-+AD4-ic-+AD4-i+AF8-cm+AF8-id-+AD4-qp, +ACY-reg+AF8-wr.wr, +ACY-failed+AF8-wr)+ADs-
+AD4- +AD4- -	WARN+AF8-ON(failed+AF8-wr +ACEAPQ- +ACY-reg+AF8-wr.wr)+ADs-
+AD4- +AD4- +-	ret +AD0- ib+AF8-post+AF8-send(ibmr-+AD4-ic-+AD4-i+AF8-cm+AF8-id-+AD4-qp, +ACY-reg+AF8-wr.wr, NULL)+ADs-
+AD4- 
+AD4- This was one way to find out if the post+AF8-send failed with intended
+AD4- wr. WARN+AF8-ON(failed+AF8-wr +ACEAPQ- +ACY-reg+AF8-wr.wr). That dummy was just place
+AD4- holder to copy the failed one into it.
+AD4- 
+AD4- Do we get same behavior with NULL Bart ? I guess not.

It's very easy to restore the WARN+AF8-ON(). But what makes you think that that
WARN+AF8-ON() statement is useful? The above ib+AF8-post+AF8-send() call posts a single
work request. So all that WARN+AF8-ON() statement does is veryfing whether the
RDMA transport driver implements the ib+AF8-post+AF8-send() API correctly. I don't
think that this is something that should be done by ULPs.

Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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