From: Yang Yingliang <yangyingliang@huawei.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<brouer@redhat.com>, <jpirko@redhat.com>, <jbrouer@redhat.com>
Subject: Re: [PATCH net v4 1/2] net: sched: tbf: fix calculation of max_size
Date: Tue, 3 Dec 2013 19:32:51 +0800 [thread overview]
Message-ID: <529DC163.5090403@huawei.com> (raw)
In-Reply-To: <529DA8C1.4000504@huawei.com>
On 2013/12/3 17:47, Yang Yingliang wrote:
> On 2013/12/3 16:12, Eric Dumazet wrote:
>> On Tue, 2013-12-03 at 15:44 +0800, Yang Yingliang wrote:
>>> On 2013/12/3 12:59, Eric Dumazet wrote:
>>>> On Tue, 2013-12-03 at 11:26 +0800, Yang Yingliang wrote:
>>>>
>>>>> + for (max_size = 0; max_size < MAX_PKT_LEN; max_size++)
>>>>> + if (psched_l2t_ns(&q->rate, max_size) > q->buffer)
>>>>> + break;
>>>>> + if (--max_size <= 0)
>>>>> + goto unlock_done;
>>>>> +
>>>>
>>>> This seems dubious. With your new code, max_size < 65536
>>>>
>>>> Prior code had :
>>>>
>>>> for (n = 0; n < 256; n++)
>>>> if (rtab->data[n] > qopt->buffer)
>>>> break;
>>>> max_size = (n << qopt->rate.cell_log) - 1;
>>>>
>>>> So we could have much bigger max_size.
>>>>
>>>> The reason I ask is that its possible to have qdisc_pkt_len(skb) being
>>>> bigger than 65536, for TCP packets with low MSS value.
>>>>
>>>
>>> Hmmm, if qdisc_pkt_len(skb) is bigger than 65536, skb_is_gso(skb) is true,
>>> it will go into tbf_segment(). If I am wrong, please point me out, thanks!
>>>
>>> BTW, 65536 is suggested by Jesper, I'm a little uncertain about it. He is, too.
>>> Do you or some other developers have stronger opinions on this?
>>
>> We do not want to go to tbf_segment() if we programmed tbf to allow TSO
>> packets of 68.000 bytes being sent without being segmented.
>
> I mean a 64KB TSO packet's "qdisc_pkt_len(skb)" is bigger than 65536, but it will go
> to tbf_segment(), so the TSO packet of 64KB can be enqueued.
I misunderstood 68.000 bytes as 68 bytes, ignore it.:)
>
>>
>> TSO packet of 64KB -> about 45 frames if MSS=1448, 45*1514 = 68130 bytes
Maybe MAX_PKT_LEN should be much bigger. Hmm, I'm uncertain how big is the proper value.
next prev parent reply other threads:[~2013-12-03 11:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 3:26 [PATCH net v4 0/2] net: sched: fix some issues Yang Yingliang
2013-12-03 3:26 ` [PATCH net v4 1/2] net: sched: tbf: fix calculation of max_size Yang Yingliang
2013-12-03 4:51 ` Eric Dumazet
2013-12-03 6:09 ` Yang Yingliang
2013-12-03 4:59 ` Eric Dumazet
2013-12-03 7:44 ` Yang Yingliang
2013-12-03 8:12 ` Eric Dumazet
2013-12-03 9:47 ` Yang Yingliang
2013-12-03 11:32 ` Yang Yingliang [this message]
2013-12-03 14:51 ` Eric Dumazet
2013-12-04 1:53 ` Yang Yingliang
2013-12-03 3:26 ` [PATCH net v4 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=529DC163.5090403@huawei.com \
--to=yangyingliang@huawei.com \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jbrouer@redhat.com \
--cc=jpirko@redhat.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).