From owner-freebsd-hackers Sun Mar 21 11:56:30 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 109091525A for ; Sun, 21 Mar 1999 11:56:29 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id LAA14406; Sun, 21 Mar 1999 11:56:06 -0800 (PST) (envelope-from dillon) Date: Sun, 21 Mar 1999 11:56:06 -0800 (PST) From: Matthew Dillon Message-Id: <199903211956.LAA14406@apollo.backplane.com> To: Alfred Perlstein Cc: Terry Lambert , Dag-Erling Smorgrav , 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? References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message