diff --git a/src/uct/ib/rc/accel/rc_mlx5_common.h b/src/uct/ib/rc/accel/rc_mlx5_common.h index d7aca95c3a4..d72642107f9 100644 --- a/src/uct/ib/rc/accel/rc_mlx5_common.h +++ b/src/uct/ib/rc/accel/rc_mlx5_common.h @@ -112,7 +112,6 @@ 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, char have_scat_to_cqe) { - uct_ib_mlx5_srq_seg_t *seg = NULL; uct_ib_iface_recv_desc_t *desc = NULL; uct_rc_iface_ops_t *rc_ops; uct_rc_hdr_t *hdr; @@ -141,7 +140,8 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface, byte_len = ntohl(cqe->byte_cnt); wqe_ctr = ntohs(cqe->wqe_counter); - desc = mlx5_common_iface->rx.desc[wqe_ctr] & (~0x1L); + desc = (uct_ib_iface_recv_desc_t*) + (mlx5_common_iface->rx.desc[wqe_ctr] & (~0x1L)); /* Get a pointer to AM header (after which comes the payload) * Support cases of inline scatter by pointing directly to CQE.