Re: What is the state of TCP offload support in the kernel?

On Mon, Jan 07, 2008 at 05:18:02AM -0800, patrick%klos.com@localhost wrote:
>
> I don't know what FreeBSD is doing in their TCP stack to support TCP
> Offload - I haven't looked at that part of FreeBSD. I suppose once I
> get the NIC driver working (without memory leaks), I could delve into
> the a little bit. It sounds like adding this to the NetBSD TCP stack
> might be a bit more cumbersome than I would hope?
In general, adding "TCP Offload" support to a TCP stack is cumbersome;
never mind that vendors really can't agree among themselves (or even the
literature for a single vendor's different products) what counts as
"TCP Offload". It gets as conservative as segmentation offload for send
(which we do support -- look at the wm or bge drivers) and as aggressive
as "you tell me a range of ports I can use and I manage the whole
connection and hand you a bytestream").
10Gb adapters typically do have a whole host of features we could support
but don't, though, short of full offload of all TCP processing. The most
obvious one is header splitting on receive, for zero-copy TCP receive to
userspace. Intel 1Gb adapters have this too, at least the newer models
do, and it's documented. Another is packet classification in the NIC, so
you can run multiple instances of your host TCP stack and hand packets to
each one in a cache-efficient way -- see the Sun papers on their "Crossbow"
architecture to get an idea what this means.
Thor