From 27e038e556e0e77f6ddb3756c5f7e83402a860f1 Mon Sep 17 00:00:00 2001 From: Yossi Itigin Date: Sun, 29 Aug 2021 21:39:01 +0300 Subject: [PATCH] RC/MLX5: Don't send keepalive if already have outstanding operations --- src/uct/ib/rc/accel/rc_mlx5_iface.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/uct/ib/rc/accel/rc_mlx5_iface.c b/src/uct/ib/rc/accel/rc_mlx5_iface.c index e784ab931cc..ce8082e2a80 100644 --- a/src/uct/ib/rc/accel/rc_mlx5_iface.c +++ b/src/uct/ib/rc/accel/rc_mlx5_iface.c @@ -173,6 +173,10 @@ uct_rc_mlx5_common_ka_progress(uct_rc_mlx5_iface_common_t *iface) ucs_spin_lock(&iface->super.ep_list_lock); ucs_list_for_each(ep, &iface->super.ep_list, super.list) { + if (ep->super.txqp.available < ep->tx.wq.bb_max) { + /* have outstanding operations */ + continue; + } ucs_trace("send keepalive grant on ep %p", ep); uct_rc_ep_fc_send_grant(&ep->super); }