netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <cwang@twopensource.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
	netdev <netdev@vger.kernel.org>,
	Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: [Patch net-next v2 2/4] net_sched: update hierarchical backlog too
Date: Mon, 2 Nov 2015 13:50:40 -0800	[thread overview]
Message-ID: <CAHA+R7MogROyXLDhT7FrVLiLRhJueB0DmKGVDr49xDxcT2Q2KA@mail.gmail.com> (raw)
In-Reply-To: <1446499257.23275.33.camel@edumazet-glaptop2.roam.corp.google.com>

On Mon, Nov 2, 2015 at 1:20 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> Well, before your changes, the qdisc_tree_decrease_qlen(sch, 0) would
> have been useless, since qdisc_tree_decrease_qlen() does nothing in this
> case [1]
>
> But after your changes, we need to change the backlog, even if the qlen
> does not change.
>
> Maybe I missed something, but your patch is not really obvious ;)
>

Oh, very good point... You actually mean in some cases we enqueue
one packet and then drop one packet which ends up with dropping 0
packet but the backlog size goes down by (drop_len - enqueue_len). :)

Hmm, I need to double check for this case for sure, but for sfq case,
I just did:

-       qdisc_tree_decrease_qlen(sch, 1);
+       qdisc_tree_reduce_backlog(sch, 1, dropped);

which isn't the case where n==0, like you mentioned.

I am auditing that case for all the qdisc's anyway.

Thanks.

  reply	other threads:[~2015-11-02 21:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 18:22 [Patch net-next v2 0/4] net_sched: update backlog for hierarchical qdisc's Cong Wang
2015-10-30 18:22 ` [Patch net-next v2 1/4] net_sched: introduce qdisc_replace() helper Cong Wang
2015-10-30 18:22 ` [Patch net-next v2 2/4] net_sched: update hierarchical backlog too Cong Wang
2015-10-30 19:30   ` Eric Dumazet
2015-11-02 21:09     ` Cong Wang
2015-11-02 21:20       ` Eric Dumazet
2015-11-02 21:50         ` Cong Wang [this message]
2015-10-30 18:22 ` [Patch net-next v2 3/4] sch_htb: update backlog as well Cong Wang
2015-10-30 18:22 ` [Patch net-next v2 4/4] sch_dsmark: " Cong Wang

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=CAHA+R7MogROyXLDhT7FrVLiLRhJueB0DmKGVDr49xDxcT2Q2KA@mail.gmail.com \
    --to=cwang@twopensource.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /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).