From owner-freebsd-net Thu Oct 10 19:33:23 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9AC937B401; Thu, 10 Oct 2002 19:33:21 -0700 (PDT) Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1BD943E8A; Thu, 10 Oct 2002 19:33:20 -0700 (PDT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from localhost ([3ffe:501:4819:2000:200:39ff:fe10:85d7]) by shuttle.wide.toshiba.co.jp (8.11.6/8.9.1) with ESMTP id g9B2XAt31374; Fri, 11 Oct 2002 11:33:10 +0900 (JST) Date: Fri, 11 Oct 2002 11:33:52 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: "Sam Leffler" Cc: "Julian Elischer" , , Subject: Re: CFR: m_tag patch In-Reply-To: <18d301c26e5e$8b5c7a30$52557f42@errno.com> References: <18d301c26e5e$8b5c7a30$52557f42@errno.com> User-Agent: Wanderlust/2.6.1 (Upside Down) Emacs/21.2 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Dispatcher: imput version 20000228(IM140) Lines: 42 Sender: owner-freebsd-net@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 17:06:25 -0700, >>>>> "Sam Leffler" said: >> > 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? Sorry for interrupting, but please let me make it sure. Do you intend to hide the additional member from other modules than the m_tag internal? I'm afraid a story that (e.g.) some code fragments in the network layer directly refers to m_tag_cookie, which will break source level compatibility with other BSDs (when the code fragments are shared with others). As suz said before, we (KAME) are very much afraid of this kind of story. JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message