Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265562
b: refs/heads/master
c: 363437f
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Aug 26, 2011
1 parent d9cdc4c commit 42f0a5f
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 18cf1248eca3f1fc38e12b314a6cadd286260e65
refs/heads/master: 363437f40a23bacdead80bb80d08d8193a20cfce
13 changes: 8 additions & 5 deletions trunk/net/sched/sch_sfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
u32 r, slot, salt, sfbhash;
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;

if (unlikely(sch->q.qlen >= q->limit)) {
sch->qstats.overlimits++;
q->stats.queuedrop++;
goto drop;
}

if (q->rehash_interval > 0) {
unsigned long limit = q->rehash_time + q->rehash_interval;

Expand Down Expand Up @@ -332,12 +338,9 @@ static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
slot ^= 1;
sfb_skb_cb(skb)->hashes[slot] = 0;

if (unlikely(minqlen >= q->max || sch->q.qlen >= q->limit)) {
if (unlikely(minqlen >= q->max)) {
sch->qstats.overlimits++;
if (minqlen >= q->max)
q->stats.bucketdrop++;
else
q->stats.queuedrop++;
q->stats.bucketdrop++;
goto drop;
}

Expand Down

0 comments on commit 42f0a5f

Please sign in to comment.