linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* zero copy
@ 2003-02-06 23:07 Venkat Raghu
  0 siblings, 0 replies; 6+ messages in thread
From: Venkat Raghu @ 2003-02-06 23:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernelnewbies



Hi,

What is zero copy mechanism in ethernet drivers.

Regards
Venkat

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

* Re: zero copy
  2005-12-06 12:09 kernel coder
@ 2005-12-06 12:28 ` Steven Whitehouse
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Whitehouse @ 2005-12-06 12:28 UTC (permalink / raw)
  To: kernel coder; +Cc: linux-kernel

Hi,

See sock_no_sendpage() in linux/net/core/sock.c for when network
protocols don't support zerocopy and tcp_sendpage() in
linux/net/ipv4/tcp.c for an example where it is supported. The
NETIF_F_SG and TCP_ZC_CSUM_FLAGS test in the latter function
is probably what you are after?

Steve.

On Tue, Dec 06, 2005 at 04:09:30AM -0800, kernel coder wrote:
> hi,
> i'm trying to track the code flow of sendfile system call.Mine
> ethernet card doesn't have scatter gather and checksum calculation
> features.So stack should be making a copy of data.
> 
> Please tell me where in sendfile code flow,check for scatter gather
> and cecksum features is made so that stack can decide whether to copy
> data from user space or not.
> 
> lhrkernelcoder
> -
> 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/

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

* zero copy
@ 2005-12-06 12:09 kernel coder
  2005-12-06 12:28 ` Steven Whitehouse
  0 siblings, 1 reply; 6+ messages in thread
From: kernel coder @ 2005-12-06 12:09 UTC (permalink / raw)
  To: linux-kernel

hi,
i'm trying to track the code flow of sendfile system call.Mine
ethernet card doesn't have scatter gather and checksum calculation
features.So stack should be making a copy of data.

Please tell me where in sendfile code flow,check for scatter gather
and cecksum features is made so that stack can decide whether to copy
data from user space or not.

lhrkernelcoder

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

* Re: zero copy
@ 2003-02-07 10:04 Emiliano Gabrielli
  0 siblings, 0 replies; 6+ messages in thread
From: Emiliano Gabrielli @ 2003-02-07 10:04 UTC (permalink / raw)
  To: linux-kernel, kernelnewbies



<quote who="Venkat Raghu">
>
>
> Hi,
>
> What is zero copy mechanism in ethernet drivers.
>
> Regards
> Venkat

Zero copy is intended to bypass the need of copying the user space buffer in kernel
space via copy_from_user.

It is achieved by mapping dma buffer in user space for exaple so that eth driver can
directly use them for dma

-- 
Emiliano Gabrielli

dip. di Fisica
2° Università di Roma "Tor Vergata"


-- 
Emiliano Gabrielli

dip. di Fisica
2° Università di Roma "Tor Vergata"



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

* Re: zero copy.
  2002-03-12  8:59 Rogier Wolff
@ 2002-03-12  9:07 ` Andi Kleen
  0 siblings, 0 replies; 6+ messages in thread
From: Andi Kleen @ 2002-03-12  9:07 UTC (permalink / raw)
  To: Rogier Wolff; +Cc: Linux kernel mailing list, linux-net

On Tue, Mar 12, 2002 at 09:59:36AM +0100, Rogier Wolff wrote:
> 
> Hi,
> 
> Is linux able to do zero copy?

You can do zero copy on TX by using sendfile() or writing a kernel module. 
Zero copy on RX is not directly supported by the standard network stack.
It's possible to do it via a kernel module again, but very hackish. 

-Andi


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

* zero copy.
@ 2002-03-12  8:59 Rogier Wolff
  2002-03-12  9:07 ` Andi Kleen
  0 siblings, 1 reply; 6+ messages in thread
From: Rogier Wolff @ 2002-03-12  8:59 UTC (permalink / raw)
  To: Linux kernel mailing list; +Cc: linux-net


Hi,

Is linux able to do zero copy?

I remember from previous discussions that there was always a camp
that would claim that the copy was free because of the checksum, 
and/or the other way around. And warming the cache on input would
prove to eliminate almost all overhead. 

I have an application where the bulk of the data is NOT generated or
consumed by the CPU, in fact, the CPU does not have enough bandwidth
to move all the data. We really need to have the DMA-devices go and
get the data for themselves....

So far, I'm finding more or less unavoidable copy to/from user calls
in both the tcp send and the tcp recieve path..... 

Suggestions?

			Roger. 

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots. 
* There are also old, bald pilots. 

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

end of thread, other threads:[~2005-12-06 12:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-06 23:07 zero copy Venkat Raghu
  -- strict thread matches above, loose matches on Subject: below --
2005-12-06 12:09 kernel coder
2005-12-06 12:28 ` Steven Whitehouse
2003-02-07 10:04 Emiliano Gabrielli
2002-03-12  8:59 Rogier Wolff
2002-03-12  9:07 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).