Re: using software TSO on non-TSO capable netdevices
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2008-08-07 06:15:48
On Wed, Aug 06, 2008 at 11:07:41PM -0700, David Miller wrote:
We don't touch anything in the original TSO skb. However we expand the headroom (if necessary) and in the area in front of skb->data we build the header areas for the sub-TSO frames, one by one.
Or we could just allocate them beforehand, either way, it's one operation per superpacket so it's cheap.
This might be where we get pushed over the edge and have to add a dma_addr_t to sk_buff and skb_frag_struct. And that might not be such a bad thing because it will allow other things that we've always wanted to do.
Since the skb_frag struct is in the shared area where we have to pad up to a power-of-two for kmalloc we usually have plenty of free space anyway.
Another nice aspect of this idea is that we can make the existing GSO code just build this funny "TSO plus hidden headers" SKB, and then do the by-hand unpacking into new SKB chunks that we will let smart drivers do directly into their TX rings. Herbert what do you think?
Yes this idea sounds perfect :) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} [off-list ref] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt