RE: zero copy with PACKET_MMAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies-bounces@xxxxxxxxxxxxxxxxx] On Behalf Of ratheesh
> kannoth
> Sent: Wednesday, February 26, 2014 11:28 PM
> To: kernelnewbies@xxxxxxxxxxxxxxxxx
> 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


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux