Date: Wed, 13 Oct 1999 00:05:02 +0200 From: Pierre Beyssac <beyssac@enst.fr> To: Wim Livens <livensw@rc.bel.alcatel.be>, freebsd-net@FreeBSD.ORG Subject: Re: Why copying data is needed for forwarding IP packets ? Message-ID: <19991013000502.A8186@enst.fr> In-Reply-To: <19991012183349.D7794@rc.bel.alcatel.be>; from Wim Livens on Tue, Oct 12, 1999 at 06:33:49PM %2B0200 References: <19991012183349.D7794@rc.bel.alcatel.be>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 12, 1999 at 06:33:49PM +0200, Wim Livens wrote: > In Stevens' volume II book, the following is mentioned: > > "Two operations dominate the time required to process packets: copying > data end computing checksums." (section 8.7, p. 234). > > What is meant exactly by copying data here ? Copying data from user space to kernel space, or the opposite, or copying data inside the kernel. Generally the latter is avoided as much as possible due to its high cost. > modified, and then the second interface card reads the packet from > host memory and send it out on the wire (maybe using some buffering on > the card) ? Or is the data copied from host memory to host memory > somewhere ? AFAICT, there's no copy in that case. > Does the same hold for multicast ? Not always. The forwarding code copies datagrams sometimes (when they are to be forwarded to more than one interface). Have a look at sys/netinet/ip_mroute.c:X_ip_mforward() and section 14.3 of Stevens... -- Pierre Beyssac pb@enst.fr To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991013000502.A8186>