When computing the head of CQE ring of prefetch, use qmask to point to
the correct head index on wrap around case.
Fixes:
cc4d7693f2d9 ("net/octeontx2: support Rx")
Cc: stable@dpdk.org
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
while (packets < nb_pkts) {
/* Prefetch N desc ahead */
- rte_prefetch_non_temporal((void *)(desc + (CQE_SZ(head + 2))));
+ rte_prefetch_non_temporal((void *)(desc +
+ (CQE_SZ((head + 2) & qmask))));
cq = (struct nix_cqe_hdr_s *)(desc + CQE_SZ(head));
mbuf = nix_get_mbuf_from_cqe(cq, data_off);