Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65079
b: refs/heads/master
c: 5588b40
h: refs/heads/master
i:
  65077: a340847
  65075: 4b8a459
  65071: d1b4a34
v: v3
  • Loading branch information
Alexey Kuznetsov authored and David S. Miller committed Sep 20, 2007
1 parent 65427ee commit 67488d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: 1a03b81db96aeaac0276224f25c0701a1ba37318
refs/heads/master: 5588b40d7c2bff75ee573ed42d1738c73ce24492
10 changes: 5 additions & 5 deletions trunk/net/sched/sch_sfq.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc* sch)
q->tail = x;
}
}
if (++sch->q.qlen < q->limit-1) {
if (++sch->q.qlen <= q->limit) {
sch->bstats.bytes += skb->len;
sch->bstats.packets++;
return 0;
Expand Down Expand Up @@ -306,7 +306,7 @@ sfq_requeue(struct sk_buff *skb, struct Qdisc* sch)
q->tail = x;
}
}
if (++sch->q.qlen < q->limit - 1) {
if (++sch->q.qlen <= q->limit) {
sch->qstats.requeues++;
return 0;
}
Expand Down Expand Up @@ -391,10 +391,10 @@ static int sfq_change(struct Qdisc *sch, struct rtattr *opt)
q->quantum = ctl->quantum ? : psched_mtu(sch->dev);
q->perturb_period = ctl->perturb_period*HZ;
if (ctl->limit)
q->limit = min_t(u32, ctl->limit, SFQ_DEPTH);
q->limit = min_t(u32, ctl->limit, SFQ_DEPTH - 2);

qlen = sch->q.qlen;
while (sch->q.qlen >= q->limit-1)
while (sch->q.qlen > q->limit)
sfq_drop(sch);
qdisc_tree_decrease_qlen(sch, qlen - sch->q.qlen);

Expand Down Expand Up @@ -423,7 +423,7 @@ static int sfq_init(struct Qdisc *sch, struct rtattr *opt)
q->dep[i+SFQ_DEPTH].next = i+SFQ_DEPTH;
q->dep[i+SFQ_DEPTH].prev = i+SFQ_DEPTH;
}
q->limit = SFQ_DEPTH;
q->limit = SFQ_DEPTH - 2;
q->max_depth = 0;
q->tail = SFQ_DEPTH;
if (opt == NULL) {
Expand Down

0 comments on commit 67488d8

Please sign in to comment.