Hi Bart, I love your patch! Perhaps something to improve: [auto build test WARNING on next-20180706] [cannot apply to linus/master linux-sof-driver/master net-next/master v4.18-rc3 v4.18-rc2 v4.18-rc1 v4.18-rc3] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Bart-Van-Assche/IB-iser-Inline-two-work-request-conversion-functions/20180707-071148 config: i386-randconfig-x011-201826 (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): net/sunrpc/xprtrdma/verbs.c: In function 'rpcrdma_post_recvs': >> net/sunrpc/xprtrdma/verbs.c:1565:11: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] for (wr = bad_wr; wr; wr = wr->next) { ^ vim +/const +1565 net/sunrpc/xprtrdma/verbs.c c56c65fb \"Talpey, Thomas\ 2007-09-10 1508 f531a5db Chuck Lever 2015-10-24 1509 /** 7c8d9e7c Chuck Lever 2018-05-04 1510 * rpcrdma_post_recvs - Maybe post some Receive buffers 7c8d9e7c Chuck Lever 2018-05-04 1511 * @r_xprt: controlling transport 7c8d9e7c Chuck Lever 2018-05-04 1512 * @temp: when true, allocate temp rpcrdma_rep objects f531a5db Chuck Lever 2015-10-24 1513 * f531a5db Chuck Lever 2015-10-24 1514 */ 7c8d9e7c Chuck Lever 2018-05-04 1515 void 7c8d9e7c Chuck Lever 2018-05-04 1516 rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, bool temp) f531a5db Chuck Lever 2015-10-24 1517 { 7c8d9e7c Chuck Lever 2018-05-04 1518 struct rpcrdma_buffer *buf = &r_xprt->rx_buf; ce348e69 Bart Van Assche 2018-07-06 1519 struct ib_recv_wr *wr; ce348e69 Bart Van Assche 2018-07-06 1520 const struct ib_recv_wr *bad_wr; 7c8d9e7c Chuck Lever 2018-05-04 1521 int needed, count, rc; 7c8d9e7c Chuck Lever 2018-05-04 1522 7c8d9e7c Chuck Lever 2018-05-04 1523 needed = buf->rb_credits + (buf->rb_bc_srv_max_requests << 1); 7c8d9e7c Chuck Lever 2018-05-04 1524 if (buf->rb_posted_receives > needed) 7c8d9e7c Chuck Lever 2018-05-04 1525 return; 7c8d9e7c Chuck Lever 2018-05-04 1526 needed -= buf->rb_posted_receives; 7c8d9e7c Chuck Lever 2018-05-04 1527 7c8d9e7c Chuck Lever 2018-05-04 1528 count = 0; 7c8d9e7c Chuck Lever 2018-05-04 1529 wr = NULL; 7c8d9e7c Chuck Lever 2018-05-04 1530 while (needed) { 7c8d9e7c Chuck Lever 2018-05-04 1531 struct rpcrdma_regbuf *rb; f531a5db Chuck Lever 2015-10-24 1532 struct rpcrdma_rep *rep; f531a5db Chuck Lever 2015-10-24 1533 7c8d9e7c Chuck Lever 2018-05-04 1534 spin_lock(&buf->rb_lock); 7c8d9e7c Chuck Lever 2018-05-04 1535 rep = list_first_entry_or_null(&buf->rb_recv_bufs, 7c8d9e7c Chuck Lever 2018-05-04 1536 struct rpcrdma_rep, rr_list); 7c8d9e7c Chuck Lever 2018-05-04 1537 if (likely(rep)) 7c8d9e7c Chuck Lever 2018-05-04 1538 list_del(&rep->rr_list); 7c8d9e7c Chuck Lever 2018-05-04 1539 spin_unlock(&buf->rb_lock); 7c8d9e7c Chuck Lever 2018-05-04 1540 if (!rep) { 7c8d9e7c Chuck Lever 2018-05-04 1541 if (rpcrdma_create_rep(r_xprt, temp)) 7c8d9e7c Chuck Lever 2018-05-04 1542 break; 7c8d9e7c Chuck Lever 2018-05-04 1543 continue; 7c8d9e7c Chuck Lever 2018-05-04 1544 } f531a5db Chuck Lever 2015-10-24 1545 7c8d9e7c Chuck Lever 2018-05-04 1546 rb = rep->rr_rdmabuf; 7c8d9e7c Chuck Lever 2018-05-04 1547 if (!rpcrdma_regbuf_is_mapped(rb)) { 7c8d9e7c Chuck Lever 2018-05-04 1548 if (!__rpcrdma_dma_map_regbuf(&r_xprt->rx_ia, rb)) { 7c8d9e7c Chuck Lever 2018-05-04 1549 rpcrdma_recv_buffer_put(rep); 7c8d9e7c Chuck Lever 2018-05-04 1550 break; 7c8d9e7c Chuck Lever 2018-05-04 1551 } f531a5db Chuck Lever 2015-10-24 1552 } f531a5db Chuck Lever 2015-10-24 1553 7c8d9e7c Chuck Lever 2018-05-04 1554 trace_xprtrdma_post_recv(rep->rr_recv_wr.wr_cqe); 7c8d9e7c Chuck Lever 2018-05-04 1555 rep->rr_recv_wr.next = wr; 7c8d9e7c Chuck Lever 2018-05-04 1556 wr = &rep->rr_recv_wr; 7c8d9e7c Chuck Lever 2018-05-04 1557 ++count; 7c8d9e7c Chuck Lever 2018-05-04 1558 --needed; 7c8d9e7c Chuck Lever 2018-05-04 1559 } 7c8d9e7c Chuck Lever 2018-05-04 1560 if (!count) 7c8d9e7c Chuck Lever 2018-05-04 1561 return; f531a5db Chuck Lever 2015-10-24 1562 7c8d9e7c Chuck Lever 2018-05-04 1563 rc = ib_post_recv(r_xprt->rx_ia.ri_id->qp, wr, &bad_wr); 7c8d9e7c Chuck Lever 2018-05-04 1564 if (rc) { 7c8d9e7c Chuck Lever 2018-05-04 @1565 for (wr = bad_wr; wr; wr = wr->next) { :::::: The code at line 1565 was first introduced by commit :::::: 7c8d9e7c8863905951d4eaa7a8d277150f3a37f7 xprtrdma: Move Receive posting to Receive handler :::::: TO: Chuck Lever <chuck.lever@xxxxxxxxxx> :::::: CC: Anna Schumaker <Anna.Schumaker@xxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip