Zero copy sockets question

Andrew Gallatin gallatin at cs.duke.edu
Thu Feb 12 07:29:39 PST 2004


Dung Patrick writes:
 > Correct me if I am wrong:
 > 
 > To use the zero copy 'receive' on i386, you need to set the MTU to 4096 bytes(page size) or 4096 multiples.

No, just larger than a page-size plus headers.  FreeBSD's tcp
automagically sets the mss to a page-sized multiple for large MTUs.

And you need a nic which can do header splitting (ie, DMA the headers
and the payload to different places in the host).

 > If it is true, until zero copy receive can do auto fitting, I think zero copy receive is more useful in gigabit ethernet than in fast ethernet (I assume MTU 1500(or smaller) is suitable for fast ethernet/Internet.)

Fast ethernet is slow enough, it doesn't really make sense there.
These days, one could argue that it really only makes sense for 10GbE.

Drew


More information about the freebsd-hackers mailing list