return !(wc->masks.vlan_tci & htons(VLAN_PCP_MASK));
case MFF_MPLS_LABEL:
- return !(wc->masks.mpls_lse & htonl(MPLS_LABEL_MASK));
+ return !(wc->masks.mpls_lse[0] & htonl(MPLS_LABEL_MASK));
case MFF_MPLS_TC:
- return !(wc->masks.mpls_lse & htonl(MPLS_TC_MASK));
+ return !(wc->masks.mpls_lse[1] & htonl(MPLS_TC_MASK));
case MFF_MPLS_BOS:
- return !(wc->masks.mpls_lse & htonl(MPLS_BOS_MASK));
+ return !(wc->masks.mpls_lse[2] & htonl(MPLS_BOS_MASK));
case MFF_IPV4_SRC:
return !wc->masks.nw_src;
OVS_NOT_REACHED();
}
-static bool
-is_icmpv4(const struct flow *flow)
-{
- return (flow->dl_type == htons(ETH_TYPE_IP)
- && flow->nw_proto == IPPROTO_ICMP);
-}
-
-static bool
-is_icmpv6(const struct flow *flow)
-{
- return (flow->dl_type == htons(ETH_TYPE_IPV6)
- && flow->nw_proto == IPPROTO_ICMPV6);
-}
-
/* Returns true if 'flow' meets the prerequisites for 'mf', false otherwise. */
bool
mf_are_prereqs_ok(const struct mf_field *mf, const struct flow *flow)
break;
case MFF_MPLS_LABEL:
- value->be32 = htonl(mpls_lse_to_label(flow->mpls_lse));
+ value->be32 = htonl(mpls_lse_to_label(flow->mpls_lse[0]));
break;
case MFF_MPLS_TC:
- value->u8 = mpls_lse_to_tc(flow->mpls_lse);
+ value->u8 = mpls_lse_to_tc(flow->mpls_lse[0]);
break;
case MFF_MPLS_BOS:
- value->u8 = mpls_lse_to_bos(flow->mpls_lse);
+ value->u8 = mpls_lse_to_bos(flow->mpls_lse[0]);
+ break;
break;
case MFF_IPV4_SRC:
break;
case MFF_MPLS_LABEL:
- match_set_mpls_label(match, value->be32);
+ match_set_mpls_label(match, 0, value->be32);
break;
case MFF_MPLS_TC:
- match_set_mpls_tc(match, value->u8);
+ match_set_mpls_tc(match, 0, value->u8);
break;
case MFF_MPLS_BOS:
- match_set_mpls_bos(match, value->u8);
+ match_set_mpls_bos(match, 0, value->u8);
+ break;
break;
case MFF_IPV4_SRC:
break;
case MFF_MPLS_LABEL:
- flow_set_mpls_label(flow, value->be32);
+ flow_set_mpls_label(flow, 0, value->be32);
break;
case MFF_MPLS_TC:
- flow_set_mpls_tc(flow, value->u8);
+ flow_set_mpls_tc(flow, 0, value->u8);
break;
case MFF_MPLS_BOS:
- flow_set_mpls_bos(flow, value->u8);
+ flow_set_mpls_bos(flow, 0, value->u8);
+ break;
break;
case MFF_IPV4_SRC:
break;
case MFF_IP_FRAG:
- flow->nw_frag &= value->u8;
+ flow->nw_frag = value->u8 & FLOW_NW_FRAG_MASK;
break;
case MFF_ARP_OP:
break;
case MFF_MPLS_LABEL:
- match_set_any_mpls_label(match);
+ match_set_any_mpls_label(match, 0);
break;
case MFF_MPLS_TC:
- match_set_any_mpls_tc(match);
+ match_set_any_mpls_tc(match, 0);
break;
case MFF_MPLS_BOS:
- match_set_any_mpls_bos(match);
+ match_set_any_mpls_bos(match, 0);
+ break;
break;
case MFF_IPV4_SRC: