]> git.baikalelectronics.ru Git - kernel.git/commit
svcrdma: Consult max_qp_init_rd_atom when accepting connections
authorChuck Lever <chuck.lever@oracle.com>
Tue, 20 Mar 2018 21:05:15 +0000 (17:05 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 20 Mar 2018 21:32:13 +0000 (17:32 -0400)
commit70c2a8edde6a3dbdd4ca62e19b73c56402cb5dc2
treeb1fced80d372bc75600487c84d7fa86a472bcfc6
parent43f27e4ecc602fecedbddcdc6c89f8cd2a07014d
svcrdma: Consult max_qp_init_rd_atom when accepting connections

The target needs to return the lesser of the client's Inbound RDMA
Read Queue Depth (IRD), provided in the connection parameters, and
the local device's Outbound RDMA Read Queue Depth (ORD). The latter
limit is max_qp_init_rd_atom, not max_qp_rd_atom.

The svcrdma_ord value caps the ORD value for iWARP transports, which
do not exchange ORD/IRD values at connection time. Since no other
Linux kernel RDMA-enabled storage target sees fit to provide this
cap, I'm removing it here too.

initiator_depth is a u8, so ensure the computed ORD value does not
overflow that field.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
include/linux/sunrpc/svc_rdma.h
net/sunrpc/xprtrdma/svc_rdma.c
net/sunrpc/xprtrdma/svc_rdma_transport.c