From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 266D611F5 for ; Mon, 28 Aug 2017 10:48:51 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2017 01:48:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,440,1498546800"; d="scan'208";a="1188797519" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga001.fm.intel.com with ESMTP; 28 Aug 2017 01:48:49 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.167]) by IRSMSX107.ger.corp.intel.com ([169.254.10.65]) with mapi id 14.03.0319.002; Mon, 28 Aug 2017 09:48:48 +0100 From: "Iremonger, Bernard" To: "Dumitrescu, Cristian" , "dev@dpdk.org" , "Yigit, Ferruh" , "Ananyev, Konstantin" , "adrien.mazarguil@6wind.com" CC: "Iremonger, Bernard" Thread-Topic: [dpdk-dev] [PATCH v1 1/6] librte_table: move structure to header file Thread-Index: AQHTHB0AhYjnCT0IME6jKgINP4bmpqKZe9uw Date: Mon, 28 Aug 2017 08:48:48 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C24E04106C@IRSMSX108.ger.corp.intel.com> References: <20170525154634.44352-1-ferruh.yigit@intel.com> <1503496275-27492-2-git-send-email-bernard.iremonger@intel.com> <3EB4FA525960D640B5BDFFD6A3D891267BA9E3FB@IRSMSX108.ger.corp.intel.com> <8CEF83825BEC744B83065625E567D7C24E0368E6@IRSMSX108.ger.corp.intel.com> In-Reply-To: <8CEF83825BEC744B83065625E567D7C24E0368E6@IRSMSX108.ger.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGM4ODBjOGUtMDZmYy00YjJhLTk4NjctYjI2MjhjMjY0OWYyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IndwMnM1blpTRUZKMUVielwvOTAyNEQ5WGJpU1R0UXhLSFNMK3VlTHZ3ZjZvPSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1 1/6] librte_table: move structure to header file 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: , X-List-Received-Date: Mon, 28 Aug 2017 08:48:52 -0000 Hi Cristian, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Iremonger, Bernard > Sent: Wednesday, August 23, 2017 3:32 PM > To: Dumitrescu, Cristian ; dev@dpdk.org; > Yigit, Ferruh ; Ananyev, Konstantin > ; adrien.mazarguil@6wind.com > Subject: Re: [dpdk-dev] [PATCH v1 1/6] librte_table: move structure to > header file >=20 > Hi Cristian, >=20 > >=20 > > > Subject: [PATCH v1 1/6] librte_table: move structure to header file > > > > > > Move struct librte_table from the rte_table_acl.c to the > > > rte_table_acl.h file. > > > > > > Signed-off-by: Bernard Iremonger > > > --- > > > lib/librte_table/rte_table_acl.c | 24 ------------------------ > > > lib/librte_table/rte_table_acl.h | 24 ++++++++++++++++++++++++ > > > 2 files changed, 24 insertions(+), 24 deletions(-) > > > > > > diff --git a/lib/librte_table/rte_table_acl.c > > > b/lib/librte_table/rte_table_acl.c > > > index 3c05e4a..900f658 100644 > > > --- a/lib/librte_table/rte_table_acl.c > > > +++ b/lib/librte_table/rte_table_acl.c > > > @@ -57,30 +57,6 @@ > > > > > > #endif > > > > > > -struct rte_table_acl { > > > - struct rte_table_stats stats; > > > - > > > - /* Low-level ACL table */ > > > - char name[2][RTE_ACL_NAMESIZE]; > > > - struct rte_acl_param acl_params; /* for creating low level acl tabl= e */ > > > - struct rte_acl_config cfg; /* Holds the field definitions (metadata= ) */ > > > - struct rte_acl_ctx *ctx; > > > - uint32_t name_id; > > > - > > > - /* Input parameters */ > > > - uint32_t n_rules; > > > - uint32_t entry_size; > > > - > > > - /* Internal tables */ > > > - uint8_t *action_table; > > > - struct rte_acl_rule **acl_rule_list; /* Array of pointers to rules = */ > > > - uint8_t *acl_rule_memory; /* Memory to store the rules */ > > > - > > > - /* Memory to store the action table and stack of free entries */ > > > - uint8_t memory[0] __rte_cache_aligned; > > > -}; > > > - > > > - > > > static void * > > > rte_table_acl_create( > > > void *params, > > > diff --git a/lib/librte_table/rte_table_acl.h > > > b/lib/librte_table/rte_table_acl.h > > > index a9cc032..1370b12 100644 > > > --- a/lib/librte_table/rte_table_acl.h > > > +++ b/lib/librte_table/rte_table_acl.h > > > @@ -55,6 +55,30 @@ > > > > > > #include "rte_table.h" > > > > > > + > > > +struct rte_table_acl { > > > + struct rte_table_stats stats; > > > + > > > + /* Low-level ACL table */ > > > + char name[2][RTE_ACL_NAMESIZE]; > > > + struct rte_acl_param acl_params; /* for creating low level acl tabl= e */ > > > + struct rte_acl_config cfg; /* Holds the field definitions (metadata= ) */ > > > + struct rte_acl_ctx *ctx; > > > + uint32_t name_id; > > > + > > > + /* Input parameters */ > > > + uint32_t n_rules; > > > + uint32_t entry_size; > > > + > > > + /* Internal tables */ > > > + uint8_t *action_table; > > > + struct rte_acl_rule **acl_rule_list; /* Array of pointers to rules = */ > > > + uint8_t *acl_rule_memory; /* Memory to store the rules */ > > > + > > > + /* Memory to store the action table and stack of free entries */ > > > + uint8_t memory[0] __rte_cache_aligned; }; > > > + > > > /** ACL table parameters */ > > > struct rte_table_acl_params { > > > /** Name */ > > > -- > > > 1.9.1 > > > > > > Hi Bernard, > > > > Strong objection here: > > - This data structure contains the internal data needed to run the ACL > > table. It is implementation dependent, it is not part of the API. > > Therefore, it must not be exposed as part of the API, so it has to > > stay in the .c file as opposed to the .h file. > > - Users should handle the ACL table through the handle returned by the > > create function as opposed to accessing this structure directly. > > > > Regards, > > Cristian >=20 > I will revisit this to see if there is another way. >=20 > Regards, >=20 > Bernard. >=20 This patch has been dropped from the v2 patch set. The functionality needed has been implemented in a different way. Regards, Bernard.