[dpdk-dev] [PATCH] mbuf: implement generic format for sched field

Singh, Jasvinder jasvinder.singh at intel.com
Wed Dec 5 13:22:30 CET 2018



> -----Original Message-----
> From: Dumitrescu, Cristian
> Sent: Tuesday, December 4, 2018 5:39 PM
> To: Singh, Jasvinder <jasvinder.singh at intel.com>; dev at dpdk.org
> Cc: Pattan, Reshma <reshma.pattan at intel.com>
> Subject: RE: [PATCH] mbuf: implement generic format for sched field
> 
> > >
> > > > +				uint8_t color;   /**< Color. */
> > >
> > > We should create a new file rte_color.h in a common place
> > > (librte_eal/common/include) to consolidate the color definition,
> > > which is currently replicated in too many places, such as:
> > > rte_meter.h, rte_mtr.h, rte_tm.h.
> > >
> > > We should include the rte_color.h file here (and in the above header
> > > files)
> > >
> > > We should also document the link between this field and the color
> > > enum
> > type
> > > (@see ...).
> >
> > Replacing the existing color definition with the above suggested one
> > in rte_meter.h (librte_meter) would be ABI break. We can do it
> > separately through different patch.
> >
> > >
> 
> We can avoid any such issues in a two step process:
> 1. Create aliases to the new color in rte_meter.h, rte_mtr.h and rte_tm.h at
> this point.
> 2. Announce deprecation of the existing color enums in favor of the new
> unified color enum at this point and remove during next release.
> 
> Example:
> //file "rte_meter.h"
> #include <rte_color.h>
> 
> #define rte_meter_color rte_color
> #define RTE_METER_GREEN RTE_COLOR_GREEN
> #define RTE_METER_YELLOW RTE_COLOR_YELLOW #define RTE_METER_RED
> RTE_COLOR_RED
> 
> Makes sense?

Looks ok.  We will do this clean-up work in a separate patch instead of mixing with mbuf patch. Thanks.

 


More information about the dev mailing list