Re: Half Duplex and Zero Copy IP

Jamie Lokier (lk@tantalophile.demon.co.uk)
Sat, 11 Aug 2001 00:50:37 +0100


Andi Kleen wrote:
> The sniffer zero copy implementation as implemented in some libpcaps
> does not depend on any special NIC support; it should work with any.

Do you mean mmap() on a packet socket? Unless I am mistaken, the data
is still copied once to the mmap area, however only the capture length
is copied -- the rest of the packet is discarded.

This means that you cannot use mmap() on a packet socket to zero-copy
read whole packets. In fact there is no way to zero-copy read whole
packets into user space, without modifying the kernel.

Am I mistaken (it would be nice)?

Thanks,
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/