All of lore.kernel.org
 help / color / mirror / Atom feed
* zero copy with PACKET_MMAP
@ 2014-02-27  6:40 ratheesh kannoth
  2014-02-27  9:58 ` Daniel Borkmann
  0 siblings, 1 reply; 3+ messages in thread
From: ratheesh kannoth @ 2014-02-27  6:40 UTC (permalink / raw)
  To: netdev, linux-net

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: zero copy with PACKET_MMAP
  2014-02-27  6:40 zero copy with PACKET_MMAP ratheesh kannoth
@ 2014-02-27  9:58 ` Daniel Borkmann
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2014-02-27  9:58 UTC (permalink / raw)
  To: ratheesh kannoth; +Cc: netdev, linux-net

On 02/27/2014 07:40 AM, ratheesh kannoth wrote:
...
> 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 ?

The zero-copy is between user and kernel space.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* zero copy with PACKET_MMAP
  2014-02-27  7:28 ` Fwd: " ratheesh kannoth
@ 2014-02-27 17:10   ` Jeff Haran
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Haran @ 2014-02-27 17:10 UTC (permalink / raw)
  To: kernelnewbies

> -----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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-27 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-27  6:40 zero copy with PACKET_MMAP ratheesh kannoth
2014-02-27  9:58 ` Daniel Borkmann
     [not found] <CAGZFCEF0zwQbNYU6yH8i=ebnhtVFeJRA0_XVDvgJ4O0Z5ietHw@mail.gmail.com>
2014-02-27  7:28 ` Fwd: " ratheesh kannoth
2014-02-27 17:10   ` Jeff Haran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.