From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 46C201B9E7 for ; Tue, 18 Dec 2018 00:11:27 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CB05D22A5B; Mon, 17 Dec 2018 18:11:26 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 17 Dec 2018 18:11:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=ItKctaVIhhK9gDOR3K0/FiyswXjgSQKde0hthUwG2XM=; b=D7P/oNhB4F96 ZB68ZeAh5c5HXuLyvqU2fKxO0QRovy4z53XtWEmPK8Td5Ty0fwU3ve3kD6GyZPYx IBszFRaiBbKoN3VZjx5HLhKOrsH4GMoECMZr3gaC3+pTy7GyyT2v4DPvOGrJsc43 VaWsS5CDCTsZBgqif0dCTiEEY/5+erg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ItKctaVIhhK9gDOR3K0/FiyswXjgSQKde0hthUwG2 XM=; b=pfWFUsndAA3EiJeBhFhRMEjXHqdFMLAM2boVY69G4QRXJwPyxhkNwm1Hr 0ys/OJPe8NNDCPvNdPB3WIr0PCbfL+3UD1JDzAdwCLmXakobystcBWEYX0x3ptcM dlZUWBI1MUaHWMjqaJ4lHCg9KVkL+htMrq4+4KCdYzYj6ynG5rssGUrmXXDXGhvV mr0B/COCledSuyo8syv1fSS02eIa7PzNJ+T5lN/a6dsi1HZeP+OgekT5uRhZNczq DWM6XEch5GENjfQGyw94pE8RkCO2lgTvlh6u+wXvbBPjOI6oKl7S3luN45rsyyvn BGV40r9YhDI0X55YWT3shZRLIZMyQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudeigedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjg hfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcu oehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtd efrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D741E10336; Mon, 17 Dec 2018 18:11:24 -0500 (EST) From: Thomas Monjalon To: "Dumitrescu, Cristian" , "Pattan, Reshma" Cc: dev@dpdk.org, "Ananyev, Konstantin" , "jerin.jacob@caviumnetworks.com" , "Singh, Jasvinder" , david.marchand@redhat.com Date: Tue, 18 Dec 2018 00:11:22 +0100 Message-ID: <1646379.j0tofnCs90@xps> In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891268E816063@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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Mon, 17 Dec 2018 23:11:27 -0000 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 = 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 > > 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 used 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 inside > > 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 libraries > > already have dependency on mbuf library, so cannot create loop > > dependency. > > > > Snippet > > > > 1) DEPDIRS-librte_eal := librte_kvargs > > > > 2)DEPDIRS-librte_mbuf := librte_eal librte_mempool > > > > 3)DEPDIRS-librte_ethdev := librte_net librte_eal librte_mempool librte_ring > > DEPDIRS-librte_ethdev += librte_mbuf > > DEPDIRS-librte_ethdev += librte_kvargs > > DEPDIRS-librte_ethdev += librte_cmdline > > > > 4) DEPDIRS-librte_net := librte_mbuf librte_eal > > > > 5) DEPDIRS-librte_meter := librte_eal > > > > Thanks, > > Reshma > > Yes, I wound not mind to put this header file in librte_net, it makes sense to me. But librte_net depends on librte_mbuf, so then librte_net is not an 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? I replied in v3 that it should stay in rte_meter.h. You can include rte_meter.h in ethdev. The other option, agreed by Reshma, is to add black color ;) 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?