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

Dumitrescu, Cristian cristian.dumitrescu at intel.com
Tue Dec 4 18:39:27 CET 2018

> >
> > > +				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.

//file "rte_meter.h"
#include <rte_color.h>

#define rte_meter_color rte_color

Makes sense?

More information about the dev mailing list