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 7/16/2018 4:59 PM, Bart Van Assche wrote:
Instead of declaring and passing a dummy 'bad_wr' pointer, pass NULL
as third argument to ib_post_(send|recv|srq_recv)().

Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx>
Cc: Santosh Shilimkar <santosh.shilimkar@xxxxxxxxxx>
---
  net/rds/ib_frmr.c | 11 +++--------
  net/rds/ib_recv.c |  6 ++----
  2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c
index 48332a6ed738..09ab97475fc9 100644
--- a/net/rds/ib_frmr.c
+++ b/net/rds/ib_frmr.c
@@ -102,7 +102,6 @@ static void rds_ib_free_frmr(struct rds_ib_mr *ibmr, bool drop)
  static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)
  {
  	struct rds_ib_frmr *frmr = &ibmr->u.frmr;
-	struct ib_send_wr *failed_wr;
  	struct ib_reg_wr reg_wr;
  	int ret, off = 0;
@@ -135,9 +134,7 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)
  			IB_ACCESS_REMOTE_WRITE;
  	reg_wr.wr.send_flags = IB_SEND_SIGNALED;
- failed_wr = &reg_wr.wr;
-	ret = ib_post_send(ibmr->ic->i_cm_id->qp, &reg_wr.wr, &failed_wr);
-	WARN_ON(failed_wr != &reg_wr.wr);
+	ret = ib_post_send(ibmr->ic->i_cm_id->qp, &reg_wr.wr, NULL);

This was one way to find out if the post_send failed with intended
wr. WARN_ON(failed_wr != &reg_wr.wr). That dummy was just place
holder to copy the failed one into it.

Do we get same behavior with NULL Bart ? I guess not.

regards,
Santosh
--
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