On Mon, Mar 04, 2013 at 10:56:21PM -0800, Justin Pettit wrote: > In the kernel tunnel implementation, if a packet was marked as ECN CE on > the outer packet then we would carry this over to the inner packet on > decapsulation. With the switch to flow based tunneling, this stopped > happening. This commit reintroduces that behavior by using the set IP > header action. > > Bug #15072 > > Signed-off-by: Justin Pettit <jpet...@nicira.com>
This looks good, thanks. I have one trivial comment. The indentation of the && clause here looks funny to me, also there's an extra set of () around the == clause: > if (is_ip_any(&ctx->base_flow) > - && (ctx->base_flow.tunnel.ip_tos & IP_ECN_MASK) == IP_ECN_CE > - && (ctx->base_flow.nw_tos & IP_ECN_MASK) == IP_ECN_NOT_ECT) { > - VLOG_WARN_RL(&rl, "dropping tunnel packet marked ECN CE but is not > ECN" > - " capable"); > - return false; > + && ((ctx->base_flow.tunnel.ip_tos & IP_ECN_MASK) == IP_ECN_CE)) { > + > + if ((ctx->base_flow.nw_tos & IP_ECN_MASK) == IP_ECN_NOT_ECT) { > + VLOG_WARN_RL(&rl, "dropping tunnel packet marked ECN CE" > + " but is not ECN capable"); > + return false; > + } else { > + /* Set the ECN CE value in the tunneled packet. */ > + ctx->flow.nw_tos |= IP_ECN_CE; > + } > } _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev