PING.

Ashwin Sekhar T K 

> -----Original Message-----
> From: Ashwin Sekhar T K <asek...@marvell.com>
> Sent: Thursday, April 28, 2022 3:30 PM
> To: dev@dpdk.org
> Cc: Jerin Jacob Kollanukkaran <jer...@marvell.com>; Sunil Kumar Kori
> <sk...@marvell.com>; Satha Koteswara Rao Kottidi
> <skotesh...@marvell.com>; Pavan Nikhilesh Bhagavatula
> <pbhagavat...@marvell.com>; Kiran Kumar Kokkilagadda
> <kirankum...@marvell.com>; Satheesh Paul Antonysamy
> <psathe...@marvell.com>; Ashwin Sekhar Thalakalath Kottilveetil
> <asek...@marvell.com>; Anoob Joseph <ano...@marvell.com>; Akhil
> Goyal <gak...@marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpu...@marvell.com>; Harman Kalra <hka...@marvell.com>
> Subject: [PATCH] mempool/cnxk: avoid batch op free for empty mempools
> 
> Batch op data is initialized inside mempool alloc. But in case of empty
> mempools, the alloc function is not called and hence the initialization of 
> batch
> op data is also not done. So ensure the validity of batch op data inside
> mempool free.
> 
> Signed-off-by: Ashwin Sekhar T K <asek...@marvell.com>
> ---
>  drivers/mempool/cnxk/cn10k_mempool_ops.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c
> b/drivers/mempool/cnxk/cn10k_mempool_ops.c
> index 6ebbf91de5..a02e01cea0 100644
> --- a/drivers/mempool/cnxk/cn10k_mempool_ops.c
> +++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c
> @@ -109,6 +109,12 @@ batch_op_fini(struct rte_mempool *mp)
>       int i;
> 
>       op_data = batch_op_data_get(mp->pool_id);
> +     if (!op_data) {
> +             /* Batch op data can be uninitialized in case of empty
> +              * mempools.
> +              */
> +             return;
> +     }
> 
>       rte_wmb();
>       for (i = 0; i < RTE_MAX_LCORE; i++) {
> --
> 2.32.0

Reply via email to