From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8B282A04C7; Tue, 15 Sep 2020 18:02:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5014B1C0D2; Tue, 15 Sep 2020 18:02:33 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id B91131C0CE for ; Tue, 15 Sep 2020 18:02:31 +0200 (CEST) IronPort-SDR: S4mak4UAVz+zLDIbdJs4zhP5LQILHBan+8cJh1g8RXh1DEh/srXwuFSsQmrfpETJ54qUZEZVev RiMmOMEvjGMw== X-IronPort-AV: E=McAfee;i="6000,8403,9745"; a="244120034" X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="244120034" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 09:02:29 -0700 IronPort-SDR: CZS75b4qnTGOsP/U/mPTiYhJLkKoIvfTORbeLgtpDovlUKpftpUzJKFOgTwqP5uM77R0IbCJlj q0mYHkhUlPvg== X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="482877885" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.27.22]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 15 Sep 2020 09:02:27 -0700 Date: Tue, 15 Sep 2020 17:02:24 +0100 From: Bruce Richardson To: Ruifeng Wang Cc: Vladimir Medvedkin , dev@dpdk.org, honnappa.nagarahalli@arm.com, nd@arm.com Message-ID: <20200915160224.GA825@bricha3-MOBL.ger.corp.intel.com> References: <20200907081518.46350-1-ruifeng.wang@arm.com> <20200907081518.46350-3-ruifeng.wang@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200907081518.46350-3-ruifeng.wang@arm.com> Subject: Re: [dpdk-dev] [PATCH 2/2] lpm: hide internal data X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Sep 07, 2020 at 04:15:17PM +0800, Ruifeng Wang wrote: > Fields except tbl24 and tbl8 in rte_lpm structure have no > need to be exposed to the user. > Hide the unneeded exposure of structure fields for better > ABI maintainability. > > Suggested-by: David Marchand > Signed-off-by: Ruifeng Wang > Reviewed-by: Phil Yang > --- > lib/librte_lpm/rte_lpm.c | 152 +++++++++++++++++++++++---------------- > lib/librte_lpm/rte_lpm.h | 7 -- > 2 files changed, 91 insertions(+), 68 deletions(-) > > diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h > index 03da2d37e..112d96f37 100644 > --- a/lib/librte_lpm/rte_lpm.h > +++ b/lib/librte_lpm/rte_lpm.h > @@ -132,17 +132,10 @@ struct rte_lpm_rule_info { > > /** @internal LPM structure. */ > struct rte_lpm { > - /* LPM metadata. */ > - char name[RTE_LPM_NAMESIZE]; /**< Name of the lpm. */ > - uint32_t max_rules; /**< Max. balanced rules per lpm. */ > - uint32_t number_tbl8s; /**< Number of tbl8s. */ > - struct rte_lpm_rule_info rule_info[RTE_LPM_MAX_DEPTH]; /**< Rule info table. */ > - > /* LPM Tables. */ > struct rte_lpm_tbl_entry tbl24[RTE_LPM_TBL24_NUM_ENTRIES] > __rte_cache_aligned; /**< LPM tbl24 table. */ > struct rte_lpm_tbl_entry *tbl8; /**< LPM tbl8 table. */ > - struct rte_lpm_rule *rules_tbl; /**< LPM rules. */ > }; > Since this changes the ABI, does it not need advance notice? [Basically the return value point from rte_lpm_create() will be different, and that return value could be used by rte_lpm_lookup() which as a static inline function will be in the binary and using the old structure offsets.] > /** LPM RCU QSBR configuration structure. */ > -- > 2.17.1 >