Re: zero-copy TCP

From: Andi Kleen (
Date: Sun Sep 03 2000 - 12:30:30 EST

On Sun, Sep 03, 2000 at 07:21:50PM +0200, Ingo Molnar wrote:
> On Sun, 3 Sep 2000 wrote:
> > If we go for a Linux-specific solution anyway, maybe one could add
> > another send{,to,msg} flag that makes send*(2)'s buffer access
> > non-atomic. That way, the kernel only needs to make sure the pages
> > don't disappear, but there's no need for expensive MMU games.
> >
> > Of course, this would give applications a way for generating packets
> > with an incorrect TCP/UDP checksum, [...]
> i believe such zero-copy send should only be allowed for drivers which can
> guarantee correct checksums. (ie. cards which do Tx-checksums) The other
> drivers will still copy. I dont think this is a problem - the number of
> cards that can do scatter-gather DMA but cannot do TX-checksumming is
> rather low. (i only know about the Tulip.) All modern cards do
> TX-checksumming and scatter-gather DMA.

You can already cause incorrect checksums on the wire just by passing a
partly unmapped address (the zero-the-rest exception handler in
csum_copy_generic in i386 forgets to add in the carry)

I do not believe it is a big deal, packets with bad checksum are not really
a problem (you can usually do other better DoS that do not need it)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:15 EST