Skip to content

Commit

Permalink
event/cnxk: fix mbuf offset calculation
Browse files Browse the repository at this point in the history
[ upstream commit 9b70a94 ]

Fix incorrect mbuf offset calculation when HEADROOM exceeds 128B
while processing event vectors.

Fixes: 7fbbc98 ("event/cnxk: support vectorized Rx event fast path")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
  • Loading branch information
PavanNikhilesh authored and kevintraynor committed Nov 23, 2022
1 parent 40f8ea7 commit 80dfbeb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/cnxk/cn10k_rx.h
Expand Up @@ -636,9 +636,11 @@ cn10k_nix_recv_pkts_vector(void *args, struct rte_mbuf **mbufs, uint16_t pkts,
mbuf23 = vqsubq_u64(mbuf23, data_off);
} else {
mbuf01 =
vsubq_u64(vld1q_u64((uint64_t *)cq0), data_off);
mbuf23 = vsubq_u64(vld1q_u64((uint64_t *)(cq0 + 16)),
data_off);
vsubq_u64(vld1q_u64((uint64_t *)cq0),
vdupq_n_u64(sizeof(struct rte_mbuf)));
mbuf23 =
vsubq_u64(vld1q_u64((uint64_t *)(cq0 + 16)),
vdupq_n_u64(sizeof(struct rte_mbuf)));
}

/* Move mbufs to scalar registers for future use */
Expand Down

0 comments on commit 80dfbeb

Please sign in to comment.