From a7c4eaf6358e59b8642d9c26ee7efb5fedfa2186 Mon Sep 17 00:00:00 2001 From: Pravin B Shelar Date: Tue, 18 Oct 2011 11:15:43 -0700 Subject: [PATCH] ofproto-dpif: Fix in-band action for sFlow. Use compose_output_action() API to generate OUTPUT action so that sFlow can record output port. --- ofproto/ofproto-dpif.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index ae76e985..9f73a8f8 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3886,7 +3886,6 @@ xlate_actions(struct action_xlate_ctx *ctx, } else { add_sflow_action(ctx); do_xlate_actions(in, n_in, ctx); - fix_sflow_action(ctx); if (!connmgr_may_set_up_flow(ctx->ofproto->up.connmgr, &ctx->flow, ctx->odp_actions->data, @@ -3895,10 +3894,10 @@ xlate_actions(struct action_xlate_ctx *ctx, if (ctx->packet && connmgr_msg_in_hook(ctx->ofproto->up.connmgr, &ctx->flow, ctx->packet)) { - nl_msg_push_u32(ctx->odp_actions, OVS_ACTION_ATTR_OUTPUT, - OVSP_LOCAL); + compose_output_action(ctx, OVSP_LOCAL); } } + fix_sflow_action(ctx); } return ctx->odp_actions; -- 2.30.2