From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5] mempool: reduce rte_mempool structure size Date: Tue, 17 May 2016 07:31:12 +0200 Message-ID: <25696135.NHD1A2FuVu@xps13> References: <1455302184-48822-1-git-send-email-keith.wiles@intel.com> <1460626956-12038-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, pmatilai@redhat.com To: Olivier Matz , keith.wiles@intel.com Return-path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 0BC9D68F2 for ; Tue, 17 May 2016 07:31:15 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id e201so124434137wme.0 for ; Mon, 16 May 2016 22:31:15 -0700 (PDT) In-Reply-To: <1460626956-12038-1-git-send-email-olivier.matz@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-04-14 11:42, Olivier Matz: > From: Keith Wiles > > The rte_mempool structure is changed, which will cause an ABI change > for this structure. Providing backward compat is not reasonable > here as this structure is used in multiple defines/inlines. The deprecation notice must be removed by this patch. [...] > +/** > * Calculate the size of the mempool header. > * > * @param mp > @@ -254,9 +256,9 @@ struct rte_mempool { > * @param pgn > * Number of pages used to store mempool objects. A new parameter has been forgotten: * @param cs * Size of the per-lcore cache. > */ > -#define MEMPOOL_HEADER_SIZE(mp, pgn) (sizeof(*(mp)) + \ > - RTE_ALIGN_CEIL(((pgn) - RTE_DIM((mp)->elt_pa)) * \ > - sizeof ((mp)->elt_pa[0]), RTE_CACHE_LINE_SIZE)) > +#define MEMPOOL_HEADER_SIZE(mp, pgn, cs) \ > + (sizeof(*(mp)) + __PA_SIZE(mp, pgn) + (((cs) == 0) ? 0 : \ > + (sizeof(struct rte_mempool_cache) * RTE_MAX_LCORE))) Applied with above changes