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 4AD605F2D for ; Tue, 18 Dec 2018 11:30:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2018 02:30:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,367,1539673200"; d="scan'208";a="304748502" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga005.fm.intel.com with ESMTP; 18 Dec 2018 02:30:47 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.26]) by IRSMSX109.ger.corp.intel.com ([169.254.13.208]) with mapi id 14.03.0415.000; Tue, 18 Dec 2018 10:30:46 +0000 From: "Dumitrescu, Cristian" To: Thomas Monjalon , "Pattan, Reshma" CC: "dev@dpdk.org" , "Ananyev, Konstantin" , "jerin.jacob@caviumnetworks.com" , "Singh, Jasvinder" , "david.marchand@redhat.com" Thread-Topic: [dpdk-dev] [PATCH v2 2/3] eal: add new rte color definition Thread-Index: AQHUjjmhPYRdjupnb0WkxL3z2vq4LKV+7wMAgAAI+mCAA+DLAIAAYu6AgAAZcACAAEoNAIAAvUWA Date: Tue, 18 Dec 2018 10:30:45 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891268E8164D1@IRSMSX108.ger.corp.intel.com> References: <20181123165423.134922-1-jasvinder.singh@intel.com> <3AEA2BF9852C6F48A459DA490692831F2A3EB753@irsmsx110.ger.corp.intel.com> <3EB4FA525960D640B5BDFFD6A3D891268E816063@IRSMSX108.ger.corp.intel.com> <1646379.j0tofnCs90@xps> In-Reply-To: <1646379.j0tofnCs90@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTJjM2RhODUtOWY3YS00YjE5LWE1OGUtYWIxM2JlMTEyNmU2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibERJbGtUQTdiUmVQXC9NdmdpSG9OYXErYTJHaFJOVTlocjk5Y0ZKZDk2SzBhRE4zT3lJU0tQRm9PVGp0UkJrV2cifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.180] 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: Tue, 18 Dec 2018 10:30:49 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Monday, December 17, 2018 11:11 PM > To: Dumitrescu, Cristian ; Pattan, Reshma > > Cc: dev@dpdk.org; Ananyev, Konstantin ; > jerin.jacob@caviumnetworks.com; Singh, Jasvinder > ; david.marchand@redhat.com > Subject: Re: [dpdk-dev] [PATCH v2 2/3] eal: add new rte color definition >=20 > 17/12/2018 19:51, Dumitrescu, Cristian: > > From: Pattan, Reshma > > > From: Ananyev, Konstantin > > > > From: Dumitrescu, Cristian > > > > > From: Ananyev, Konstantin > > > > > > > --- /dev/null > > > > > > > +++ b/lib/librte_eal/common/include/rte_color.h > > > > > > > +enum rte_color { > > > > > > > + RTE_COLOR_GREEN =3D 0, /**< Green */ > > > > > > > + RTE_COLOR_YELLOW, /**< Yellow */ > > > > > > > + RTE_COLOR_RED, /**< Red */ > > > > > > > + RTE_COLORS /**< Number of colors */ }; > > > > > > > > > > > > Does it really belong to EAL? > > > > > > Konstantin > > > > > > > > > > Why not? > > > > > > > > > > It needs to be visible to multiple libraries: ethdev, meter, sche= d, as > > > > > well as drivers. We'd like to avoid adding more complexity to > > > dependencies > > > > between libraries. > > > > > > > > > > It is very generic. EAL common/include is currently the place to = put > > > > > generic data structures, functions, algs, etc that are widely use= d by > DPDK > > > > libraries. Lots of similar examples are easy to find in this folder= . > > > > > > > > I don't think it is *that* generic to be in EAL. > > > > Yes it is used by few libs, ethdev and by softnic PMD, > > > > but it doesn't look as core dpdk thing to me. > > > > > > > > > > > > > > Where else would you put it? > > > > > > > > If it defines format of rte_mbuf fileds, then probably new .h insid= e > > > librte_mbuf is > > > > a good place. > > > > Other alternatives would be rte_ethdev or rte_net. > > > > > > After going through the lib/Makefile dependencies, I see we can have > > > rte_color.h in eal or mbuf library only. > > > Cannot keep it inside ethdev or net libraries because these two libra= ries > > > already have dependency on mbuf library, so cannot create loop > > > dependency. > > > > > > Snippet > > > > > > 1) DEPDIRS-librte_eal :=3D librte_kvargs > > > > > > 2)DEPDIRS-librte_mbuf :=3D librte_eal librte_mempool > > > > > > 3)DEPDIRS-librte_ethdev :=3D librte_net librte_eal librte_mempool > librte_ring > > > DEPDIRS-librte_ethdev +=3D librte_mbuf > > > DEPDIRS-librte_ethdev +=3D librte_kvargs > > > DEPDIRS-librte_ethdev +=3D librte_cmdline > > > > > > 4) DEPDIRS-librte_net :=3D librte_mbuf librte_eal > > > > > > 5) DEPDIRS-librte_meter :=3D librte_eal > > > > > > Thanks, > > > Reshma > > > > Yes, I wound not mind to put this header file in librte_net, it makes s= ense > to me. But librte_net depends on librte_mbuf, so then librte_net is not a= n > option. > > > > The only two options are librte_eal and librte_mbuf. Between these two, > my vote was librte_eal (as we already have plenty of similar items in > librte_eal/common/include) instead of librte_mbuf, as to me the packet > color is not related to how DPDK decides to pick its packet meta-data. > > > > To me, librte_eal/common/include is still the best option, but I guess = I can > live with librte_mbuf in case Konstantin has a hard opinion on it. > > > > What is your choice, Konstantin? >=20 > I replied in v3 that it should stay in rte_meter.h. Strange, I did not see this reply from you ... > You can include rte_meter.h in ethdev. OK, thanks Thomas, makes sense to me as well. >=20 > The other option, agreed by Reshma, is to add black color ;) >=20 > Note: I did not see this discussion on v2 because the versions are > not in the same thread. Have I already asked to use --in-reply-to please? >=20 >=20