All of lore.kernel.org
 help / color / mirror / Atom feed
* net_sched: gred: red_calc_qavg() called with current qavg for backlog?
@ 2012-04-21 18:46 Ward, David - 0663 - MITLL
  2012-04-21 20:10 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Ward, David - 0663 - MITLL @ 2012-04-21 18:46 UTC (permalink / raw)
  To: Thomas Graf, Eric Dumazet; +Cc: netdev

In net/sched/sch_gred.c:

static int gred_dump(struct Qdisc *sch, struct sk_buff *skb)
{
     struct gred_sched *table = qdisc_priv(sch);
...
     for (i = 0; i < MAX_DPs; i++) {
         struct gred_sched_data *q = table->tab[i];
         struct tc_gred_qopt opt;
...
         opt.qave = red_calc_qavg(&q->parms, &q->vars, q->vars.qavg);


I can't tell if red_calc_qavg is intentionally being passed the current 
qavg as the backlog (which effectively causes qavg to only be 
re-calculated if we are idling)?  Or should this be:

         opt.qave = red_calc_qavg(&q->parms,
                                  &q->vars,
                                  gred_backlog(table, q, sch));

Thanks,

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: net_sched: gred: red_calc_qavg() called with current qavg for backlog?
  2012-04-21 18:46 net_sched: gred: red_calc_qavg() called with current qavg for backlog? Ward, David - 0663 - MITLL
@ 2012-04-21 20:10 ` David Miller
  2012-04-24 12:37   ` Thomas Graf
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2012-04-21 20:10 UTC (permalink / raw)
  To: david.ward; +Cc: tgraf, eric.dumazet, netdev

From: "Ward, David - 0663 - MITLL" <david.ward@ll.mit.edu>
Date: Sat, 21 Apr 2012 14:46:31 -0400

> In net/sched/sch_gred.c:
> 
> static int gred_dump(struct Qdisc *sch, struct sk_buff *skb)
> {
>      struct gred_sched *table = qdisc_priv(sch);
> ...
>      for (i = 0; i < MAX_DPs; i++) {
>          struct gred_sched_data *q = table->tab[i];
>          struct tc_gred_qopt opt;
> ...
>          opt.qave = red_calc_qavg(&q->parms, &q->vars, q->vars.qavg);
> 
> 
> I can't tell if red_calc_qavg is intentionally being passed the current 
> qavg as the backlog (which effectively causes qavg to only be 
> re-calculated if we are idling)?  Or should this be:
> 
>          opt.qave = red_calc_qavg(&q->parms,
>                                   &q->vars,
>                                   gred_backlog(table, q, sch));

Looking at commit 22b33429ab93155895854e9518a253680a920493
("[PKT_SCHED]: GRED: Use new generic red interface") it appears
that this line is intentional so that the dump reports the same
qave as it would have before Thomas's changes.

Thomas?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: net_sched: gred: red_calc_qavg() called with current qavg for backlog?
  2012-04-21 20:10 ` David Miller
@ 2012-04-24 12:37   ` Thomas Graf
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Graf @ 2012-04-24 12:37 UTC (permalink / raw)
  To: David Miller; +Cc: david.ward, tgraf, eric.dumazet, netdev

On Sat, Apr 21, 2012 at 04:10:32PM -0400, David Miller wrote:
> From: "Ward, David - 0663 - MITLL" <david.ward@ll.mit.edu>
> Date: Sat, 21 Apr 2012 14:46:31 -0400
> 
> > In net/sched/sch_gred.c:
> > 
> > static int gred_dump(struct Qdisc *sch, struct sk_buff *skb)
> > {
> >      struct gred_sched *table = qdisc_priv(sch);
> > ...
> >      for (i = 0; i < MAX_DPs; i++) {
> >          struct gred_sched_data *q = table->tab[i];
> >          struct tc_gred_qopt opt;
> > ...
> >          opt.qave = red_calc_qavg(&q->parms, &q->vars, q->vars.qavg);
> > 
> > 
> > I can't tell if red_calc_qavg is intentionally being passed the current 
> > qavg as the backlog (which effectively causes qavg to only be 
> > re-calculated if we are idling)?  Or should this be:
> > 
> >          opt.qave = red_calc_qavg(&q->parms,
> >                                   &q->vars,
> >                                   gred_backlog(table, q, sch));
> 
> Looking at commit 22b33429ab93155895854e9518a253680a920493
> ("[PKT_SCHED]: GRED: Use new generic red interface") it appears
> that this line is intentional so that the dump reports the same
> qave as it would have before Thomas's changes.

When doing the convert, I simply preserved behaviour. I am not sure on
what basis the original behaviour has been written.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-24 12:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-21 18:46 net_sched: gred: red_calc_qavg() called with current qavg for backlog? Ward, David - 0663 - MITLL
2012-04-21 20:10 ` David Miller
2012-04-24 12:37   ` Thomas Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.