From: Yang Yingliang <yangyingliang@huawei•com>
To: David Miller <davem@davemloft•net>
Cc: <eric.dumazet@gmail•com>, <netdev@vger•kernel.org>,
<brouer@redhat•com>, <jpirko@redhat•com>, <jbrouer@redhat•com>
Subject: Re: [PATCH] net: sched: tbf: fix calculation of max_size
Date: Tue, 3 Dec 2013 08:59:32 +0800 [thread overview]
Message-ID: <529D2CF4.7090003@huawei.com> (raw)
In-Reply-To: <20131202.114534.2139333951615698198.davem@davemloft.net>
On 2013/12/3 0:45, David Miller wrote:
> From: Yang Yingliang <yangyingliang@huawei•com>
> Date: Mon, 25 Nov 2013 20:04:23 +0800
>
>> From: Yang Yingliang <yangyingliang@huawei•com>
>>
>> Current max_size is caluated from rate table. Now, the rate table
>> has been replaced and it's wrong to caculate max_size based on this
>> rate table. It can lead wrong calculation of max_size.
>>
>> The burst in kernel may be lower than user asked, because burst may gets
>> some loss when transform it to buffer(E.g. "burst 40kb rate 30mbit/s")
>> and it seems we cannot avoid this loss. And burst's value(max_size) based
>> on rate table may be equal user asked. If a packet's length is max_size,
>> this packet will be stalled in tbf_dequeue() because its length is above
>> the burst in kernel so that it cannot get enough tokens. The max_size guards
>> against enqueuing packet sizes above q->buffer "time" in tbf_enqueue().
>>
>> This patch fixes the calculation of max_size by using psched_l2t_ns() and
>> q->buffer to recalculate burst(max_size).
>>
>> Also, add support to get burst from userland directly. We can avoid loss
>> in byte-to-time transform by using burst directly. Iproute2 will need a
>> patch to send burst to kernel.
>>
>> Suggested-by: Jesper Dangaard Brouer <jbrouer@redhat•com>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei•com>
>
> I don't see why you need to add the userland explicit burst capability
> to fix the calculation of max_size.
>
> These two things are separate, the new netlink attributes are a new
> feature.
>
> Therefore, please submit these two things separately. First, submit
> the pure max_size bug fix for 'net'. Then when I open 'net-next' back
> up you can submit the support for the new netlink attributes.
>
> Thanks.
>
OK, I'll send a v4.
Regards,
Yang
>
> .
>
next prev parent reply other threads:[~2013-12-03 0:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 7:25 [PATCH net v3 0/2] net: sched: fix some issues Yang Yingliang
2013-11-19 7:25 ` [PATCH net v3 1/2] net: sched: tbf: fix calculation of max_size Yang Yingliang
2013-11-19 9:38 ` Jesper Dangaard Brouer
2013-11-20 2:14 ` Yang Yingliang
2013-11-20 10:04 ` Jesper Dangaard Brouer
2013-11-20 12:50 ` Yang Yingliang
2013-11-23 19:06 ` Eric Dumazet
2013-11-24 7:28 ` Yang Yingliang
2013-11-24 18:40 ` Eric Dumazet
2013-11-25 3:43 ` Yang Yingliang
2013-11-25 12:04 ` [PATCH] " Yang Yingliang
2013-11-25 12:22 ` David Laight
2013-11-26 1:28 ` Yang Yingliang
2013-11-26 2:35 ` Yang Yingliang
2013-12-02 1:11 ` David Miller
2013-12-02 10:29 ` David Laight
2013-12-02 16:45 ` David Miller
2013-12-03 0:59 ` Yang Yingliang [this message]
2013-11-19 7:25 ` [PATCH net v3 2/2] net: sched: htb: fix calculation of quantum Yang Yingliang
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=529D2CF4.7090003@huawei.com \
--to=yangyingliang@huawei$(echo .)com \
--cc=brouer@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=jbrouer@redhat$(echo .)com \
--cc=jpirko@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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