Skip to content

Commit

Permalink
fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
artpol84 committed Sep 29, 2017
1 parent 47697c9 commit d7b2349
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/uct/ib/rc/accel/rc_mlx5_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef struct uct_rc_mlx5_iface_common {
struct {
uct_ib_mlx5_cq_t cq;
uct_ib_mlx5_srq_t srq;
uct_ib_iface_recv_desc_t **desc;
uint64_t *desc;
} rx;
UCS_STATS_NODE_DECLARE(stats);
} uct_rc_mlx5_iface_common_t;
Expand Down Expand Up @@ -141,7 +141,7 @@ 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] & (~(uct_ib_iface_recv_desc_t *)0x1);
desc = 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.
Expand Down Expand Up @@ -193,13 +193,13 @@ uct_rc_mlx5_iface_common_poll_rx(uct_rc_mlx5_iface_common_t *mlx5_common_iface,
if (status != UCS_OK) {
udesc = (char*)desc + rc_iface->super.config.rx_headroom_offset;
uct_recv_desc(udesc) = &rc_iface->super.release_desc;
mlx5_common_iface->rx.desc[wqe_ctr] = NULL;
mlx5_common_iface->rx.desc[wqe_ctr] = 0;
}
if (wqe_ctr == ((mlx5_common_iface->rx.srq.free_idx + 1) & mlx5_common_iface->rx.srq.mask)) {
++mlx5_common_iface->rx.srq.free_idx;
} else {
/* Mark the segment as out-of-order, post_recv will advance free */
mlx5_common_iface->rx.desc[wqe_ctr] |= 1;
mlx5_common_iface->rx.desc[wqe_ctr] |= 0x1L;
}
}

Expand Down

0 comments on commit d7b2349

Please sign in to comment.