[v2,4/5] event/cnxk: fix mempool cookies check
Checks
Commit Message
Fix for mempool cookies get mark to be done before
meta to mbuf processing.
Fixes: 7a709964d9bb ("net/cnxk: use NPA batch burst free for meta buffers")
Cc: stable@dpdk.org
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
Changes in v2: update in commit message for fixes and cc tag
drivers/event/cnxk/cn10k_worker.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--
2.25.1
@@ -22,9 +22,6 @@ cn10k_wqe_to_mbuf(uint64_t wqe, const uint64_t __mbuf, uint8_t port_id,
(flags & NIX_RX_OFFLOAD_TSTAMP_F ? 8 : 0);
struct rte_mbuf *mbuf = (struct rte_mbuf *)__mbuf;
- /* Mark mempool obj as "get" as it is alloc'ed by NIX */
- RTE_MEMPOOL_CHECK_COOKIES(mbuf->pool, (void **)&mbuf, 1, 1);
-
cn10k_nix_cqe_to_mbuf((struct nix_cqe_hdr_s *)wqe, tag,
(struct rte_mbuf *)mbuf, lookup_mem,
mbuf_init | ((uint64_t)port_id) << 48, flags);
@@ -166,6 +163,10 @@ cn10k_sso_hws_post_process(struct cn10k_sso_hws *ws, uint64_t *u64,
mbuf = u64[1] - sizeof(struct rte_mbuf);
rte_prefetch0((void *)mbuf);
+
+ /* Mark mempool obj as "get" as it is alloc'ed by NIX */
+ RTE_MEMPOOL_CHECK_COOKIES(((struct rte_mbuf *)mbuf)->pool, (void **)&mbuf, 1, 1);
+
if (flags & NIX_RX_OFFLOAD_SECURITY_F) {
const uint64_t mbuf_init =
0x100010000ULL | RTE_PKTMBUF_HEADROOM |