From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id CC7187D4F for ; Wed, 23 Aug 2017 16:13:45 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2017 07:13:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,417,1498546800"; d="scan'208";a="143697106" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga006.fm.intel.com with ESMTP; 23 Aug 2017 07:13:44 -0700 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 23 Aug 2017 15:13:43 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.220]) by IRSMSX156.ger.corp.intel.com ([169.254.3.57]) with mapi id 14.03.0319.002; Wed, 23 Aug 2017 15:13:42 +0100 From: "Dumitrescu, Cristian" To: "Iremonger, Bernard" , "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: AQHTHBbrF7xO+Ut3uEeO7O4Trsws5aKR+mRg Date: Wed, 23 Aug 2017 14:13:42 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BA9E3FB@IRSMSX108.ger.corp.intel.com> References: <20170525154634.44352-1-ferruh.yigit@intel.com> <1503496275-27492-2-git-send-email-bernard.iremonger@intel.com> In-Reply-To: <1503496275-27492-2-git-send-email-bernard.iremonger@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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:13:47 -0000 > -----Original Message----- > From: Iremonger, Bernard > Sent: Wednesday, August 23, 2017 2:51 PM > To: dev@dpdk.org; Yigit, Ferruh ; Ananyev, > Konstantin ; Dumitrescu, Cristian > ; adrien.mazarguil@6wind.com > Cc: Iremonger, Bernard > Subject: [PATCH v1 1/6] librte_table: move structure to header file >=20 > Move struct librte_table from the rte_table_acl.c to > the rte_table_acl.h file. >=20 > 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(-) >=20 > diff --git a/lib/librte_table/rte_table_acl.c b/lib/librte_table/rte_tabl= e_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 @@ >=20 > #endif >=20 > -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_tabl= e_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 @@ >=20 > #include "rte_table.h" >=20 > + > +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 Hi Bernard, Strong objection here: - This data structure contains the internal data needed to run the ACL tabl= e. 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 a= s opposed to the .h file. - Users should handle the ACL table through the handle returned by the crea= te function as opposed to accessing this structure directly. Regards, Cristian