summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorKommula Shiva Shankar <kshankar@marvell.com>2019-09-13 21:01:12 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-08 12:14:31 +0200
commitbd3e64cb1c38695fb410903feddd287046687271 (patch)
treeb78df7dd34b0856c0969f79d5edc2943b178b2af /drivers/net
parent0cb4150f82ff77e1c74826ae425f36388d9172fb (diff)
downloaddpdk-bd3e64cb1c38695fb410903feddd287046687271.zip
dpdk-bd3e64cb1c38695fb410903feddd287046687271.tar.gz
dpdk-bd3e64cb1c38695fb410903feddd287046687271.tar.xz
net/octeontx2: fix CQE ring prefetch on wrap around
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/octeontx2/otx2_rx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/octeontx2/otx2_rx.c b/drivers/net/octeontx2/otx2_rx.c
index 701efc8..48565db 100644
--- a/drivers/net/octeontx2/otx2_rx.c
+++ b/drivers/net/octeontx2/otx2_rx.c
@@ -61,7 +61,8 @@ nix_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
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);