From owner-freebsd-arch Mon Oct 7 17:20:12 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0D0037B408; Mon, 7 Oct 2002 17:20:10 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00BAD43E75; Mon, 7 Oct 2002 17:20:10 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021008002009.TEYW27763.sccrmhc02.attbi.com@InterJet.elischer.org>; Tue, 8 Oct 2002 00:20:09 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id RAA36612; Mon, 7 Oct 2002 17:10:43 -0700 (PDT) Date: Mon, 7 Oct 2002 17:10:42 -0700 (PDT) From: Julian Elischer To: Sam Leffler Cc: freebsd-arch@FreeBSD.ORG, freebsd-net@FreeBSD.ORG Subject: Re: CFR: m_tag patch In-Reply-To: <18d301c26e5e$8b5c7a30$52557f42@errno.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 7 Oct 2002, Sam Leffler wrote: > > On Mon, 7 Oct 2002, Sam Leffler wrote: > > > > > > If you allocate tag id's using your 32-bit time scheme then the fixed > values > > > above would never be hit since they are all for impossible times and so > > > there'd be no conflict. > > > > Just make them all IDs in a single "Legacy" API > > > > Good idea; I see the way out. Try this: > > struct m_tag { > SLIST_ENTRY(m_tag) m_tag_link; /* List of packet tags */ > u_int16_t m_tag_id; /* Tag ID */ > u_int16_t m_tag_len; /* Length of data */ > u_int32_t m_tag_cookie; /* Module/ABI */ > }; > > Then define the "Legacy ABI" to be zero (or whatever you want). Then all > the m_tag_* routines that I specified work only for the Legacy ABI. > (Whether this is done with shims or whatever doesn't matter.) This gives me > the compatiblity I want with openbsd and gives you the functionality you > need for netgraph. For new work we can specify users should avoid the > Legacy ABI. > > Cost is basically 4 bytes per tag and an extra compare when walking the > tags. Happy? > definitly. Each API authout gets to polute his own namespace as much as he wants.. :-) > Sam > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message