From owner-freebsd-net Fri Oct 11 11:12: 8 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 52CE137B401; Fri, 11 Oct 2002 11:12:06 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id B395343EA3; Fri, 11 Oct 2002 11:12:05 -0700 (PDT) (envelope-from sam@errno.com) Received: from melange (melange.errno.com [66.127.85.82]) (authenticated bits=0) by ebb.errno.com (8.12.5/8.12.1) with ESMTP id g9BIC21I029236 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Fri, 11 Oct 2002 11:12:02 -0700 (PDT)?g (envelope-from sam@errno.com)œ X-Authentication-Warning: ebb.errno.com: Host melange.errno.com [66.127.85.82] claimed to be melange Message-ID: <080101c27151$b2e92a30$52557f42@errno.com> From: "Sam Leffler" To: Cc: "Julian Elischer" , , References: <18d301c26e5e$8b5c7a30$52557f42@errno.com> Subject: Re: CFR: m_tag patch Date: Fri, 11 Oct 2002 11:12:02 -0700 Organization: Errno Consulting MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 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. > The changes I'm proposing for KAME code make no references to m_tag_cookie. Things should be clear when you have a patch to look at. I'm working on getting that to you. Sam To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message