DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ashwin Sekhar T K <asekhar@marvell.com>
To: <dev@dpdk.org>
Cc: <jerinj@marvell.com>, <skori@marvell.com>,
	<skoteshwar@marvell.com>, <pbhagavatula@marvell.com>,
	<kirankumark@marvell.com>, <psatheesh@marvell.com>,
	<asekhar@marvell.com>, <anoobj@marvell.com>, <gakhil@marvell.com>
Subject: [PATCH v2] mempool/cnxk: fix bug in batch alloc issue failure path
Date: Fri, 18 Feb 2022 12:10:29 +0530	[thread overview]
Message-ID: <20220218064029.2906898-1-asekhar@marvell.com> (raw)
In-Reply-To: <20220210115256.2744447-1-asekhar@marvell.com>

Fix bug in batch alloc issue failure path where it was
enqueing invalid pointers back to the pool. The code
should rightly be falling back to default dequeue path
in such cases.

Fixes: 91531e63f4 ("mempool/cnxk: add cn10k batch dequeue")

Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
---
 drivers/mempool/cnxk/cn10k_mempool_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c
index 4c669b878f..6ebbf91de5 100644
--- a/drivers/mempool/cnxk/cn10k_mempool_ops.c
+++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c
@@ -202,7 +202,7 @@ cn10k_mempool_deq(struct rte_mempool *mp, void **obj_table, unsigned int n)
 						    BATCH_ALLOC_SZ, 0, 1);
 		/* If issue fails, try falling back to default alloc */
 		if (unlikely(rc))
-			return cn10k_mempool_enq(mp, obj_table, n);
+			return cnxk_mempool_deq(mp, obj_table, n);
 		mem->status = BATCH_ALLOC_OP_ISSUED;
 	}
 
-- 
2.32.0


  parent reply	other threads:[~2022-02-18  6:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 11:52 [PATCH] " Ashwin Sekhar T K
2022-02-11  7:24 ` Jerin Jacob
2022-02-18  6:40 ` Ashwin Sekhar T K [this message]
2022-02-18  7:27 ` [PATCH v3] " Ashwin Sekhar T K
2022-02-18  8:37   ` 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=20220218064029.2906898-1-asekhar@marvell.com \
    --to=asekhar@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=psatheesh@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@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).