From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Pattan, Reshma" Subject: Re: [PATCH v2 2/3] eal: add new rte color definition Date: Mon, 17 Dec 2018 17:15:17 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A3EB753@irsmsx110.ger.corp.intel.com> References: <20181123165423.134922-1-jasvinder.singh@intel.com> <1544193116-7058-2-git-send-email-reshma.pattan@intel.com> <2601191342CEEE43887BDE71AB977258010D8BA5F8@IRSMSX106.ger.corp.intel.com> <3EB4FA525960D640B5BDFFD6A3D891268E81545F@IRSMSX108.ger.corp.intel.com> <2601191342CEEE43887BDE71AB977258010D8BB16D@IRSMSX106.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: "Ananyev, Konstantin" , "Dumitrescu, Cristian" , "dev@dpdk.org" , "jerin.jacob@caviumnetworks.com" , "Singh, Jasvinder" Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 5EF0B25D9 for ; Mon, 17 Dec 2018 18:15:21 +0100 (CET) In-Reply-To: <2601191342CEEE43887BDE71AB977258010D8BB16D@IRSMSX106.ger.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Monday, December 17, 2018 11:21 AM > To: Dumitrescu, Cristian ; Pattan, Reshma > ; dev@dpdk.org; > jerin.jacob@caviumnetworks.com; Singh, Jasvinder > > Cc: Pattan, Reshma > Subject: RE: [dpdk-dev] [PATCH v2 2/3] eal: add new rte color definition >=20 >=20 >=20 > > -----Original Message----- > > From: Dumitrescu, Cristian > > Sent: Saturday, December 15, 2018 12:16 AM > > To: Ananyev, Konstantin ; Pattan, Reshma > > ; dev@dpdk.org; > > jerin.jacob@caviumnetworks.com; Singh, Jasvinder > > > > Cc: Pattan, Reshma > > Subject: RE: [dpdk-dev] [PATCH v2 2/3] eal: add new rte color > > definition > > > > > > > > > -----Original Message----- > > > From: Ananyev, Konstantin > > > Sent: Friday, December 14, 2018 11:36 PM > > > To: Pattan, Reshma ; dev@dpdk.org; > > > Dumitrescu, Cristian ; > > > jerin.jacob@caviumnetworks.com; Singh, Jasvinder > > > > > > Cc: Pattan, Reshma > > > Subject: RE: [dpdk-dev] [PATCH v2 2/3] eal: add new rte color > > > definition > > > > > > Hi Reshma, > > > > > > > diff --git a/lib/librte_eal/common/include/rte_color.h > > > b/lib/librte_eal/common/include/rte_color.h > > > > new file mode 100644 > > > > index 000000000..f4387071b > > > > --- /dev/null > > > > +++ b/lib/librte_eal/common/include/rte_color.h > > > > @@ -0,0 +1,18 @@ > > > > +/* SPDX-License-Identifier: BSD-3-Clause > > > > + * Copyright(c) 2018 Intel Corporation */ > > > > + > > > > +#ifndef _RTE_COLOR_H_ > > > > +#define _RTE_COLOR_H_ > > > > + > > > > +/** > > > > + * Color > > > > + */ > > > > +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, sched, as > > well as drivers. We'd like to avoid adding more complexity to dependenc= ies > between libraries. > > > > It is very generic. EAL common/include is currently the place to put > > generic data structures, functions, algs, etc that are widely used by D= PDK > libraries. Lots of similar examples are easy to find in this folder. >=20 > 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. >=20 > > > > Where else would you put it? >=20 > If it defines format of rte_mbuf fileds, then probably new .h inside libr= te_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_co= lor.h in eal or mbuf library only. Cannot keep it inside ethdev or net libraries because these two libraries a= lready 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_ri= ng DEPDIRS-librte_ethdev +=3D librte_mbuf DEPDIRS-librte_ethdev +=3D librte_kvargs DEPDIRS-librte_ethdev +=3D librte_cmdline=20 4) DEPDIRS-librte_net :=3D librte_mbuf librte_eal 5) DEPDIRS-librte_meter :=3D librte_eal Thanks, Reshma