From: "Pattan, Reshma" <reshma.pattan@intel.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>,
"Singh, Jasvinder" <jasvinder.singh@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/3] eal: add new rte color definition
Date: Tue, 18 Dec 2018 10:41:03 +0000 [thread overview]
Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A3EC4A0@irsmsx110.ger.corp.intel.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB977258010D8BBC1C@IRSMSX106.ger.corp.intel.com>
Hi,
> -----Original Message-----
> From: Ananyev, Konstantin
> Sent: Tuesday, December 18, 2018 10:38 AM
> To: Pattan, Reshma <reshma.pattan@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; dev@dpdk.org;
> jerin.jacob@caviumnetworks.com; Singh, Jasvinder
> <jasvinder.singh@intel.com>
> 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 = 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?
> > >
> > > If to choose between EAL and mbuf - I would choose mbuf, that what I
> > > stated in my previous mail, see above.
> > > BTW, I probably missing something, but why rte_net is not an option?
> > > What circular dependency you are talking about?
> > > Konstantin
> > >
> >
> > Since librte_net has mbuf in its dependent list as below from lib/Makefile.
> > i.e. DEPDIRS-librte_net := librte_mbuf librte_eal
> >
> > So now, If we move rte_color.h to librte_net, then need to add
> > librte_net to mbuf dependency list(as we are using rte_color.h in
> > rte_mbuf.h)
> >
> > Current mbuf dependency list is
> > DEPDIRS-librte_mbuf := librte_eal librte_mempool
> >
> > The new will be
> > DEPDIRS-librte_mbuf := librte_eal librte_mempool librte_net
> >
> > So this will create circular dependency, I think this is not allowed in DPDK right?
>
> I understand that part, but why rte_color definitions have to be visible by
> rte_mbuf?
> Do you refer it in rte_mbuf functions?
Oh yes, in 2nd patch of this patchset we have added new set/get functions in librte_mbuf, there ,we are referring the rte_color.
I am sorry I would have been more explicit in my earlier mail.
Thanks,
Reshma
next prev parent reply other threads:[~2018-12-18 10:41 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-23 16:54 [dpdk-dev] [PATCH] mbuf: implement generic format for sched field Jasvinder Singh
2018-11-26 11:37 ` Dumitrescu, Cristian
2018-11-29 10:42 ` Singh, Jasvinder
2018-12-04 17:39 ` Dumitrescu, Cristian
2018-12-05 12:22 ` Singh, Jasvinder
2018-12-01 14:22 ` Jerin Jacob
2018-12-05 11:15 ` Singh, Jasvinder
2018-12-10 17:49 ` Dumitrescu, Cristian
2018-12-07 14:31 ` [dpdk-dev] [PATCH v2 1/3] " Reshma Pattan
2018-12-11 19:02 ` Dumitrescu, Cristian
2018-12-12 18:17 ` Dumitrescu, Cristian
2018-12-13 8:51 ` Rao, Nikhil
2018-12-13 18:08 ` [dpdk-dev] [PATCH v3 1/2] eal: add new rte color definition Reshma Pattan
2018-12-13 18:08 ` [dpdk-dev] [PATCH v3 2/2] mbuf: implement generic format for sched field Reshma Pattan
2018-12-14 22:52 ` Dumitrescu, Cristian
2018-12-20 8:32 ` Olivier Matz
2018-12-20 11:19 ` Dumitrescu, Cristian
2018-12-14 22:19 ` [dpdk-dev] [PATCH v3 1/2] eal: add new rte color definition Dumitrescu, Cristian
2018-12-17 20:35 ` Thomas Monjalon
2018-12-18 15:40 ` [dpdk-dev] [PATCH v4 1/2] meter: " Reshma Pattan
2018-12-18 15:40 ` [dpdk-dev] [PATCH v4 2/2] mbuf: implement generic format for sched field Reshma Pattan
2018-12-19 15:34 ` [dpdk-dev] [PATCH v5 1/2] meter: add new rte color definition Reshma Pattan
2018-12-19 15:34 ` [dpdk-dev] [PATCH v5 2/2] mbuf: implement generic format for sched field Reshma Pattan
2018-12-19 15:42 ` [dpdk-dev] [PATCH v6 1/2] meter: add new rte color definition Reshma Pattan
2018-12-19 15:42 ` [dpdk-dev] [PATCH v6 2/2] mbuf: implement generic format for sched field Reshma Pattan
2018-12-19 18:14 ` Ananyev, Konstantin
2018-12-20 8:29 ` Olivier Matz
2018-12-20 11:28 ` Dumitrescu, Cristian
2018-12-20 12:41 ` Olivier Matz
2018-12-20 12:16 ` [dpdk-dev] [PATCH v7 1/2] meter: add new rte color definition Reshma Pattan
2018-12-20 12:16 ` [dpdk-dev] [PATCH v7 2/2] mbuf: implement generic format for sched field Reshma Pattan
2018-12-20 12:43 ` Olivier Matz
2018-12-20 19:11 ` Dumitrescu, Cristian
2018-12-20 14:55 ` Rao, Nikhil
2019-01-15 22:37 ` Stephen Hemminger
2019-01-16 9:19 ` Pattan, Reshma
2019-01-16 9:33 ` Dumitrescu, Cristian
2019-01-16 10:09 ` Singh, Jasvinder
2019-01-15 23:11 ` Stephen Hemminger
2019-01-16 8:41 ` Thomas Monjalon
2018-12-07 14:31 ` [dpdk-dev] [PATCH v2 2/3] eal: add new rte color definition Reshma Pattan
2018-12-10 18:24 ` Dumitrescu, Cristian
2018-12-14 23:35 ` Ananyev, Konstantin
2018-12-15 0:16 ` Dumitrescu, Cristian
2018-12-17 11:21 ` Ananyev, Konstantin
2018-12-17 17:15 ` Pattan, Reshma
2018-12-17 18:51 ` Dumitrescu, Cristian
2018-12-17 23:11 ` Thomas Monjalon
2018-12-18 10:30 ` Dumitrescu, Cristian
2018-12-18 11:18 ` Dumitrescu, Cristian
2018-12-18 12:38 ` Thomas Monjalon
2018-12-18 13:19 ` Dumitrescu, Cristian
2018-12-18 13:39 ` Thomas Monjalon
2018-12-18 17:07 ` Ananyev, Konstantin
2018-12-18 19:34 ` Dumitrescu, Cristian
2018-12-18 20:19 ` Thomas Monjalon
2018-12-19 10:47 ` Dumitrescu, Cristian
2018-12-19 10:50 ` Thomas Monjalon
2018-12-19 10:52 ` Ananyev, Konstantin
2018-12-19 10:49 ` Ananyev, Konstantin
2018-12-19 11:04 ` Dumitrescu, Cristian
2018-12-18 10:15 ` Ananyev, Konstantin
2018-12-18 10:25 ` Pattan, Reshma
2018-12-18 10:38 ` Ananyev, Konstantin
2018-12-18 10:41 ` Pattan, Reshma [this message]
2018-12-18 10:52 ` Singh, Jasvinder
2018-12-18 12:10 ` Ananyev, Konstantin
2018-12-15 14:15 ` Mattias Rönnblom
2018-12-17 7:27 ` Pattan, Reshma
2018-12-17 9:41 ` Dumitrescu, Cristian
2018-12-17 19:36 ` Mattias Rönnblom
2018-12-17 23:24 ` Ferruh Yigit
2018-12-07 14:31 ` [dpdk-dev] [PATCH v2 3/3] doc: add deprecation notice to remove rte meter color Reshma Pattan
2018-12-11 14:58 ` Dumitrescu, Cristian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AEA2BF9852C6F48A459DA490692831F2A3EC4A0@irsmsx110.ger.corp.intel.com \
--to=reshma.pattan@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=konstantin.ananyev@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).