From: Cong Wang <xiyou.wangcong@gmail.com>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jiri Pirko <jiri@resnulli.us>
Subject: Re: [PATCH] net_sched/hhf: update hierarchical backlog when drop packet
Date: Mon, 21 Aug 2017 09:52:12 -0700 [thread overview]
Message-ID: <CAM_iQpU4bQsNVHrooO1Mu_nmUvaD5WxQNmKiJBxOSmOtBBWvcQ@mail.gmail.com> (raw)
In-Reply-To: <150330315167.155003.1998024290510727078.stgit@buzz>
On Mon, Aug 21, 2017 at 1:12 AM, Konstantin Khlebnikov
<khlebnikov@yandex-team.ru> wrote:
> When hhf_enqueue() drops packet from another bucket it
> have to update backlog at upper qdiscs too.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too")
> ---
> net/sched/sch_hhf.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
> index 51d3ba682af9..c8d84436e427 100644
> --- a/net/sched/sch_hhf.c
> +++ b/net/sched/sch_hhf.c
> @@ -406,8 +406,11 @@ static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch,
> /* Return Congestion Notification only if we dropped a packet from this
> * bucket.
> */
> - if (hhf_drop(sch, to_free) == idx)
> + if (hhf_drop(sch, to_free) == idx) {
> + qdisc_tree_reduce_backlog(sch, 0,
It should be 1 here instead of 0, because one packet is dropped
even if hhf_drop() == idx.
> + prev_backlog - sch->qstats.backlog);
> return NET_XMIT_CN;
> + }
>
> /* As we dropped a packet, better let upper stack know this. */
> qdisc_tree_reduce_backlog(sch, 1, prev_backlog - sch->qstats.backlog);
>
next prev parent reply other threads:[~2017-08-21 16:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 8:12 [PATCH] net_sched/hhf: update hierarchical backlog when drop packet Konstantin Khlebnikov
2017-08-21 16:52 ` Cong Wang [this message]
[not found] ` <16531503334617@webcorp01h.yandex-team.ru>
2017-08-21 16:59 ` David Miller
2017-08-21 17:03 ` 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=CAM_iQpU4bQsNVHrooO1Mu_nmUvaD5WxQNmKiJBxOSmOtBBWvcQ@mail.gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=khlebnikov@yandex-team.ru \
--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).