DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rahul Bhansali <rbhansali@marvell.com>
To: <dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>,
	"Shijith Thotton" <sthotton@marvell.com>,
	Jerin Jacob <jerinj@marvell.com>,
	"Nithin Dabilpuram" <ndabilpuram@marvell.com>
Cc: Rahul Bhansali <rbhansali@marvell.com>, <stable@dpdk.org>
Subject: [PATCH v2 4/5] event/cnxk: fix mempool cookies check
Date: Thu, 18 May 2023 21:19:01 +0530	[thread overview]
Message-ID: <20230518154902.2254743-4-rbhansali@marvell.com> (raw)
In-Reply-To: <20230518154902.2254743-1-rbhansali@marvell.com>

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(-)

diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
index 06c71c6092..1e519d8156 100644
--- a/drivers/event/cnxk/cn10k_worker.h
+++ b/drivers/event/cnxk/cn10k_worker.h
@@ -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 |
--
2.25.1


  parent reply	other threads:[~2023-05-18 15:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 10:40 [PATCH 1/5] common/cnxk: fix IPsec IPv6 tunnel address byte swap Rahul Bhansali
2023-04-25 10:40 ` [PATCH 2/5] event/cnxk: set Rx offload flags Rahul Bhansali
2023-04-25 10:40 ` [PATCH 3/5] event/cnxk: fix Tx adapter data pointer Rahul Bhansali
2023-04-25 10:40 ` [PATCH 4/5] event/cnxk: fix mempool cookies check Rahul Bhansali
2023-04-25 10:40 ` [PATCH 5/5] net/cnxk: add mempool check for frag attach Rahul Bhansali
2023-05-18  6:31 ` [PATCH 1/5] common/cnxk: fix IPsec IPv6 tunnel address byte swap Jerin Jacob
2023-05-18 15:48 ` [PATCH v2 " Rahul Bhansali
2023-05-18 15:48   ` [PATCH v2 2/5] event/cnxk: set Rx offload flags Rahul Bhansali
2023-05-18 15:49   ` [PATCH v2 3/5] event/cnxk: fix Tx adapter data pointer Rahul Bhansali
2023-05-18 15:49   ` Rahul Bhansali [this message]
2023-05-18 15:49   ` [PATCH v2 5/5] net/cnxk: add mempool check for frag attach Rahul Bhansali
2023-05-22 13:14     ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230518154902.2254743-4-rbhansali@marvell.com \
    --to=rbhansali@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=stable@dpdk.org \
    --cc=sthotton@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).