public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
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 15:44:07 +0800	[thread overview]
Message-ID: <529D8BC7.4050005@huawei.com> (raw)
In-Reply-To: <1386046793.30495.12.camel@edumazet-glaptop2.roam.corp.google.com>

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?

Thanks!
Yang

  reply	other threads:[~2013-12-03  7:44 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 [this message]
2013-12-03  8:12       ` Eric Dumazet
2013-12-03  9:47         ` Yang Yingliang
2013-12-03 11:32           ` Yang Yingliang
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=529D8BC7.4050005@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