aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe_qp.c
diff options
context:
space:
mode:
authoryonatanc <yonatanc@mellanox.com>2017-04-20 20:55:56 +0300
committerDoug Ledford <dledford@redhat.com>2017-04-21 10:45:02 -0400
commit4ed6ad1eb30e20baf819ae4090b7978519beb3a9 (patch)
treeb78c635bd1ad59fbf25d95f034a05d8f2e0911ed /drivers/infiniband/sw/rxe/rxe_qp.c
parentIB/rxe: Offload CRC calculation when possible (diff)
downloadlinux-dev-4ed6ad1eb30e20baf819ae4090b7978519beb3a9.tar.xz
linux-dev-4ed6ad1eb30e20baf819ae4090b7978519beb3a9.zip
IB/rxe: Cache dst in QP instead of getting it for each send
In RC QP there is no need to resolve the outgoing interface for each packet, as this does not change during QP life cycle. Instead cache the interface on the socket and use that one. This improves performance by 12% by sparing redundant calls to rxe_find_route. ib_send_bw -d rxe0 -x 1 -n 9000 -e -s $((1024 * 1024 )) -l 100 ---------------------------------------------------------------------------------------- | | bytes | iterations | BW peak[MB/sec] | BW average[MB/sec] | MsgRate[Mpps] | ---------------------------------------------------------------------------------------- | before | 1048576 | 9000 | inf | 551.21 | 0.000551 | | after | 1048576 | 9000 | inf | 615.54 | 0.000616 | ---------------------------------------------------------------------------------------- Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Yonatan Cohen <yonatanc@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_qp.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_qp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 3ad9b48212de..1a123edf555e 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -849,6 +849,14 @@ void rxe_qp_cleanup(struct rxe_pool_entry *arg)
qp->resp.mr = NULL;
}
+ if (qp_type(qp) == IB_QPT_RC) {
+ struct dst_entry *dst = NULL;
+
+ dst = sk_dst_get(qp->sk->sk);
+ if (dst)
+ dst_release(dst);
+ }
+
free_rd_atomic_resources(qp);
kernel_sock_shutdown(qp->sk, SHUT_RDWR);