ofproto: Format entire rule when dumping all flows.
authorBen Pfaff <blp@nicira.com>
Thu, 9 Dec 2010 22:16:56 +0000 (14:16 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 10 Dec 2010 19:14:13 +0000 (11:14 -0800)
cls_rule_format() formats the entire classifier rule, whereas
ofp_print_match() just shows the parts that are visible in OpenFlow 1.0.

Acked-by: Jesse Gross <jesse@nicira.com>
ofproto/ofproto.c

index 86d0ae6..45b9d46 100644 (file)
@@ -3575,19 +3575,17 @@ handle_nxst_flow(struct ofconn *ofconn, const struct ofp_header *oh)
 static void
 flow_stats_ds(struct ofproto *ofproto, struct rule *rule, struct ds *results)
 {
-    struct ofp_match match;
     uint64_t packet_count, byte_count;
     size_t act_len = sizeof *rule->actions * rule->n_actions;
 
     query_stats(ofproto, rule, &packet_count, &byte_count);
-    ofputil_cls_rule_to_match(&rule->cr, NXFF_OPENFLOW10, &match);
 
     ds_put_format(results, "duration=%llds, ",
                   (time_msec() - rule->created) / 1000);
     ds_put_format(results, "priority=%u, ", rule->cr.priority);
     ds_put_format(results, "n_packets=%"PRIu64", ", packet_count);
     ds_put_format(results, "n_bytes=%"PRIu64", ", byte_count);
-    ofp_print_match(results, &match, true);
+    cls_rule_format(&rule->cr, results);
     if (act_len > 0) {
         ofp_print_actions(results, &rule->actions->header, act_len);
     } else {