From: Jesse Gross Date: Mon, 5 Aug 2013 23:00:03 +0000 (-0700) Subject: ofproto: Include classifier wildcards in trace output. X-Git-Tag: sliver-openvswitch-2.0.90-1~27^2~23 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=083f277e3c1de0573c9feddd27d584c49857b5ef;p=sliver-openvswitch.git 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 --- 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);