@@ -990,9 +990,9 @@ static int validate_vlan_from_nlattrs(const struct sw_flow_match *match,
990
990
if (a [OVS_KEY_ATTR_VLAN ])
991
991
tci = nla_get_be16 (a [OVS_KEY_ATTR_VLAN ]);
992
992
993
- if (!(tci & htons (VLAN_TAG_PRESENT ))) {
993
+ if (!(tci & htons (VLAN_CFI_MASK ))) {
994
994
if (tci ) {
995
- OVS_NLERR (log , "%s TCI does not have VLAN_TAG_PRESENT bit set." ,
995
+ OVS_NLERR (log , "%s TCI does not have VLAN_CFI_MASK bit set." ,
996
996
(inner ) ? "C-VLAN" : "VLAN" );
997
997
return - EINVAL ;
998
998
} else if (nla_len (a [OVS_KEY_ATTR_ENCAP ])) {
@@ -1013,9 +1013,9 @@ static int validate_vlan_mask_from_nlattrs(const struct sw_flow_match *match,
1013
1013
__be16 tci = 0 ;
1014
1014
__be16 tpid = 0 ;
1015
1015
bool encap_valid = !!(match -> key -> eth .vlan .tci &
1016
- htons (VLAN_TAG_PRESENT ));
1016
+ htons (VLAN_CFI_MASK ));
1017
1017
bool i_encap_valid = !!(match -> key -> eth .cvlan .tci &
1018
- htons (VLAN_TAG_PRESENT ));
1018
+ htons (VLAN_CFI_MASK ));
1019
1019
1020
1020
if (!(key_attrs & (1 << OVS_KEY_ATTR_ENCAP ))) {
1021
1021
/* Not a VLAN. */
@@ -1039,8 +1039,8 @@ static int validate_vlan_mask_from_nlattrs(const struct sw_flow_match *match,
1039
1039
(inner ) ? "C-VLAN" : "VLAN" , ntohs (tpid ));
1040
1040
return - EINVAL ;
1041
1041
}
1042
- if (!(tci & htons (VLAN_TAG_PRESENT ))) {
1043
- OVS_NLERR (log , "%s TCI mask does not have exact match for VLAN_TAG_PRESENT bit." ,
1042
+ if (!(tci & htons (VLAN_CFI_MASK ))) {
1043
+ OVS_NLERR (log , "%s TCI mask does not have exact match for VLAN_CFI_MASK bit." ,
1044
1044
(inner ) ? "C-VLAN" : "VLAN" );
1045
1045
return - EINVAL ;
1046
1046
}
@@ -1095,7 +1095,7 @@ static int parse_vlan_from_nlattrs(struct sw_flow_match *match,
1095
1095
if (err )
1096
1096
return err ;
1097
1097
1098
- encap_valid = !!(match -> key -> eth .vlan .tci & htons (VLAN_TAG_PRESENT ));
1098
+ encap_valid = !!(match -> key -> eth .vlan .tci & htons (VLAN_CFI_MASK ));
1099
1099
if (encap_valid ) {
1100
1100
err = __parse_vlan_from_nlattrs (match , key_attrs , true, a ,
1101
1101
is_mask , log );
@@ -2943,7 +2943,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
2943
2943
vlan = nla_data (a );
2944
2944
if (!eth_type_vlan (vlan -> vlan_tpid ))
2945
2945
return - EINVAL ;
2946
- if (!(vlan -> vlan_tci & htons (VLAN_TAG_PRESENT )))
2946
+ if (!(vlan -> vlan_tci & htons (VLAN_CFI_MASK )))
2947
2947
return - EINVAL ;
2948
2948
vlan_tci = vlan -> vlan_tci ;
2949
2949
break ;
@@ -2959,7 +2959,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
2959
2959
/* Prohibit push MPLS other than to a white list
2960
2960
* for packets that have a known tag order.
2961
2961
*/
2962
- if (vlan_tci & htons (VLAN_TAG_PRESENT ) ||
2962
+ if (vlan_tci & htons (VLAN_CFI_MASK ) ||
2963
2963
(eth_type != htons (ETH_P_IP ) &&
2964
2964
eth_type != htons (ETH_P_IPV6 ) &&
2965
2965
eth_type != htons (ETH_P_ARP ) &&
@@ -2971,7 +2971,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
2971
2971
}
2972
2972
2973
2973
case OVS_ACTION_ATTR_POP_MPLS :
2974
- if (vlan_tci & htons (VLAN_TAG_PRESENT ) ||
2974
+ if (vlan_tci & htons (VLAN_CFI_MASK ) ||
2975
2975
!eth_p_mpls (eth_type ))
2976
2976
return - EINVAL ;
2977
2977
@@ -3036,7 +3036,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,
3036
3036
case OVS_ACTION_ATTR_POP_ETH :
3037
3037
if (mac_proto != MAC_PROTO_ETHERNET )
3038
3038
return - EINVAL ;
3039
- if (vlan_tci & htons (VLAN_TAG_PRESENT ))
3039
+ if (vlan_tci & htons (VLAN_CFI_MASK ))
3040
3040
return - EINVAL ;
3041
3041
mac_proto = MAC_PROTO_NONE ;
3042
3042
break ;
0 commit comments