diff options
| author | Chuck Lever <chuck.lever@oracle.com> | 2018-10-01 14:26:35 -0400 |
|---|---|---|
| committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2018-10-03 14:02:01 -0400 |
| commit | 61c208a5ca94c526143830253d56de6fdb95edc2 (patch) | |
| tree | a2eaf7155d488bebd9897bb00e4de503bbe7a50d | |
| parent | 512ccfb61a9b7281345992620c73ffed20272526 (diff) | |
xprtrdma: Report when there were zero posted Receives
To show that a caller did attempt to allocate and post more Receive
buffers, the trace point in rpcrdma_post_recvs() should report when
rpcrdma_post_recvs() was invoked but no new Receive buffers were
posted.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| -rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index cfaab5e31277..3ddba94c939f 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
| @@ -1521,9 +1521,11 @@ rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, bool temp) | |||
| 1521 | struct ib_recv_wr *wr, *bad_wr; | 1521 | struct ib_recv_wr *wr, *bad_wr; |
| 1522 | int needed, count, rc; | 1522 | int needed, count, rc; |
| 1523 | 1523 | ||
| 1524 | rc = 0; | ||
| 1525 | count = 0; | ||
| 1524 | needed = buf->rb_credits + (buf->rb_bc_srv_max_requests << 1); | 1526 | needed = buf->rb_credits + (buf->rb_bc_srv_max_requests << 1); |
| 1525 | if (buf->rb_posted_receives > needed) | 1527 | if (buf->rb_posted_receives > needed) |
| 1526 | return; | 1528 | goto out; |
| 1527 | needed -= buf->rb_posted_receives; | 1529 | needed -= buf->rb_posted_receives; |
| 1528 | 1530 | ||
| 1529 | count = 0; | 1531 | count = 0; |
| @@ -1559,7 +1561,7 @@ rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, bool temp) | |||
| 1559 | --needed; | 1561 | --needed; |
| 1560 | } | 1562 | } |
| 1561 | if (!count) | 1563 | if (!count) |
| 1562 | return; | 1564 | goto out; |
| 1563 | 1565 | ||
| 1564 | rc = ib_post_recv(r_xprt->rx_ia.ri_id->qp, wr, | 1566 | rc = ib_post_recv(r_xprt->rx_ia.ri_id->qp, wr, |
| 1565 | (const struct ib_recv_wr **)&bad_wr); | 1567 | (const struct ib_recv_wr **)&bad_wr); |
| @@ -1573,5 +1575,6 @@ rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, bool temp) | |||
| 1573 | } | 1575 | } |
| 1574 | } | 1576 | } |
| 1575 | buf->rb_posted_receives += count; | 1577 | buf->rb_posted_receives += count; |
| 1578 | out: | ||
| 1576 | trace_xprtrdma_post_recvs(r_xprt, count, rc); | 1579 | trace_xprtrdma_post_recvs(r_xprt, count, rc); |
| 1577 | } | 1580 | } |
