From owner-freebsd-net@freebsd.org Tue Oct 20 18:32:35 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3887A1A2BD; Tue, 20 Oct 2015 18:32:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D22A41B45; Tue, 20 Oct 2015 18:32:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2547BB91E; Tue, 20 Oct 2015 14:32:34 -0400 (EDT) From: John Baldwin To: freebsd-drivers@freebsd.org Cc: David Somayajulu , "freebsd-net@freebsd.org" Subject: Re: Question on mbufs Date: Tue, 20 Oct 2015 11:31:16 -0700 Message-ID: <3003826.l9YxHWDkZK@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-PRERELEASE; KDE/4.14.3; amd64; ; ) In-Reply-To: <49F5640B08EAA94DAF2F6B6145E6A08A0194383DC4@AVMB1.qlogic.org> References: <49F5640B08EAA94DAF2F6B6145E6A08A0194383DC4@AVMB1.qlogic.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Oct 2015 14:32:34 -0400 (EDT) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2015 18:32:36 -0000 On Friday, October 16, 2015 05:56:33 PM David Somayajulu wrote: > Hi All, > When indicating a chain of mbufs to the network via ifp->if_input(), what are the repercussions of setting M_PKTHDR bit in all the mbufs in the chain, instead of just the first mbuf ? > Thanks > David S. Right now the various input routines do not expect a chain of packets and probably assume that the chain is a single packet. I assume you mean that the chain here represents a single mbuf still and they are chained via m_next and not m_nextpkt? I suspect that this is probably fine and that most things will only check for M_PKTHDR and look for the fields in the first mbuf in the chain. -- John Baldwin