diff options
author | Steve Wise <swise@opengridcomputing.com> | 2014-07-31 16:26:07 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-08-05 16:09:21 -0400 |
commit | d1e458fe671baf1e60afafc88bda090202a412f1 (patch) | |
tree | c5a7a47ff5c5db1c8d7b66f15e56242bb9bb162e /net | |
parent | 14a571a8ecc69feadce8973bd67090a7d0430123 (diff) |
svcrdma: remove rdma_create_qp() failure recovery logic
In svc_rdma_accept(), if rdma_create_qp() fails, there is useless
logic to try and call rdma_create_qp() again with reduced sge depths.
The assumption, I guess, was that perhaps the initial sge depths
chosen were too big. However they initial depths are selected based
on the rdma device attribute max_sge returned from ib_query_device().
If rdma_create_qp() fails, it would not be because the max_send_sge and
max_recv_sge values passed in exceed the device's max. So just remove
this code.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 06a5d9235107..374feb44afea 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -943,23 +943,8 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) | |||
943 | 943 | ||
944 | ret = rdma_create_qp(newxprt->sc_cm_id, newxprt->sc_pd, &qp_attr); | 944 | ret = rdma_create_qp(newxprt->sc_cm_id, newxprt->sc_pd, &qp_attr); |
945 | if (ret) { | 945 | if (ret) { |
946 | /* | 946 | dprintk("svcrdma: failed to create QP, ret=%d\n", ret); |
947 | * XXX: This is a hack. We need a xx_request_qp interface | 947 | goto errout; |
948 | * that will adjust the qp_attr's with a best-effort | ||
949 | * number | ||
950 | */ | ||
951 | qp_attr.cap.max_send_sge -= 2; | ||
952 | qp_attr.cap.max_recv_sge -= 2; | ||
953 | ret = rdma_create_qp(newxprt->sc_cm_id, newxprt->sc_pd, | ||
954 | &qp_attr); | ||
955 | if (ret) { | ||
956 | dprintk("svcrdma: failed to create QP, ret=%d\n", ret); | ||
957 | goto errout; | ||
958 | } | ||
959 | newxprt->sc_max_sge = qp_attr.cap.max_send_sge; | ||
960 | newxprt->sc_max_sge = qp_attr.cap.max_recv_sge; | ||
961 | newxprt->sc_sq_depth = qp_attr.cap.max_send_wr; | ||
962 | newxprt->sc_max_requests = qp_attr.cap.max_recv_wr; | ||
963 | } | 948 | } |
964 | newxprt->sc_qp = newxprt->sc_cm_id->qp; | 949 | newxprt->sc_qp = newxprt->sc_cm_id->qp; |
965 | 950 | ||