DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Amiya Ranjan Mohakud <amiyaranjan.mohakud@gmail.com>
To: ndabilpuram@marvell.com, kirankumark@marvell.com,
	skori@marvell.com, skoteshwar@marvell.com, hkalra@marvell.com
Cc: asekhar@marvell.com, dev@dpdk.org, stable@dpdk.org,
	Amiya Ranjan Mohakud <amiyaranjan.mohakud@gmail.com>
Subject: [PATCH] common/cnxk: fix duplicate mbox alloc in NPA aura pool init
Date: Fri,  4 Sep 2026 14:51:57 +0530	[thread overview]
Message-ID: <20260904092157.51040-1-amiyaranjan.mohakud@gmail.com> (raw)

npa_aura_pool_init() allocates the pool init mbox message twice on
non-CN20K platforms. The if/else block at line 106-111 allocates via
the model-specific branch, but the original unconditional allocation
at line 112 was not removed when the CN20K branch was added. This
overwrites pool_init_req, and the orphaned first message is sent to
the AF with uninitialized aura_id, ctype, and op fields, which can
trigger any undesired behavior on CN10K.

Remove the duplicate allocation.

Fixes: 143a419edf35 ("common/cnxk: use new NPA aq enq mbox for CN20K")
Cc: asekhar@marvell.com
Cc: stable@dpdk.org

Signed-off-by: Amiya Ranjan Mohakud <amiyaranjan.mohakud@gmail.com>
---
 drivers/common/cnxk/roc_npa.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index 4a3e96a97a..87f7637e9f 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -110,7 +110,6 @@ npa_aura_pool_init(struct mbox *m_box, uint32_t aura_id, struct npa_aura_s *aura
 	} else {
 		pool_init_req = mbox_alloc_msg_npa_aq_enq(mbox);
 	}
-	pool_init_req = mbox_alloc_msg_npa_aq_enq(mbox);
 	if (pool_init_req == NULL)
 		goto exit;
 	pool_init_req->aura_id = aura_id;
-- 
2.39.5 (Apple Git-154)


             reply	other threads:[~2026-09-04  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  9:21 Amiya Ranjan Mohakud [this message]
2026-09-09 10:56 ` [PATCH] common/cnxk: fix duplicate mbox alloc in NPA aura pool init Amiya Ranjan Mohakud
2026-09-09 11:39   ` Amiya Ranjan Mohakud

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=20260904092157.51040-1-amiyaranjan.mohakud@gmail.com \
    --to=amiyaranjan.mohakud@gmail.com \
    --cc=asekhar@marvell.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=stable@dpdk.org \
    /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