From b476e2f21b1f20bd0d24c0522e4d745603599582 Mon Sep 17 00:00:00 2001 From: Daniele Di Proietto Date: Fri, 4 Dec 2015 14:04:26 -0800 Subject: [PATCH] ofproto-dpif-xlate: Fix revalidation in execute_controller_action(). If there's no actual packet (e.g. during revalidation), execute_controller_action() exits right away, without calling xlate_commit_actions(). xlate_commit_actions() might have an influence on slow_path reason (which is included in the generated ODP actions), meaning that the revalidation will not generate the same actions than the original translation. Fix the problem by making execute_controller_action() call xlate_commit_actions() even without a packet. --- ofproto/ofproto-dpif-xlate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index cf184e405..dab64b9ed 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -3572,14 +3572,13 @@ execute_controller_action(struct xlate_ctx *ctx, int len, struct dp_packet *packet; ctx->xout->slow |= SLOW_CONTROLLER; + xlate_commit_actions(ctx); if (!ctx->xin->packet) { return; } packet = dp_packet_clone(ctx->xin->packet); - xlate_commit_actions(ctx); - odp_execute_actions(NULL, &packet, 1, false, ctx->odp_actions->data, ctx->odp_actions->size, NULL); -- 2.20.1