[ovs-dev] [tunid64 v3 6/8] ofproto: Format entire rule when dumping all flows.

Ben Pfaff blp at nicira.com
Thu Dec 9 22:48:30 UTC 2010


cls_rule_format() formats the entire classifier rule, whereas
ofp_print_match() just shows the parts that are visible in OpenFlow 1.0.
---
 ofproto/ofproto.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 8db4c2e..89e69bd 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -3541,19 +3541,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 {
-- 
1.7.1





More information about the dev mailing list