[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpWb7iriz32qYeEeJhYUtstMbDoKqDFb=s4GNDego7nhCw@mail.gmail.com>
Date: Wed, 2 Mar 2016 14:01:36 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Kyeong Yoo <Kyeong.Yoo@...iedtelesis.co.nz>
Cc: "jhs@...atatu.com" <jhs@...atatu.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: net_sched: dsmark: use qdisc_dequeue_peeked()
On Wed, Mar 2, 2016 at 1:19 PM, Kyeong Yoo
<Kyeong.Yoo@...iedtelesis.co.nz> wrote:
> Author: Kyeong Yoo <kyeong.yoo@...iedtelesis.co.nz>
>
> net_sched: dsmark: use qdisc_dequeue_peeked()
>
> This fix is for dsmark similar to commit 3557619f0f6f7496ed453d4825e249
> ("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@...iedtelesis.co.nz>
Reviewed-by: Cong Wang <xiyou.wangcong@...il.com>
Thanks!
>
> diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
> index f357f34..b204472 100644
> --- a/net/sched/sch_dsmark.c
> +++ b/net/sched/sch_dsmark.c
> @@ -281,7 +281,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;
>
Powered by blists - more mailing lists