zero copy with PACKET_MMAP
Jeff Haran
Jeff.Haran at citrix.com
Thu Feb 27 12:10:36 EST 2014
> -----Original Message-----
> From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of ratheesh
> kannoth
> Sent: Wednesday, February 26, 2014 11:28 PM
> To: kernelnewbies at kernelnewbies.org
> Subject: Fwd: zero copy with PACKET_MMAP
>
> Hi ,
>
> The link
>
> https://www.kernel.org/doc/Documentation/networking/packet_mmap.txt
> talks about achieving zero copy. But i find a deep packet copy ( of
> length snaplen= skb->len ) here
> http://lxr.free-electrons.com/source/net/packet/af_packet.c#L1841.
>
> Is there anything missing/wrong in my understanding ?
>
>
> Thanks,
> Ratheesh
It's "zero copy" in that it is not necessary to copy the contents of the kernel resident socket buffer to user space in order for user space to read it.
But you are not missing anything. There is still a copy involved in order to copy the packet to the socket ring buffer.
Jeff Haran
More information about the Kernelnewbies
mailing list