From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id DFA9E1B274 for ; Wed, 19 Dec 2018 11:49:26 +0100 (CET) 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/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2018 02:49:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,372,1539673200"; d="scan'208";a="284968862" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by orsmga005.jf.intel.com with ESMTP; 19 Dec 2018 02:49:24 -0800 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.227]) by IRSMSX103.ger.corp.intel.com ([169.254.3.157]) with mapi id 14.03.0415.000; Wed, 19 Dec 2018 10:49:23 +0000 From: "Ananyev, Konstantin" To: "Dumitrescu, Cristian" , Thomas Monjalon CC: "Pattan, Reshma" , "dev@dpdk.org" , "jerin.jacob@caviumnetworks.com" , "Singh, Jasvinder" , "david.marchand@redhat.com" , "olivier.matz@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v2 2/3] eal: add new rte color definition Thread-Index: AQHUjjm2Aa3ZqX88DkWLrO3Mc2yE4qV+7wMAgAAI+mCAA+DLAIAAYu6AgAAZcACAAEoNAIAAvUWAgAAMebCAABesAIAAC3aAgAAFpYCAADl2oIAAKdUAgAD+IsA= Date: Wed, 19 Dec 2018 10:49:23 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258010D8BC72A@IRSMSX106.ger.corp.intel.com> References: <20181123165423.134922-1-jasvinder.singh@intel.com> <34337288.XBznk5NxM7@xps> <3EB4FA525960D640B5BDFFD6A3D891268E81666F@IRSMSX108.ger.corp.intel.com> <11978750.fjrl6Z7eF7@xps> <2601191342CEEE43887BDE71AB977258010D8BC0BC@IRSMSX106.ger.corp.intel.com> <3EB4FA525960D640B5BDFFD6A3D891268E8169C8@IRSMSX108.ger.corp.intel.com> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891268E8169C8@IRSMSX108.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjRhODJlMDEtNTU1MC00ZTI3LWE4ZDUtNmFjNGIzNThiYmYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZ3grOFBBS1pvVHVETHAwbHZhV0R1WmpTM2hYMWtVeUFZM2dFclhva3lxM25qemwwXC9cL1JJV25TYzFVOFFaK2wyIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 2/3] eal: add new rte color definition 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, 19 Dec 2018 10:49:27 -0000 Hi Cristian, > > > 18/12/2018 14:19, Dumitrescu, Cristian: > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > 18/12/2018 12:18, Dumitrescu, Cristian: > > > > > > > > I replied in v3 that it should stay in rte_meter.h. > > > > > > > > You can include rte_meter.h in ethdev. > > > > > > > > > > > > > > OK, thanks Thomas, makes sense to me as well. > > > > > > > > > > > > > > > > > > > Thomas, > > > > > > > > > > > > I agree with your input, but just want to make sure we are on t= he > > same > > > > > page: > > > > > > > > > > > > Besides including rte_meter.h in ethdev (which you are fine wit= h), we > > > > > would also need to include rte_meter.h in mbuf. > > > > > > > > > > > > Are you OK with this as well? > > > > > > > > > > Why do we need rte_meter.h in mbuf? > > > > > > > > > > > > > You probably looked at V2 only, but in V3 we have functions to set/= get > > the color within the mbuf->hash.sched field. > > > > > > > > For space compression reasons, the mbuf->hash.sched stores the colo= r > > on 8-bit variable, while for the outside world the set/get functions > > > work with the 32-bit enum type. We do same thing in other places in D= PDK, > > such as rte_crypto_op, etc. > > > > > > So it's a different discussion. > > > We need to review this v3 and check how relevant this mbuf API is. > > > > > > If the API is accepted, yes the include should not be an issue. > > > > Personally, I don't think it is a good idea to add extra dependency for > > librte_mbuf. > > I'd prefer either to keep rte_color definition inside librte_mbuf, > > or move corresponding function definitions out of it. > > Konstantin >=20 > Konstantin, >=20 > As you see, the number of options is limited, and none of them is perfec= t: >=20 > 1/ color enum in EAL/common/include: still my favorite, as it does not c= reate any new library dependencies, and it is already used > to store lots of similar generic items As I remember, we don't put network specific things into EAL, but probably = you have different examples? > 2/ color enum in rte_meter.h: results in creating new librte_mbuf depend= ency to librte_meter > 3/ color enum in rte_mbuf.h: results in creating new librte_meter depend= ency to librte_mbuf (yes, currently librte_meter does not > depend on librte_mbuf) 4/ Keep color as uint8_t in rte_mbuf and 'move enum rte_color' definition a= nd related functions in rte_meter. My preference is either 3) or 4). Konstantin