summaryrefslogtreecommitdiffstats
path: root/net/rds/rdma_transport.c
diff options
context:
space:
mode:
authorHåkon Bugge <haakon.bugge@oracle.com>2021-03-31 20:43:14 +0200
committerJason Gunthorpe <jgg@nvidia.com>2021-04-13 00:51:48 +0200
commit5aa54bd28ce2b066d82cdd515269b9d562bd6e66 (patch)
tree027b8877446b4c7af02cc319d231d32a754161ff /net/rds/rdma_transport.c
parentIB/cma: Introduce rdma_set_min_rnr_timer() (diff)
downloadlinux-5aa54bd28ce2b066d82cdd515269b9d562bd6e66.tar.xz
linux-5aa54bd28ce2b066d82cdd515269b9d562bd6e66.zip
rds: ib: Remove two ib_modify_qp() calls
For some HCAs, ib_modify_qp() is an expensive operation running virtualized. For both the active and passive side, the QP returned by the CM has the state set to RTS, so no need for this excess RTS -> RTS transition. With IB Core's ability to set the RNR Retry timer, we use this interface to shave off another ib_modify_qp(). Fixes: ec16227e1414 ("RDS/IB: Infiniband transport") Link: https://lore.kernel.org/r/1617216194-12890-3-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'net/rds/rdma_transport.c')
-rw-r--r--net/rds/rdma_transport.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c
index 5f741e51b4ba..a9e4ff948a7d 100644
--- a/net/rds/rdma_transport.c
+++ b/net/rds/rdma_transport.c
@@ -87,6 +87,7 @@ static int rds_rdma_cm_event_handler_cmn(struct rdma_cm_id *cm_id,
case RDMA_CM_EVENT_ADDR_RESOLVED:
rdma_set_service_type(cm_id, conn->c_tos);
+ rdma_set_min_rnr_timer(cm_id, IB_RNR_TIMER_000_32);
/* XXX do we need to clean up if this fails? */
ret = rdma_resolve_route(cm_id,
RDS_RDMA_RESOLVE_TIMEOUT_MS);