From: Yang Yingliang <yangyingliang@huawei.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
Jesper Dangaard Brouer <brouer@redhat.com>
Subject: Re: [PATCH 1/3] net: sched: tbf: fix calculation of max_size
Date: Fri, 15 Nov 2013 15:23:21 +0800 [thread overview]
Message-ID: <5285CBE9.8010100@huawei.com> (raw)
In-Reply-To: <1384439910.28458.152.camel@edumazet-glaptop2.roam.corp.google.com>
On 2013/11/14 22:38, Eric Dumazet wrote:
> On Thu, 2013-11-14 at 17:01 +0800, Yang Yingliang wrote:
>> Current max_size is caluated from rate table.
>> Now, the rate table has been replaced and it's
>> not proper to caculate max_size with rate64.
>> Use psched_ns_t2l to calculate the max_size.
>>
>> psched_ns_t2l():convert time in ns to length in
>> bytes which to determinate how many bytes can be
>> sent in given time.
>
> I have no evidence you fix a real bug.
>
> Please provide a tc script and show us it breaks.
>
> Also CC Jesper you wrote this code.
I'm sorry I made a mistake in my early description.
Here is the bug's description.
With the follow command:
tc qdisc add dev eth1 root handle 1: tbf latency 50ms burst 10KB rate 30gbit mtu 64k
Without this patch, the max_size value is 10751(bytes).
But, in fact, the real max_size value should be smaller than 7440(bytes).
Or a packet whose length is bigger than 7440 will cause network congestion.
Because the packet is so big that can't get enough tokens. Even all the tokens
in the buffer is given to the packet.
With this patch, the max_size value is 7440(bytes).
The packets whose length is bigger than 7440(bytes) will be dropped or reshape
in tbf_enqueue().
Regards,
Yang
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
next prev parent reply other threads:[~2013-11-15 7:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 9:01 [PATCH 0/3] net: sched: fix some issues introduced by 64bit rates Yang Yingliang
2013-11-14 9:01 ` [PATCH 1/3] net: sched: tbf: fix calculation of max_size Yang Yingliang
2013-11-14 14:38 ` Eric Dumazet
2013-11-15 7:23 ` Yang Yingliang [this message]
2013-11-14 9:01 ` [PATCH 2/3] net: sched: htb: fix condition of failure when rate is 0 Yang Yingliang
2013-11-14 14:37 ` Eric Dumazet
2013-11-14 9:01 ` [PATCH 3/3] net: sched: htb: fix calculation of quantum Yang Yingliang
2013-11-15 14:01 ` Eric Dumazet
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=5285CBE9.8010100@huawei.com \
--to=yangyingliang@huawei.com \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.