summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-07-18 15:13:01 -0700
committerBen Pfaff <blp@nicira.com>2011-07-20 09:47:36 -0700
commit150a9f153b27a0d4b67388bd60d619dc78fa22ce (patch)
tree22069e38bee8ad56bd86abf3371854fae691c570 /ofproto/ofproto-dpif.c
parent1fa96cf431bc0bdfd81aeab50e1344355f2fb73e (diff)
downloadopenvswitch-150a9f153b27a0d4b67388bd60d619dc78fa22ce.tar.gz
ofproto-dpif: Implement OFPAT_SET_NW_TOS.
This field was overlooked in commit b3e9b2eda9a "ofproto: Optimize datapath actions." Found by inspection.
Diffstat (limited to 'ofproto/ofproto-dpif.c')
-rw-r--r--ofproto/ofproto-dpif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 9d2f5ba4d..e39f61596 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -2807,6 +2807,11 @@ commit_odp_actions(struct action_xlate_ctx *ctx)
base->nw_dst = flow->nw_dst;
}
+ if (base->nw_tos != flow->nw_tos) {
+ nl_msg_put_u8(odp_actions, ODP_ACTION_ATTR_SET_NW_TOS, flow->nw_tos);
+ base->nw_tos = flow->nw_tos;
+ }
+
if (base->vlan_tci != flow->vlan_tci) {
if (!(flow->vlan_tci & htons(VLAN_CFI))) {
nl_msg_put_flag(odp_actions, ODP_ACTION_ATTR_STRIP_VLAN);