From 150a9f153b27a0d4b67388bd60d619dc78fa22ce Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 18 Jul 2011 15:13:01 -0700 Subject: [PATCH] ofproto-dpif: Implement OFPAT_SET_NW_TOS. This field was overlooked in commit b3e9b2eda9a "ofproto: Optimize datapath actions." Found by inspection. --- ofproto/ofproto-dpif.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 9d2f5ba4..e39f6159 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); -- 2.30.2