[PATCH v3] mempool/cnxk: fix bug in batch alloc issue failure path
    Jerin Jacob 
    jerinjacobk at gmail.com
       
    Fri Feb 18 09:37:21 CET 2022
    
    
  
On Fri, Feb 18, 2022 at 12:54 PM Ashwin Sekhar T K <asekhar at marvell.com> wrote:
>
> 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: 91531e63f4 ("mempool/cnxk: add cn10k batch dequeue")
Cc: stable at dpdk.org
>
> Signed-off-by: Ashwin Sekhar T K <asekhar at marvell.com>
> ---
Acked-by: Jerin Jacob <jerinj at marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks
>  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
>
    
    
More information about the dev
mailing list