struct rule_dpif *rule;
int recurse; /* Recursion level, via xlate_table_action. */
- bool max_resubmit_trigger; /* Recursed too deeply during translation. */
uint32_t orig_skb_priority; /* Priority when packet arrived. */
uint8_t table_id; /* OpenFlow table ID where flow was found. */
uint32_t sflow_n_outputs; /* Number of output ports. */
VLOG_ERR_RL(&recurse_rl, "resubmit actions recursed over %d times",
MAX_RESUBMIT_RECURSION);
- ctx->max_resubmit_trigger = true;
}
}
void
xlate_actions(struct xlate_in *xin, struct xlate_out *xout)
{
- /* Normally false. Set to true if we ever hit MAX_RESUBMIT_RECURSION, so
- * that in the future we always keep a copy of the original flow for
- * tracing purposes. */
- static bool hit_resubmit_limit;
-
struct flow_wildcards *wc = &xout->wc;
struct flow *flow = &xin->flow;
}
ctx.recurse = 0;
- ctx.max_resubmit_trigger = false;
ctx.orig_skb_priority = flow->skb_priority;
ctx.table_id = 0;
ctx.exit = false;
ofpbuf_use_stub(&ctx.stack, ctx.init_stack, sizeof ctx.init_stack);
- if (mbridge_has_mirrors(ctx.xbridge->mbridge) || hit_resubmit_limit) {
+ if (mbridge_has_mirrors(ctx.xbridge->mbridge)) {
/* Do this conditionally because the copy is expensive enough that it
* shows up in profiles. */
orig_flow = *flow;
if (special) {
ctx.xout->slow = special;
} else {
- static struct vlog_rate_limit trace_rl = VLOG_RATE_LIMIT_INIT(1, 1);
size_t sample_actions_len;
if (flow->in_port.ofp_port
}
}
- if (ctx.max_resubmit_trigger && !ctx.xin->resubmit_hook) {
- if (!hit_resubmit_limit) {
- /* We didn't record the original flow. Make sure we do from
- * now on. */
- hit_resubmit_limit = true;
- } else if (!VLOG_DROP_ERR(&trace_rl)) {
- struct ds ds = DS_EMPTY_INITIALIZER;
-
- ofproto_trace(ctx.xbridge->ofproto, &orig_flow,
- ctx.xin->packet, &ds);
- VLOG_ERR("Trace triggered by excessive resubmit "
- "recursion:\n%s", ds_cstr(&ds));
- ds_destroy(&ds);
- }
- }
-
if (ctx.xbridge->has_in_band
&& in_band_must_output_to_local_port(flow)
&& !actions_output_to_local_port(&ctx)) {
static struct ofport_dpif *get_ofp_port(const struct ofproto_dpif *ofproto,
ofp_port_t ofp_port);
+static void ofproto_trace(struct ofproto_dpif *, const struct flow *,
+ const struct ofpbuf *packet, struct ds *);
/* Upcalls. */
#define FLOW_MISS_MAX_BATCH 50
ofpbuf_uninit(&odp_mask);
}
-void
+static void
ofproto_trace(struct ofproto_dpif *ofproto, const struct flow *flow,
const struct ofpbuf *packet, struct ds *ds)
{
void rule_credit_stats(struct rule_dpif *, const struct dpif_flow_stats *);
-void ofproto_trace(struct ofproto_dpif *, const struct flow *,
- const struct ofpbuf *packet, struct ds *);
-
size_t put_userspace_action(const struct ofproto_dpif *,
struct ofpbuf *odp_actions, const struct flow *,
const union user_action_cookie *,