[dpdk-dev] [PATCH v4] sched: make RED scaling configurable

Dumitrescu, Cristian cristian.dumitrescu at intel.com
Wed Jan 3 17:20:39 CET 2018


> > > +int
> > > +rte_red_set_scaling(uint16_t max_red_queue_length);
> > > +
> > > +/**
> > > + * @brief Reset the RED scaling factor - only for use by RED
> > > +unit-tests
> > > + *
> > > + * @return Operation status
> > > + */
> > > +void
> > > +rte_red_reset_scaling(void);
> >
> > As stated above, this function is probably not useful and my vote is to
> remove it.
> >
> 
> It is needed by the revised unit-test program.  This function can't be moved
> into the unit-test program because it needs to reset variables that are
> statically declared within rte_red.c
> 
> 

Hi Alan,

We only put API that makes sense for a real app, not for unit test.

About unit tests: Each test in the unit test suite should start from scratch, i.e. create a RED object from scratch, configure it, use it, free it rather than use RED objects created by previous tests. We need to avoid the latter approach, as it is creating fake dependencies between tests that alter the overall test results. Each test should be independent, and not rely on previous tests. Makes sense?

Regards,
Cristian



More information about the dev mailing list