[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131202.114534.2139333951615698198.davem@davemloft.net>
Date: Mon, 02 Dec 2013 11:45:34 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: yangyingliang@...wei.com
Cc: eric.dumazet@...il.com, netdev@...r.kernel.org, brouer@...hat.com,
jpirko@...hat.com, jbrouer@...hat.com
Subject: Re: [PATCH] net: sched: tbf: fix calculation of max_size
From: Yang Yingliang <yangyingliang@...wei.com>
Date: Mon, 25 Nov 2013 20:04:23 +0800
> From: Yang Yingliang <yangyingliang@...wei.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@...hat.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.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.
--
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