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 340A6A04C7; Tue, 15 Sep 2020 18:28:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E35CD1C0D8; Tue, 15 Sep 2020 18:28:11 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 05A151BFC5 for ; Tue, 15 Sep 2020 18:28:09 +0200 (CEST) IronPort-SDR: T81bvY63xukbmoHrfZK4WL9VVljDZaJBqCUQAxKVBuusvutTBC2aGWFpqKbLWuNnQS9s0jehY9 Z2GpIDQyP/iw== X-IronPort-AV: E=McAfee;i="6000,8403,9745"; a="147050175" X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="147050175" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 09:28:05 -0700 IronPort-SDR: oOSMagKMn5AbVGq3ubLHkeG52afx6fmOB5PEWbAVGJKGY2mURF+C0nd2UTSTjo478hvnh7FqHf UPhrZZbt1mRA== X-IronPort-AV: E=Sophos;i="5.76,430,1592895600"; d="scan'208";a="507639150" Received: from vmedvedk-mobl.ger.corp.intel.com (HELO [10.252.40.3]) ([10.252.40.3]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2020 09:28:03 -0700 To: Bruce Richardson , Ruifeng Wang Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, nd@arm.com References: <20200907081518.46350-1-ruifeng.wang@arm.com> <20200907081518.46350-3-ruifeng.wang@arm.com> <20200915160224.GA825@bricha3-MOBL.ger.corp.intel.com> From: "Medvedkin, Vladimir" Message-ID: <81eb8fde-cd4f-1df9-0ebb-05c902b30fe3@intel.com> Date: Tue, 15 Sep 2020 17:28:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200915160224.GA825@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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" Hi Ruifeng, On 15/09/2020 17:02, Bruce Richardson wrote: > 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.] > Agree with Bruce, this patch breaks ABI, so it can't be accepted without prior notice. >> /** LPM RCU QSBR configuration structure. */ >> -- >> 2.17.1 >> -- Regards, Vladimir