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 9d2f5ba4dd8728af4918a09741d77be8e99ba81e..e39f6159642891d8a7189ea8b66a7fdd50e8ea05 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);