From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 612087D24 for ; Wed, 23 Aug 2017 16:33:56 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 23 Aug 2017 07:33:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,417,1498546800"; d="scan'208";a="303562242" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by fmsmga004.fm.intel.com with ESMTP; 23 Aug 2017 07:33:54 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.220]) by IRSMSX107.ger.corp.intel.com ([169.254.10.121]) with mapi id 14.03.0319.002; Wed, 23 Aug 2017 15:32:20 +0100 From: "Iremonger, Bernard" To: "Dumitrescu, Cristian" , "dev@dpdk.org" , "Yigit, Ferruh" , "Ananyev, Konstantin" , "adrien.mazarguil@6wind.com" Thread-Topic: [PATCH v1 1/6] librte_table: move structure to header file Thread-Index: AQHTHBbr6M/rsT8XhUighdZhkEcIgKKR6xoAgAAVdNA= Date: Wed, 23 Aug 2017 14:32:20 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C24E0368E6@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> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891267BA9E3FB@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: 10.0.102.7 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: Wed, 23 Aug 2017 14:33:57 -0000 Hi Cristian, > > 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 table = */ > > - 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 table = */ > > + 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 >=20 >=20 > Hi Bernard, >=20 > Strong objection here: > - This data structure contains the internal data needed to run the ACL ta= ble. It > is implementation dependent, it is not part of the API. Therefore, it mus= t not > be exposed as part of the API, so it has to stay in the .c file as oppose= d 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. >=20 > Regards, > Cristian I will revisit this to see if there is another way. Regards, Bernard.