2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-23 14:57:06 +00:00

nx-match: Implement support for arbitrary VLAN TCI masks.

Since the Nicira Extended Match was specified nicira-ext.h has claimed that
arbitrary masks are allowed, but in fact only certain masks were actually
implemented.  This commit implements general masking for the 802.1Q VLAN
TCI field.
This commit is contained in:
Ben Pfaff
2010-11-23 10:06:28 -08:00
parent 2d8b103caa
commit 66642cb40b
13 changed files with 249 additions and 237 deletions

View File

@@ -383,8 +383,8 @@ parse_protocol(const char *name, const struct protocol **p_out)
#define FIELDS \
FIELD(F_IN_PORT, "in_port", FWW_IN_PORT) \
FIELD(F_DL_VLAN, "dl_vlan", FWW_DL_VLAN) \
FIELD(F_DL_VLAN_PCP, "dl_vlan_pcp", FWW_DL_VLAN_PCP) \
FIELD(F_DL_VLAN, "dl_vlan", 0) \
FIELD(F_DL_VLAN_PCP, "dl_vlan_pcp", 0) \
FIELD(F_DL_SRC, "dl_src", FWW_DL_SRC) \
FIELD(F_DL_DST, "dl_dst", FWW_DL_DST) \
FIELD(F_DL_TYPE, "dl_type", FWW_DL_TYPE) \
@@ -580,6 +580,10 @@ parse_ofp_str(struct parsed_flow *pf, struct ofpbuf *actions, char *string)
cls_rule_set_nw_src_masked(&pf->rule, 0, 0);
} else if (f->index == F_NW_DST) {
cls_rule_set_nw_dst_masked(&pf->rule, 0, 0);
} else if (f->index == F_DL_VLAN) {
cls_rule_set_any_vid(&pf->rule);
} else if (f->index == F_DL_VLAN_PCP) {
cls_rule_set_any_pcp(&pf->rule);
} else {
NOT_REACHED();
}