net/mlx5: do not invalidate title CQE
[dpdk.git] / drivers / net / mlx5 / mlx5_rxtx.c
index b31b33b..63146ac 100644 (file)
@@ -199,7 +199,7 @@ txq_complete(struct txq *txq)
        } while (1);
        if (unlikely(cqe == NULL))
                return;
-       wqe = &(*txq->wqes)[htons(cqe->wqe_counter) &
+       wqe = &(*txq->wqes)[ntohs(cqe->wqe_counter) &
                            ((1 << txq->wqe_n) - 1)].hdr;
        elts_tail = wqe->ctrl[3];
        assert(elts_tail < (1 << txq->wqe_n));
@@ -1160,7 +1160,7 @@ mlx5_rx_poll_len(struct rxq *rxq, volatile struct mlx5_cqe *cqe,
                        zip->na += 8;
                }
                if (unlikely(rxq->zip.ai == rxq->zip.cqe_cnt)) {
-                       uint16_t idx = rxq->cq_ci;
+                       uint16_t idx = rxq->cq_ci + 1;
                        uint16_t end = zip->cq_ci;
 
                        while (idx != end) {