From 083f277e3c1de0573c9feddd27d584c49857b5ef Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Mon, 5 Aug 2013 16:00:03 -0700 Subject: [PATCH] ofproto: Include classifier wildcards in trace output. When tracing a flow, it shows the "relevant fields" that were used to determine the results. However, this currently only includes fields that are used for computing the actions but not the flow lookup. This can be confusing so this patch includes the wildcards from the classifer lookup as well. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- ofproto/ofproto-dpif.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 050c81809..f59cb7cf7 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -5432,12 +5432,14 @@ ofproto_trace(struct ofproto_dpif *ofproto, const struct flow *flow, const struct ofpbuf *packet, struct ds *ds) { struct rule_dpif *rule; + struct flow_wildcards wc; ds_put_cstr(ds, "Flow: "); flow_format(ds, flow); ds_put_char(ds, '\n'); - rule_dpif_lookup(ofproto, flow, NULL, &rule); + flow_wildcards_init_catchall(&wc); + rule_dpif_lookup(ofproto, flow, &wc, &rule); trace_format_rule(ds, 0, rule); if (rule == ofproto->miss_rule) { @@ -5467,6 +5469,7 @@ ofproto_trace(struct ofproto_dpif *ofproto, const struct flow *flow, trace.xin.report_hook = trace_report; xlate_actions(&trace.xin, &trace.xout); + flow_wildcards_or(&trace.xout.wc, &trace.xout.wc, &wc); ds_put_char(ds, '\n'); trace_format_flow(ds, 0, "Final flow", &trace); -- 2.47.0