From 111b26f2272015ba30ee234cda5368c99b64c0cc Mon Sep 17 00:00:00 2001 From: Artem Polyakov Date: Sat, 30 Sep 2017 21:16:46 +0300 Subject: [PATCH] tmp #2 --- src/uct/ib/dc/accel/dc_mlx5.c | 2 +- src/uct/ib/rc/accel/rc_mlx5_common.h | 8 +++++--- src/uct/ib/rc/accel/rc_mlx5_iface.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/uct/ib/dc/accel/dc_mlx5.c b/src/uct/ib/dc/accel/dc_mlx5.c index c669ea5b844..70c9594bcb7 100644 --- a/src/uct/ib/dc/accel/dc_mlx5.c +++ b/src/uct/ib/dc/accel/dc_mlx5.c @@ -530,7 +530,7 @@ static unsigned uct_dc_mlx5_iface_progress(uct_iface_h tl_iface) unsigned count; count = uct_rc_mlx5_iface_common_poll_rx(&iface->mlx5_common, - &iface->super.super); + &iface->super.super, 1); if (count > 0) { return count; } diff --git a/src/uct/ib/rc/accel/rc_mlx5_common.h b/src/uct/ib/rc/accel/rc_mlx5_common.h index 610e0d756ca..fbb56e3aff6 100644 --- a/src/uct/ib/rc/accel/rc_mlx5_common.h +++ b/src/uct/ib/rc/accel/rc_mlx5_common.h @@ -122,7 +122,7 @@ uct_rc_mlx5_iface_common_rx_inline(uct_rc_mlx5_iface_common_t *mlx5_iface, static UCS_F_ALWAYS_INLINE unsigned uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, - uct_rc_iface_t *rc_iface) + uct_rc_iface_t *rc_iface, int is_dc) { uct_ib_mlx5_srq_seg_t *seg; uct_ib_iface_recv_desc_t *desc; @@ -141,7 +141,9 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, ucs_assert(uct_ib_mlx5_srq_get_wqe(&mlx5_common_iface->rx.srq, mlx5_common_iface->rx.srq.mask)->srq.next_wqe_index == 0); - uct_rc_mlx5_srq_prefetch_first(mlx5_common_iface, rc_iface); + if (!is_dc) { + uct_rc_mlx5_srq_prefetch_first(mlx5_common_iface, rc_iface); + } cqe = uct_ib_mlx5_poll_cq(&rc_iface->super, &mlx5_common_iface->rx.cq); if (cqe == NULL) { @@ -161,7 +163,7 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, /* Get a pointer to AM header (after which comes the payload) * Support cases of inline scatter by pointing directly to CQE. */ - if (cqe->op_own & MLX5_INLINE_SCATTER_32) { + if (!is_dc && (cqe->op_own & MLX5_INLINE_SCATTER_32)) { hdr = (uct_rc_hdr_t*)(cqe); uct_rc_mlx5_iface_common_rx_inline(mlx5_common_iface, rc_iface, desc, UCT_RC_MLX5_IFACE_STAT_RX_INL_32, byte_len); diff --git a/src/uct/ib/rc/accel/rc_mlx5_iface.c b/src/uct/ib/rc/accel/rc_mlx5_iface.c index 987391d19d9..0c666053d98 100644 --- a/src/uct/ib/rc/accel/rc_mlx5_iface.c +++ b/src/uct/ib/rc/accel/rc_mlx5_iface.c @@ -76,7 +76,7 @@ unsigned uct_rc_mlx5_iface_progress(void *arg) uct_rc_mlx5_iface_t *iface = arg; unsigned count; - count = uct_rc_mlx5_iface_common_poll_rx(&iface->mlx5_common, &iface->super); + count = uct_rc_mlx5_iface_common_poll_rx(&iface->mlx5_common, &iface->super, 0); if (count > 0) { return count; }