]> git.proxmox.com Git - ovs.git/commitdiff
ofproto: Include classifier wildcards in trace output.
authorJesse Gross <jesse@nicira.com>
Mon, 5 Aug 2013 23:00:03 +0000 (16:00 -0700)
committerJesse Gross <jesse@nicira.com>
Tue, 13 Aug 2013 00:11:53 +0000 (17:11 -0700)
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 <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c

index 050c81809c10462f7d8eac9a65707e68d497d118..f59cb7cf79d94d2b96df1ccbe66f80b7c9de3eb0 100644 (file)
@@ -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);