From owner-freebsd-net@FreeBSD.ORG Mon Jun 9 10:16:31 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8E19106567C for ; Mon, 9 Jun 2008 10:16:31 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 754708FC1E for ; Mon, 9 Jun 2008 10:16:31 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id E80CE11381A; Mon, 9 Jun 2008 06:16:30 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 09 Jun 2008 06:16:31 -0400 X-Sasl-enc: jMr+L8R/Avn7Q960D6FFF4/xDNStjTwEIyPgBjDGhMPV 1213006590 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 20E1911328; Mon, 9 Jun 2008 06:16:30 -0400 (EDT) Message-ID: <484D02FC.9090407@FreeBSD.org> Date: Mon, 09 Jun 2008 11:16:28 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Marc_L=F6rner?= References: <200806051712.47048.marc.loerner@hob.de> <200806061025.37856.marc.loerner@hob.de> <20080606221917.A16250@delplex.bde.org> <200806091013.27813.marc.loerner@hob.de> In-Reply-To: <200806091013.27813.marc.loerner@hob.de> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Cc: Peter Jeremy , freebsd-net@freebsd.org Subject: Re: Probable Bug in tcp.h X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2008 10:16:31 -0000 Marc L=F6rner wrote: > off0 is 0x14 =3D> no problem with that > but address of ip is 0xe000000021c8706e =3D> not correct aligned to 32-= bits > > Can anyone tell me, where ip is allocated, so I can do a little bit mor= e=20 > research? > =20 It really depends on the context! That's a very wide ranging question. It depends upon whether mbuf chains are flowing up or down the stack,=20 whether or not the network driver supports checksum or header/segment=20 offload, and whether or not it is using zero-copy. Zero copy transmit normally only has mmu cost if the mbuf (from=20 userland) can be mapped to a location where headers are easily=20 prepended. Zero copy receive is more expensive and complex as it=20 requires that the DMA engine on the network interface card supports=20 header splitting. The FreeBSD stack is known to have some issues with mbuf alignment and=20 architectures other than those in its Tier 1.