[dpdk-dev] [PATCH v2 2/3] eal: add new rte color definition

Ananyev, Konstantin konstantin.ananyev at intel.com
Mon Dec 17 12:21:12 CET 2018



> -----Original Message-----
> From: Dumitrescu, Cristian
> Sent: Saturday, December 15, 2018 12:16 AM
> To: Ananyev, Konstantin <konstantin.ananyev at intel.com>; Pattan, Reshma <reshma.pattan at intel.com>; dev at dpdk.org;
> jerin.jacob at caviumnetworks.com; Singh, Jasvinder <jasvinder.singh at intel.com>
> Cc: Pattan, Reshma <reshma.pattan at intel.com>
> 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 <reshma.pattan at intel.com>; dev at dpdk.org;
> > Dumitrescu, Cristian <cristian.dumitrescu at intel.com>;
> > jerin.jacob at caviumnetworks.com; Singh, Jasvinder
> > <jasvinder.singh at intel.com>
> > Cc: Pattan, Reshma <reshma.pattan at 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.
Konstantin


More information about the dev mailing list