Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Oct 2002 11:33:52 +0900
From:      JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= <jinmei@isl.rdc.toshiba.co.jp>
To:        "Sam Leffler" <sam@errno.com>
Cc:        "Julian Elischer" <julian@elischer.org>, <freebsd-arch@FreeBSD.ORG>, <freebsd-net@FreeBSD.ORG>
Subject:   Re: CFR: m_tag patch
Message-ID:  <y7vd6qhg0vj.wl@ocean.jinmei.org>
In-Reply-To: <18d301c26e5e$8b5c7a30$52557f42@errno.com>
References:  <Pine.BSF.4.21.0210071613260.34884-100000@InterJet.elischer.org> <18d301c26e5e$8b5c7a30$52557f42@errno.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> On Mon, 7 Oct 2002 17:06:25 -0700, 
>>>>> "Sam Leffler" <sam@errno.com> 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-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?y7vd6qhg0vj.wl>