On Jan 18, 2019, at 6:13 AM, Michael Richardson <m...@sandelman.ca> wrote:

> Guy, do we want to allocate 16 or 32 values, aligned, so that the
> it be can DLT_TAG_BASE + DSA_TAG_xx maps?

"Aligned" would mean you want to support DLT_TAG_BASE | DSA_TAG_xx; alignment 
is necessary to support ORing in the tag type, but isn't necessary for adding 
the tag type.

> Are the kernel values stable?

Presumably referring to the DSA_TAG_xx values?

Unfortunately, they haven't been; they're in the include/net/dsa.h header in 
the kernel source, which *isn't* in the include/uapi tree, so it's not 
considered part of the user-mode API and thus is, I think, subject to change, 
and, in fact, the numbers differ between, for example, 3.18.10 and 4.20.3.

3.18.10:

enum dsa_tag_protocol {
        DSA_TAG_PROTO_NONE = 0,
        DSA_TAG_PROTO_DSA,
        DSA_TAG_PROTO_TRAILER,
        DSA_TAG_PROTO_EDSA,
        DSA_TAG_PROTO_BRCM,
};

4.20.3:

enum dsa_tag_protocol {
        DSA_TAG_PROTO_NONE = 0,
        DSA_TAG_PROTO_BRCM,
        DSA_TAG_PROTO_BRCM_PREPEND,
        DSA_TAG_PROTO_DSA,
        DSA_TAG_PROTO_EDSA,
        DSA_TAG_PROTO_GSWIP,
        DSA_TAG_PROTO_KSZ,
        DSA_TAG_PROTO_LAN9303,
        DSA_TAG_PROTO_MTK,
        DSA_TAG_PROTO_QCA,
        DSA_TAG_PROTO_TRAILER,
        DSA_TAG_LAST,           /* MUST BE LAST */
};

Whether they're *now* considered stable, so that new protocols will be added 
after all existing tags and before DSA_TAG_LAST, is another matter.
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers@lists.tcpdump.org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Reply via email to