Skip to content

Commit

Permalink
[PKT_SCHED]: GRED: Do not reset statistics in gred_reset/gred_change
Browse files Browse the repository at this point in the history
Qdiscs are not supposed to reset statistics in reset() and while
changing parameters. My argumentation is that if the user wants
the counters to be reset he can simply remove and readd the
qdiscs, that's what most users do anyway.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
  • Loading branch information
tgraf authored and Thomas Graf committed Nov 5, 2005
1 parent 22b3342 commit 301d063
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions net/sched/sch_gred.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,6 @@ static void gred_reset(struct Qdisc* sch)
continue;
red_restart(&q->parms);
q->backlog = 0;
q->stats.other = 0;
q->stats.forced_drop = 0;
q->stats.prob_drop = 0;
q->stats.pdrop = 0;
}
}

Expand Down Expand Up @@ -434,11 +430,6 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp,
ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Plog,
ctl->Scell_log, stab);

q->stats.other = 0;
q->stats.forced_drop = 0;
q->stats.prob_drop = 0;
q->stats.pdrop = 0;

return 0;
}

Expand Down

0 comments on commit 301d063

Please sign in to comment.