projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4380e92
)
Use VLAN_PCP_SHIFT consistently, instead of open-coding "13".
author
Ben Pfaff
<blp@nicira.com>
Fri, 12 Feb 2010 21:54:19 +0000
(13:54 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Fri, 12 Feb 2010 21:56:15 +0000
(13:56 -0800)
Reported-by: Jesse Gross <jesse@nicira.com>
datapath/actions.c
patch
|
blob
|
history
lib/dpif-netdev.c
patch
|
blob
|
history
diff --git
a/datapath/actions.c
b/datapath/actions.c
index 8b32de47c398fb50d5a5cf0159353b721269d939..cb29a998bd53b92c97ac427448f64edfa0a27b4a 100644
(file)
--- a/
datapath/actions.c
+++ b/
datapath/actions.c
@@
-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;
}
diff --git
a/lib/dpif-netdev.c
b/lib/dpif-netdev.c
index 2fd2bed3788a16182a82b599a45113a8c811ed43..1bd811255019d9e92b684ecde001cd4622f8b361 100644
(file)
--- a/
lib/dpif-netdev.c
+++ b/
lib/dpif-netdev.c
@@
-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: