netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Kyeong Yoo <Kyeong.Yoo@alliedtelesis.co.nz>
Cc: "jhs@mojatatu.com" <jhs@mojatatu.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: net_sched: dsmark: use qdisc_dequeue_peeked()
Date: Wed, 2 Mar 2016 14:01:36 -0800	[thread overview]
Message-ID: <CAM_iQpWb7iriz32qYeEeJhYUtstMbDoKqDFb=s4GNDego7nhCw@mail.gmail.com> (raw)
In-Reply-To: <1456953590.3297.58.camel@kyeongy-dl>

On Wed, Mar 2, 2016 at 1:19 PM, Kyeong Yoo
<Kyeong.Yoo@alliedtelesis.co.nz> wrote:
> Author: Kyeong Yoo <kyeong.yoo@alliedtelesis.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@alliedtelesis.co.nz>


Reviewed-by: Cong Wang <xiyou.wangcong@gmail.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;
>

  reply	other threads:[~2016-03-02 22:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02  4:10 net_sched: dsmark: use qdisc_dequeue_peeked() Kyeong Yoo
2016-03-02 14:56 ` Sergei Shtylyov
2016-03-02 18:26 ` Cong Wang
2016-03-02 21:19   ` Kyeong Yoo
2016-03-02 22:01     ` Cong Wang [this message]
2016-03-03  5:52     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM_iQpWb7iriz32qYeEeJhYUtstMbDoKqDFb=s4GNDego7nhCw@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=Kyeong.Yoo@alliedtelesis.co.nz \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).