From owner-freebsd-current@FreeBSD.ORG Tue Oct 12 15:50:21 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C05616A4CE; Tue, 12 Oct 2004 15:50:21 +0000 (GMT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14F5E43D1D; Tue, 12 Oct 2004 15:50:21 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.93] ([66.127.85.93]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id i9CFoJWi097239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Oct 2004 08:50:20 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <416BFD51.2080805@errno.com> Date: Tue, 12 Oct 2004 08:50:41 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sam References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org cc: freebsd-arch@freebsd.org Subject: Re: mbuf w/o pkthdr? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2004 15:50:21 -0000 Sam wrote: > Hello - > > src/sys/i386/i386/busdma_machdep.c:/^bus_dmamap_load_mbuf/ > prohibits loading an mbuf that does not contain a packet > header. Some drivers use this (xl), some don't (fxp). > > Are all packets supposed to have the M_PKTHDR flag? Why? M_PKTHDR indicates an m_pkthdr structure is present in the mbuf. bus_dmamap_load_mbuf requires this as it gets the packet length from it (instead of walking the mbuf chain or taking it as an argument). Most packets typically have this information (can't think of any interesting cases where it is not be there). Sam