Date: Sun, 21 Mar 1999 11:56:06 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Alfred Perlstein <bright@rush.net> Cc: Terry Lambert <tlambert@primenet.com>, Dag-Erling Smorgrav <des@flood.ping.uio.no>, andreas@klemm.gtn.com, rsnow@lgc.com, hasty@rah.star-gate.com, ckempf@enigami.com, wpaul@skynet.ctr.columbia.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Gigabit ethernet -- what am I doing wrong? Message-ID: <199903211956.LAA14406@apollo.backplane.com> References: <Pine.BSF.3.96.990321144541.4169H-100000@cygnus.rush.net>
next in thread | previous in thread | raw e-mail | index | archive | help
:
:That is zero copy, packet is DMA'd from card, then sent via DMA
:to another card, hence 0 copy. The CPU doesnt' have much work to
:do besides the DMA setups and a quick packet check, look at the
:fastforward code and you can see.
:
:-Alfred
'zero copy' is actually misnomer. What you are describing is really
1-copy because you are using the resources of the PCI bus. A card
transfering data internally from one port to another and not utilizing
the PCI bus could be considered 'zero copy' from the point of view of
the PCI bus. sendfile() is actually a 2-copy scheme: Disk drive DMA's
to main memory, network card DMA's from main memory. This is still better
then read()/write(), of course, which is a 6-copy scheme:
disk drive DMA's to main memory
read(): system reads main memory and writes user buffer
write(): system reads user buffer and writes main memory
network card DMA's from main memory
I suppose since a PCI->PCI DMA does not involve main memory you might be
able to think of it as 0-copy, but since the critical pipe in this issue
is the PCI bus it is more proper to consider it a 1-copy scheme.
-Matt
Matthew Dillon
<dillon@backplane.com>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903211956.LAA14406>
