From owner-freebsd-current Sun Nov 18 10:15:32 2001 Delivered-To: freebsd-current@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 4A17B37B417; Sun, 18 Nov 2001 10:15:26 -0800 (PST) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id KAA99264; Sun, 18 Nov 2001 10:09:48 -0800 (PST) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id fAII9lp04548; Sun, 18 Nov 2001 10:09:47 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200111181809.fAII9lp04548@arch20m.dellroad.org> Subject: Re: re-entrancy and the IP stack. In-Reply-To: "from Julian Elischer at Nov 16, 2001 05:23:21 pm" To: Julian Elischer Date: Sun, 18 Nov 2001 10:09:46 -0800 (PST) Cc: Luigi Rizzo , Peter Wemm , Julian Elischer , current@FreeBSD.ORG, net@FreeBSD.ORG, wollman@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Julian Elischer writes: > > i actually suggested one i.e. have explicit pointers > > to metadata area(s) in the pkthdr. I think you forget the > > most fundamental feature which is performance. > > This is way more important than flexibility i think. > > Which is the reason that this problem exists.. > no-one ever thinks that people will want to do things different > to what they want to do at the time they write it.. > > Flexibility is I think much more important than you suggest. > Wouldn't it have made it easier for you if there had been a flexible > method to pass such information available? > The m_aux field sounds right to me. IMHO m_aux is fine for this. It already includes built-in support for 'blind' free'ing -- when you free an mbuf any aux data automatically gets free'd with it, whether you put it there or not. I've been using this for work-related stuff and it works great. As for performance, if there's only one or two m_aux structures associated with an mbuf, then the linear search of the m_aux list is not a big deal. If we start getting tons of m_aux's piling up, *then* we can start worrying about optimization (and there are plenty of options there). -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message