sizeof ((union mf_value *)0)->MEMBER, \
8 * sizeof ((union mf_value *)0)->MEMBER
-static const struct mf_field mf_fields[MFF_N_IDS] = {
+extern const struct mf_field mf_fields[MFF_N_IDS]; /* Silence a warning. */
+
+const struct mf_field mf_fields[MFF_N_IDS] = {
/* ## -------- ## */
/* ## metadata ## */
/* ## -------- ## */
{
- MFF_TUN_ID, "tun_id", NULL,
+ MFF_TUN_ID, "tun_id", "tunnel_id",
MF_FIELD_SIZES(be64),
MFM_FULLY,
MFS_HEXADECIMAL,
},
{
- MFF_IP_PROTO, "nw_proto", NULL,
+ MFF_IP_PROTO, "nw_proto", "ip_proto",
MF_FIELD_SIZES(u8),
MFM_NONE,
MFS_DECIMAL,
OFPUTIL_P_ANY, /* Will be shifted for OXM. */
OFPUTIL_P_NONE,
}, {
- MFF_IP_DSCP_SHIFTED, "nw_tos_shifted", NULL,
- MF_FIELD_SIZES(u8),
+ MFF_IP_DSCP_SHIFTED, "ip_dscp", NULL,
+ 1, 6,
MFM_NONE,
MFS_DECIMAL,
MFP_IP_ANY,
OFPUTIL_P_ANY, /* Will be shifted for non-OXM. */
OFPUTIL_P_NONE,
}, {
- MFF_IP_ECN, "nw_ecn", NULL,
+ MFF_IP_ECN, "nw_ecn", "ip_ecn",
1, 2,
MFM_NONE,
MFS_DECIMAL,
const struct mf_field *mf_from_nxm_header__(uint32_t header);
static void nxm_init(void);
-/* Returns the field with the given 'id'. */
-const struct mf_field *
-mf_from_id(enum mf_field_id id)
-{
- ovs_assert((unsigned int) id < MFF_N_IDS);
- return &mf_fields[id];
-}
-
/* Returns the field with the given 'name', or a null pointer if no field has
* that name. */
const struct mf_field *