[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1386046793.30495.12.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Mon, 02 Dec 2013 20:59:53 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Yang Yingliang <yangyingliang@...wei.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, brouer@...hat.com,
jpirko@...hat.com, jbrouer@...hat.com
Subject: Re: [PATCH net v4 1/2] net: sched: tbf: fix calculation of max_size
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists