I found this patch useful in tracking down a bug recently.
---
ofproto/ofproto-dpif.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index fdef4af..edc9ccb 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -4019,6 +4019,20 @@ trace_format_flow(struct ds *result, int level, const
char *title,
}
static void
+trace_format_regs(struct ds *result, int level, const char *title,
+ struct ofproto_trace *trace)
+{
+ size_t i;
+
+ ds_put_char_multiple(result, '\t', level);
+ ds_put_format(result, "%s: ", title);
+ for (i = 0; i < FLOW_N_REGS; i++) {
+ ds_put_format(result, "reg%zu=0x%x ", i, trace->flow.regs[i]);
+ }
+ ds_put_char(result, '\n');
+}
+
+static void
trace_resubmit(struct action_xlate_ctx *ctx, struct rule_dpif *rule)
{
struct ofproto_trace *trace = CONTAINER_OF(ctx, struct ofproto_trace, ctx);
@@ -4026,6 +4040,7 @@ trace_resubmit(struct action_xlate_ctx *ctx, struct
rule_dpif *rule)
ds_put_char(result, '\n');
trace_format_flow(result, ctx->recurse + 1, "Resubmitted flow", trace);
+ trace_format_regs(result, ctx->recurse + 1, "Resubmitted regs", trace);
trace_format_rule(result, ctx->table_id, ctx->recurse + 1, rule);
}
--
1.7.6
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev