Subject: Re: [PATCH] tbf scheduler: TSO support (updated)

From: Stephen Hemminger <[email-masked]>
Date: Sun, 13 May 2007 08:52:48 -0700

On Sun, 13 May 2007 21:42:36 +0900 (JST)
Hirokazu Takahashi <[email-masked]> wrote:

> Hi,
> 
> > I'm now thinking I can make it just hold a TSO packet until
> > p->tokens reaches the size of the packet. I think it is
> > straightforward implementation. I'll try this.
> 
> I re-implemented the patch, which is simpler than the previous one.
> 
> sch->dev->mtu is used to determine how many segments are included
> in a TSO packet. The point is that the value of sch->dev->mtu has to
> be treated possibly broken because it is set by administrators.
>

There are cases where the TSO packet will be divided into chunks
smaller than the MTU. If path MTU discovery is being used, the chunk
size of the TSO skb will be smaller. To be accurate you need to look
at mss (gso_size) and compute actual packet size based on protocol
(IPV4/IPV6 and UDP/TCP).