Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322804
b: refs/heads/master
c: ba1bf47
h: refs/heads/master
v: v3
  • Loading branch information
David Ward authored and David S. Miller committed Sep 13, 2012
1 parent 5ec0454 commit 54c57aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1fe37b106b039d9358fd1211c39b1fa199e547a8
refs/heads/master: ba1bf474eae07a128fae6252bf7d68eaef0eacf8
26 changes: 15 additions & 11 deletions trunk/net/sched/sch_gred.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ static inline void gred_store_wred_set(struct gred_sched *table,
struct gred_sched_data *q)
{
table->wred_set.qavg = q->vars.qavg;
table->wred_set.qidlestart = q->vars.qidlestart;
}

static inline int gred_use_ecn(struct gred_sched *t)
Expand Down Expand Up @@ -259,16 +260,18 @@ static struct sk_buff *gred_dequeue(struct Qdisc *sch)
} else {
q->backlog -= qdisc_pkt_len(skb);

if (!q->backlog && !gred_wred_mode(t))
red_start_of_idle_period(&q->vars);
if (gred_wred_mode(t)) {
if (!sch->qstats.backlog)
red_start_of_idle_period(&t->wred_set);
} else {
if (!q->backlog)
red_start_of_idle_period(&q->vars);
}
}

return skb;
}

if (gred_wred_mode(t) && !red_is_idling(&t->wred_set))
red_start_of_idle_period(&t->wred_set);

return NULL;
}

Expand All @@ -290,19 +293,20 @@ static unsigned int gred_drop(struct Qdisc *sch)
q->backlog -= len;
q->stats.other++;

if (!q->backlog && !gred_wred_mode(t))
red_start_of_idle_period(&q->vars);
if (gred_wred_mode(t)) {
if (!sch->qstats.backlog)
red_start_of_idle_period(&t->wred_set);
} else {
if (!q->backlog)
red_start_of_idle_period(&q->vars);
}
}

qdisc_drop(skb, sch);
return len;
}

if (gred_wred_mode(t) && !red_is_idling(&t->wred_set))
red_start_of_idle_period(&t->wred_set);

return 0;

}

static void gred_reset(struct Qdisc *sch)
Expand Down

0 comments on commit 54c57aa

Please sign in to comment.