DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ashwin Sekhar Thalakalath Kottilveetil <asekhar@marvell.com>
To: Ashwin Sekhar Thalakalath Kottilveetil <asekhar@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Koteswara Rao Kottidi <skoteshwar@marvell.com>,
	Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>,
	Kiran Kumar Kokkilagadda <kirankumark@marvell.com>,
	Satheesh Paul Antonysamy <psatheesh@marvell.com>,
	Anoob Joseph <anoobj@marvell.com>,
	Akhil Goyal <gakhil@marvell.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	Harman Kalra <hkalra@marvell.com>
Subject: RE: [PATCH] mempool/cnxk: avoid batch op free for empty mempools
Date: Mon, 23 May 2022 18:15:53 +0000	[thread overview]
Message-ID: <CO1PR18MB45404481046F072DED878D5BBFD49@CO1PR18MB4540.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20220428095935.3612387-1-asekhar@marvell.com>

PING.

Ashwin Sekhar T K 

> -----Original Message-----
> From: Ashwin Sekhar T K <asekhar@marvell.com>
> Sent: Thursday, April 28, 2022 3:30 PM
> To: dev@dpdk.org
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Sunil Kumar Kori
> <skori@marvell.com>; Satha Koteswara Rao Kottidi
> <skoteshwar@marvell.com>; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@marvell.com>; Kiran Kumar Kokkilagadda
> <kirankumark@marvell.com>; Satheesh Paul Antonysamy
> <psatheesh@marvell.com>; Ashwin Sekhar Thalakalath Kottilveetil
> <asekhar@marvell.com>; Anoob Joseph <anoobj@marvell.com>; Akhil
> Goyal <gakhil@marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram@marvell.com>; Harman Kalra <hkalra@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 <asekhar@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	other threads:[~2022-05-23 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28  9:59 Ashwin Sekhar T K
2022-05-23 18:15 ` Ashwin Sekhar Thalakalath Kottilveetil [this message]
2022-06-08  9:12 ` Thomas Monjalon

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=CO1PR18MB45404481046F072DED878D5BBFD49@CO1PR18MB4540.namprd18.prod.outlook.com \
    --to=asekhar@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=psatheesh@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=thomas@monjalon.net \
    /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).