ctx->recurse--;
}
-static void
-xlate_table_action(struct xlate_ctx *ctx,
- ofp_port_t in_port, uint8_t table_id, bool may_packet_in)
+static bool
+xlate_resubmit_resource_check(struct xlate_ctx *ctx)
{
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1);
} else if (ctx->stack.size >= 65536) {
VLOG_ERR_RL(&rl, "resubmits yielded over 64 kB of stack");
} else {
+ return true;
+ }
+
+ return false;
+}
+
+static void
+xlate_table_action(struct xlate_ctx *ctx,
+ ofp_port_t in_port, uint8_t table_id, bool may_packet_in)
+{
+ if (xlate_resubmit_resource_check(ctx)) {
struct rule_dpif *rule;
ofp_port_t old_in_port = ctx->xin->flow.in_port.ofp_port;
uint8_t old_table_id = ctx->table_id;