};
OFP_ASSERT(sizeof(struct ofp10_action_output) == 8);
-/* The VLAN id is 12 bits, so we can use the entire 16 bits to indicate
- * special conditions. All ones is used to match that no VLAN id was
- * set. */
-#define OFP_VLAN_NONE 0xffff
-
/* Action header for OFPAT10_VENDOR. The rest of the body is vendor-defined. */
struct ofp_action_vendor_header {
ovs_be16 type; /* OFPAT10_VENDOR. */
/* The VLAN id is 12-bits, so we can use the entire 16 bits to indicate
* special conditions. All ones indicates that no VLAN id was set.
*/
-#define OFP_VLAN_NONE 0xffff
+#define OFP10_VLAN_NONE 0xffff
/* Fields to match against flows */
struct ofp10_match {
cls_rule_set_dl_vlan(struct cls_rule *rule, ovs_be16 dl_vlan)
{
flow_set_vlan_vid(&rule->flow, dl_vlan);
- if (dl_vlan == htons(OFP_VLAN_NONE)) {
+ if (dl_vlan == htons(OFP10_VLAN_NONE)) {
rule->wc.vlan_tci_mask = htons(UINT16_MAX);
} else {
rule->wc.vlan_tci_mask |= htons(VLAN_VID_MASK | VLAN_CFI);
void
flow_set_vlan_vid(struct flow *flow, ovs_be16 vid)
{
- if (vid == htons(OFP_VLAN_NONE)) {
+ if (vid == htons(OFP10_VLAN_NONE)) {
flow->vlan_tci = htons(0);
} else {
vid &= htons(VLAN_VID_MASK);
rule->flow.nw_proto = match->nw_proto;
/* Translate VLANs. */
- if (!(ofpfw & OFPFW10_DL_VLAN) && match->dl_vlan == htons(OFP_VLAN_NONE)) {
+ if (!(ofpfw & OFPFW10_DL_VLAN) &&
+ match->dl_vlan == htons(OFP10_VLAN_NONE)) {
/* Match only packets without 802.1Q header.
*
* When OFPFW10_DL_VLAN_PCP is wildcarded, this is obviously correct.
ofpfw |= OFPFW10_DL_VLAN | OFPFW10_DL_VLAN_PCP;
} else if (rule->wc.vlan_tci_mask & htons(VLAN_CFI)
&& !(rule->flow.vlan_tci & htons(VLAN_CFI))) {
- match->dl_vlan = htons(OFP_VLAN_NONE);
+ match->dl_vlan = htons(OFP10_VLAN_NONE);
} else {
if (!(rule->wc.vlan_tci_mask & htons(VLAN_VID_MASK))) {
ofpfw |= OFPFW10_DL_VLAN;