common/cnxk: fix duplicate mbox alloc in NPA aura pool init
PATCH 1/1 common/cnxk: fix duplicate mbox alloc in NPA aura pool init
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.
--- drivers/common/cnxk/roc_npa.c | 1 - 1 file changed, 1 deletion(-)
drivers/common/cnxk/roc_npa.c +0 -1
@@ -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;
Signature · 1 line
2.39.5 (Apple Git-154)
Recheck-request: iol-intel-Performance
Thanks
Amiya
Quoted 36 lines · Amiya Ranjan Mohakud
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 overwritespool_init_req, and the orphaned first message is sent to the AF with uninitializedaura_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")Signed-off-by Amiya Ranjan Mohakud <[email protected]>--- drivers/common/cnxk/roc_npa.c | 1 - 1 file changed, 1 deletion(-)drivers/common/cnxk/roc_npa.c +0
-0@@ -110,7 +110,6 @@ npa_aura_pool_init(struct mbox *m_box, uint32_t
aura_id, structnpa_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)
Hi Team
The change-set has no relation to the intel performance test which is failing. Could someone pls guide on how to get rid of this, get it reviewed and merged?
Thanks
Amiya
Quoted 45 lines · Amiya Ranjan Mohakud
Recheck-request: iol-intel-Performance
Thanks
AmiyaQuoted 36 lines · Amiya Ranjan Mohakud
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 overwritespool_init_req, and the orphaned first message is sent to the AF with uninitializedaura_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")Signed-off-by Amiya Ranjan Mohakud <[email protected]>--- drivers/common/cnxk/roc_npa.c | 1 - 1 file changed, 1 deletion(-)drivers/common/cnxk/roc_npa.c +0
-0@@ -110,7 +110,6 @@ npa_aura_pool_init(struct mbox *m_box, uint32_t
aura_id, structnpa_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)
Ashwin Sekhar T K
Acked-byJerin Jacob
AppliedQuoted 2 lines · Ashwin Sekhar T K
Applied to dpdk-next-net-mrvl/for-main. Thanks