git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: Simplify ODPAT_SET_DL_TCI action.
[sliver-openvswitch.git]
/
datapath
/
actions.c
diff --git
a/datapath/actions.c
b/datapath/actions.c
index
5365278
..
5904c83
100644
(file)
--- a/
datapath/actions.c
+++ b/
datapath/actions.c
@@
-74,7
+74,6
@@
static struct sk_buff *modify_vlan_tci(struct datapath *dp, struct sk_buff *skb,
const struct odp_flow_key *key,
const union odp_action *a, int n_actions)
{
const struct odp_flow_key *key,
const union odp_action *a, int n_actions)
{
- __be16 mask = a->dl_tci.mask;
__be16 tci = a->dl_tci.tci;
skb = make_writable(skb, VLAN_HLEN);
__be16 tci = a->dl_tci.tci;
skb = make_writable(skb, VLAN_HLEN);
@@
-92,7
+91,7
@@
static struct sk_buff *modify_vlan_tci(struct datapath *dp, struct sk_buff *skb,
vh = vlan_eth_hdr(skb);
old_tci = vh->h_vlan_TCI;
vh = vlan_eth_hdr(skb);
old_tci = vh->h_vlan_TCI;
- vh->h_vlan_TCI =
(vh->h_vlan_TCI & ~mask) |
tci;
+ vh->h_vlan_TCI = tci;
if (OVS_CB(skb)->ip_summed == OVS_CSUM_COMPLETE) {
__be16 diff[] = { ~old_tci, vh->h_vlan_TCI };
if (OVS_CB(skb)->ip_summed == OVS_CSUM_COMPLETE) {
__be16 diff[] = { ~old_tci, vh->h_vlan_TCI };