ofproto-dpif-xlate: Don't stop processing after ct.
authorJoe Stringer <joestringer@nicira.com>
Sat, 7 Nov 2015 00:16:47 +0000 (16:16 -0800)
committerJoe Stringer <joestringer@nicira.com>
Wed, 11 Nov 2015 18:16:44 +0000 (10:16 -0800)
If conntrack recirculates, it should not stop processing the current
pipeline. The cloned packet will begin processing in the table specified
with the current metadata and action set; The current copy of the packet
will continue processing, including to return back to prior resubmit()
calls.

Reported-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
ofproto/ofproto-dpif-xlate.c

index 325e308..1738394 100644 (file)
@@ -3591,6 +3591,17 @@ compose_recirculate_action(struct xlate_ctx *ctx)
     compose_recirculate_action__(ctx, 0);
 }
 
+/* Fork the pipeline here. The current packet will continue processing the
+ * current action list. A clone of the current packet will recirculate, skip
+ * the remainder of the current action list and asynchronously resume pipeline
+ * processing in 'table' with the current metadata and action set. */
+static void
+compose_recirculate_and_fork(struct xlate_ctx *ctx, uint8_t table)
+{
+    ctx->recirc_action_offset = ctx->action_set.size;
+    compose_recirculate_action__(ctx, table);
+}
+
 static void
 compose_mpls_push_action(struct xlate_ctx *ctx, struct ofpact_push_mpls *mpls)
 {
@@ -4239,8 +4250,7 @@ compose_conntrack_action(struct xlate_ctx *ctx, struct ofpact_conntrack *ofc)
     } else {
         /* Use ct_* fields from datapath during recirculation upcall. */
         ctx->conntracked = true;
-        ctx_trigger_recirculation(ctx);
-        compose_recirculate_action__(ctx, ofc->recirc_table);
+        compose_recirculate_and_fork(ctx, ofc->recirc_table);
     }
 }