diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-05-25 08:40:11 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-26 01:55:32 +0400 |
commit | 07bd8df5df4369487812bf85a237322ff3569b77 (patch) | |
tree | d610d0a326c63551f98ed50821f6603b506527b1 | |
parent | 367bbf2aa1654c12ab5d6dbf4428b043b425be29 (diff) | |
download | linux-07bd8df5df4369487812bf85a237322ff3569b77.tar.xz |
sch_sfq: fix peek() implementation
Since commit eeaeb068f139 (sch_sfq: allow big packets and be fair),
sfq_peek() can return a different skb that would be normally dequeued by
sfq_dequeue() [ if current slot->allot is negative ]
Use generic qdisc_peek_dequeued() instead of custom implementation, to
get consistent result.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jarek Poplawski <jarkao2@gmail.com>
CC: Patrick McHardy <kaber@trash.net>
CC: Jesper Dangaard Brouer <hawk@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/sched/sch_sfq.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index b1d00f8e09f8..b6ea6afa55b0 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -414,18 +414,6 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch) } static struct sk_buff * -sfq_peek(struct Qdisc *sch) -{ - struct sfq_sched_data *q = qdisc_priv(sch); - - /* No active slots */ - if (q->tail == NULL) - return NULL; - - return q->slots[q->tail->next].skblist_next; -} - -static struct sk_buff * sfq_dequeue(struct Qdisc *sch) { struct sfq_sched_data *q = qdisc_priv(sch); @@ -706,7 +694,7 @@ static struct Qdisc_ops sfq_qdisc_ops __read_mostly = { .priv_size = sizeof(struct sfq_sched_data), .enqueue = sfq_enqueue, .dequeue = sfq_dequeue, - .peek = sfq_peek, + .peek = qdisc_peek_dequeued, .drop = sfq_drop, .init = sfq_init, .reset = sfq_reset, |