mirror of
https://github.com/openvswitch/ovs
synced 2025-10-15 14:17:18 +00:00
Use VLAN_PCP_SHIFT consistently, instead of open-coding "13".
Reported-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
@@ -92,7 +92,7 @@ modify_vlan_tci(struct datapath *dp, struct sk_buff *skb,
|
||||
mask = VLAN_VID_MASK;
|
||||
key->dl_vlan = htons(tci & mask);
|
||||
} else {
|
||||
tci = a->vlan_pcp.vlan_pcp << 13;
|
||||
tci = a->vlan_pcp.vlan_pcp << VLAN_PCP_SHIFT;
|
||||
mask = VLAN_PCP_MASK;
|
||||
}
|
||||
|
||||
|
@@ -1273,8 +1273,9 @@ dp_netdev_execute_actions(struct dp_netdev *dp,
|
||||
break;
|
||||
|
||||
case ODPAT_SET_VLAN_PCP:
|
||||
dp_netdev_modify_vlan_tci(packet, key, a->vlan_pcp.vlan_pcp << 13,
|
||||
VLAN_PCP_MASK);
|
||||
dp_netdev_modify_vlan_tci(
|
||||
packet, key, a->vlan_pcp.vlan_pcp << VLAN_PCP_SHIFT,
|
||||
VLAN_PCP_MASK);
|
||||
break;
|
||||
|
||||
case ODPAT_STRIP_VLAN:
|
||||
|
Reference in New Issue
Block a user