Subject: Re: [PATCH] [NET 2.6.26]: Add per-connection option to set max TSO frame size

From: Jarek Poplawski <[email-masked]>
Date: Fri, 29 Feb 2008 21:46:50 +0100

PJ Waskiewicz wrote, On 02/28/2008 07:31 PM:
...
> This can be desirable to help tune the bursty nature of TSO on a
> per-adapter basis, where one may have 1 GbE and 10 GbE devices coexisting
> in a system, one running multiqueue and the other not, etc.
> 
> This can also be desirable for devices that cannot support full 64 KB
> TSO's, but still want to benefit from some level of segmentation
> offloading.
...
> +++ b/include/linux/netdevice.h
...
> +	/* for setting kernel sock attribute on TCP connection setup */
> +#define GSO_MAX_SIZE		65536
> +	u32			gso_max_size;

One more, maybe foolish, thrifty idea: do we really need such a
precision here? I don't know those devices, but maybe it would be
enough (for the beginning at least?) to use a few divisors e.g.:

gso_max_size = 65536 >> GSO_MAX_SIZE_SHIFT

Then it seems 3 or 4 bits should be enough for this, and BTW, it looks
like dev->features has 16 bits for various GSO flags, with "a lot" of
free space yet - unless I missed something?

Jarek P.