From owner-cvs-all Fri Jul 23 10:54:32 1999 Delivered-To: cvs-all@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 50CE314C0B; Fri, 23 Jul 1999 10:54:27 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id KAA26727; Fri, 23 Jul 1999 10:53:31 -0700 (PDT) (envelope-from dillon) Date: Fri, 23 Jul 1999 10:53:31 -0700 (PDT) From: Matthew Dillon Message-Id: <199907231753.KAA26727@apollo.backplane.com> To: Mike Smith Cc: "Justin T. Gibbs" , cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Subject: Re: cvs commit: src/release/sysinstall tcpip.c References: <199907231736.KAA03557@dingo.cdrom.com> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk :> >So is there any reasonable expectation that we will have to deal with :> >hardware that won't result in the driver placing the ethernet header :> >immediately before the payload in the mbuf? This would result in us :> >having to copy it around, which would be slightly yucky. :> :> In zero copy applications, the header and the payload are usually placed :> in separate areas. : :Can you elaborate on this a little? We don't support the two being in :a separate allocation unit at the moment, yet I understood the 'fast :forwarding' code was essentially a zero-copy operation. :-- :\\ The mind's the standard \\ Mike Smith I believe sendfile() is a good example of this. The pages from the file being sent are mapped into mbuf's directly and the headers are dealt with separately. Not all ether drivers support this. Actually, only a very few do I think. Some can't align DMA on a 16-bit boundry, and some can't do scatter-gather for packets. scatter-gather is necessary to avoid the worst of the copying overhead. Devices which require 32 bit DMA alignment can hopefully do scatter-gather so only the packet header needs to be copied. You can blame the 6-byte MAC header for most of the headaches. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message