ofproto-dpif: Implement OFPAT_SET_NW_TOS.
authorBen Pfaff <blp@nicira.com>
Mon, 18 Jul 2011 22:13:01 +0000 (15:13 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 20 Jul 2011 16:47:36 +0000 (09:47 -0700)
This field was overlooked in commit b3e9b2eda9a "ofproto: Optimize datapath
actions."

Found by inspection.

ofproto/ofproto-dpif.c

index 9d2f5ba..e39f615 100644 (file)
@@ -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);