net/mlx5: fix endianness in Tx completion queue
Completion queue entry data uses network endian, to access them we should use ntoh*(). Fixes: c305090bbaf8 ("net/mlx5: replace countdown with threshold for Tx completions") Reported-by: Liming Sun <lsun@mellanox.com> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit is contained in:
parent
fe5fe3820e
commit
e929f2a2cd
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user