DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: Olivier MATZ <olivier.matz@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] mempool: Reduce rte_mempool structure size
Date: Mon, 8 Feb 2016 15:57:27 +0000	[thread overview]
Message-ID: <D195F21D-17A2-4639-8343-86FC1D3C7E31@intel.com> (raw)
In-Reply-To: <56B875A9.8050402@6wind.com>


>Hi Keith,
>
>Looks good, thanks. Please find some comments below.
>
>> [PATCH] mempool: Reduce rte_mempool structure size
>
>nit: we usually avoid uppercase letters in title

Will make that change for v2. Why no uppercase letters in the title, seems a bit odd to me in this case??
>
>On 02/03/2016 12:02 AM, Keith Wiles wrote:
>> diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
>> index aff5f6d..bdf8e2e 100644
>> --- a/lib/librte_mempool/rte_mempool.c
>> +++ b/lib/librte_mempool/rte_mempool.c
>> @@ -450,15 +450,11 @@ rte_mempool_xmem_create(const char *name, unsigned n, unsigned elt_size,
>>  	int page_size = getpagesize();
>>  
>>  	/* compilation-time checks */
>> +#ifdef RTE_LIBRTE_MEMPOOL_DEBUG
>>  	RTE_BUILD_BUG_ON((sizeof(struct rte_mempool) &
>>  			  RTE_CACHE_LINE_MASK) != 0);
>> -#if RTE_MEMPOOL_CACHE_MAX_SIZE > 0
>>  	RTE_BUILD_BUG_ON((sizeof(struct rte_mempool_cache) &
>>  			  RTE_CACHE_LINE_MASK) != 0);
>> -	RTE_BUILD_BUG_ON((offsetof(struct rte_mempool, local_cache) &
>> -			  RTE_CACHE_LINE_MASK) != 0);
>> -#endif
>> -#ifdef RTE_LIBRTE_MEMPOOL_DEBUG
>
>I don't think the #ifdef RTE_LIBRTE_MEMPOOL_DEBUG should be moved.
>It should only protects the checks on stats which are enabled
>in debug mode.

Will make that change for v2.
>
>> @@ -194,10 +192,7 @@ struct rte_mempool {
>>  
>>  	unsigned private_data_size;      /**< Size of private data. */
>>  
>> -#if RTE_MEMPOOL_CACHE_MAX_SIZE > 0
>> -	/** Per-lcore local cache. */
>> -	struct rte_mempool_cache local_cache[RTE_MAX_LCORE];
>> -#endif
>> +	struct rte_mempool_cache *local_cache; /**< Per-lcore local cache */
>>  
>>  #ifdef RTE_LIBRTE_MEMPOOL_DEBUG
>>  	/** Per-lcore statistics. */
>
>As you noticed it in your initial mail, this changes the ABI. I
>think your patch justifies the ABI change, so I think it should
>follow the ABI change process described in
>dpdk/doc/guides/contributing/versioning.rst.
>
>From what I understand of versioning.rst, these kind of changes
>requires a deprecation notice first, and will be integrated in
>next version. I don't think it's easy to keep a backward compat
>in this case, especially because the rte_mempool structure is
>used by several inlined functions.

I am reading the API doc and need to understand this process a bit more, but from what I can tell I need to add a ifdef RTE_NEXT_ABI around the new structure and old. Not sure where else I need to do that as compat is a bit hard as you stated. The API revision file is there something that needs to be done in that vile too?

You can reply to me directly it you like to save some bandwidth.
>
>Regards,
>Olivier
>


Regards,
Keith





  reply	other threads:[~2016-02-08 15:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 23:02 Keith Wiles
2016-02-03 17:11 ` Ananyev, Konstantin
2016-02-08 11:02 ` Olivier MATZ
2016-02-08 15:57   ` Wiles, Keith [this message]
2016-02-09 17:30 ` [dpdk-dev] [PATCH v2] mempool: reduce " Keith Wiles
2016-02-10 16:59   ` Olivier MATZ
2016-02-10 17:22     ` Wiles, Keith
2016-02-10 18:35     ` Wiles, Keith
2016-02-10 20:06       ` Olivier MATZ
2016-02-10 21:18   ` [dpdk-dev] [PATCH v3] " Keith Wiles
2016-02-12 11:23     ` Panu Matilainen
2016-02-12 13:57       ` Thomas Monjalon
2016-02-12 14:19         ` Panu Matilainen
2016-02-12 15:07           ` Wiles, Keith
2016-02-12 15:38             ` Thomas Monjalon
2016-02-12 15:50               ` Olivier MATZ
2016-02-12 15:58                 ` Wiles, Keith
2016-02-15  9:58                 ` Hunt, David
2016-02-15 10:15                   ` Olivier MATZ
2016-02-15 10:21                     ` Hunt, David
2016-02-15 12:31                       ` Olivier MATZ
2016-02-12 15:54               ` Wiles, Keith
2016-02-12 18:36   ` [dpdk-dev] [PATCH v4] " Keith Wiles
2016-02-15  9:20     ` Olivier MATZ
2016-04-14  9:42     ` [dpdk-dev] [PATCH v5] " Olivier Matz
2016-04-14 13:28       ` Wiles, Keith
2016-04-14 13:43         ` Olivier MATZ
2016-04-14 13:53       ` Wiles, Keith
2016-05-17  5:31       ` 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=D195F21D-17A2-4639-8343-86FC1D3C7E31@intel.com \
    --to=keith.wiles@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.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).