Skip to content

Commit

Permalink
net_sched: dsmark: use qdisc_dequeue_peeked()
Browse files Browse the repository at this point in the history
This fix is for dsmark similar to commit 3557619
("net_sched: prio: use qdisc_dequeue_peeked")
and makes use of qdisc_dequeue_peeked() instead of direct dequeue() call.

First time, wrr peeks dsmark, which will then peek into sfq.
sfq dequeues an skb and it's stored in sch->gso_skb.
Next time, wrr tries to dequeue from dsmark, which will call sfq dequeue
directly. This results skipping the previously peeked skb.

So changed dsmark dequeue to call qdisc_dequeue_peeked() instead to use
peeked skb if exists.

Signed-off-by: Kyeong Yoo <kyeong.yoo@alliedtelesis.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Kyeong Yoo authored and David S. Miller committed Mar 8, 2016
1 parent 4c38cd6 commit f8b33d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_dsmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)

pr_debug("%s(sch %p,[qdisc %p])\n", __func__, sch, p);

skb = p->q->ops->dequeue(p->q);
skb = qdisc_dequeue_peeked(p->q);
if (skb == NULL)
return NULL;

Expand Down

0 comments on commit f8b33d8

Please sign in to comment.