]> git.droids-corp.org - dpdk.git/commitdiff
mempool/cnxk: fix batch allocation failure path
authorAshwin Sekhar T K <asekhar@marvell.com>
Fri, 18 Feb 2022 07:27:12 +0000 (12:57 +0530)
committerJerin Jacob <jerinj@marvell.com>
Wed, 23 Feb 2022 16:33:53 +0000 (17:33 +0100)
Fix bug in batch alloc issue failure path where it was
enqueuing invalid pointers back to the pool. The code
should rightly be falling back to default dequeue path
in such cases.

Fixes: 91531e63f43b ("mempool/cnxk: add cn10k batch dequeue")
Cc: stable@dpdk.org
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/mempool/cnxk/cn10k_mempool_ops.c

index 4c669b878f72de171e052370f34beaaea38bcd56..6ebbf91de5682b8926fd8f24b1f4c1c332627f67 100644 (file)
@@ -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;
        }