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

2018-01-16 Thread Dumitrescu, Cristian
> > > Hi Alan, > > > > > > What is the intention of the new rte_red_set_scaling() function? > > > 1. Is it to be called only once, before any RED object gets created? > > > 2. Is it possible to call it post-init, but in this case any RED > > > object already created are not impacted (they conti

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

2018-01-15 Thread Dewar, Alan
> > > > > diff --git a/lib/librte_sched/rte_red.c > > > > > b/lib/librte_sched/rte_red.c > > > > > +int > > > > > +rte_red_set_scaling(uint16_t max_red_queue_length) { > > > > > + int8_t count; > > > > > + > > > > > + if (rte_red_init_done) > > > > > + /** > > > > > +

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

2018-01-14 Thread Dewar, Alan
Hi Cristian, Responses inline below. Regards Alan > -Original Message- > From: Dumitrescu, Cristian [mailto:cristian.dumitre...@intel.com] > Sent: Thursday, January 11, 2018 1:11 PM > To: alangordonde...@gmail.com > Cc: dev@dpdk.org; Alan Dewar ; Kantecki, Tomasz > ; Singh, Jasvinder

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

2018-01-14 Thread Dewar, Alan
Hi Cristian, > > + > > + rte_red_scaling -= count - RTE_RED_SCALING; > > Why not simply: rte_red_scaling = count? The RED code stores the moving average in a uint32_t as a pseudo floating point number with a fixed sized fractional part of 10 bits. This allows a maximum queue length of 1024.

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

2018-01-12 Thread Dumitrescu, Cristian
; Kantecki, Tomasz ; Singh, Jasvinder > > Subject: Re: [dpdk-dev] [PATCH v5] sched: make RED scaling configurable > > ... > > > > > diff --git a/lib/librte_sched/rte_red.c b/lib/librte_sched/rte_red.c > > > > +int > > > > +rte_red_set_scaling(uint1

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

2018-01-12 Thread Dumitrescu, Cristian
> -Original Message- > From: Dewar, Alan [mailto:ad7...@intl.att.com] > Sent: Friday, January 12, 2018 10:45 AM > To: Dumitrescu, Cristian ; > 'alangordonde...@gmail.com' > Cc: 'dev@dpdk.org' ; 'Alan Dewar' ; > Kantecki, Tomasz ; Singh, Jasvinder > > Subject: RE: [PATCH v5] sched: make

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

2018-01-12 Thread Dumitrescu, Cristian
... > > > diff --git a/lib/librte_sched/rte_red.c b/lib/librte_sched/rte_red.c > > > +int > > > +rte_red_set_scaling(uint16_t max_red_queue_length) { > > > + int8_t count; > > > + > > > + if (rte_red_init_done) > > > + /** > > > + * Can't change the scaling once the red table has

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

2018-01-11 Thread Dumitrescu, Cristian
Hi Alan, More issues and questions below: ... > diff --git a/lib/librte_sched/rte_red.c b/lib/librte_sched/rte_red.h I suggest we use uint32_t for rte_red_scaling and rte_red_max_threshold, even though their values can fit into uint8_t and uint16_t respectively. > diff --git a/lib/librte_sche