From: Ben Pfaff Date: Thu, 9 Dec 2010 22:16:56 +0000 (-0800) Subject: ofproto: Format entire rule when dumping all flows. X-Git-Tag: v1.1.0~661 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=cb833cf6c345d9b038ff2ab4fd11a2498cc07efb;p=sliver-openvswitch.git ofproto: Format entire rule when dumping all flows. 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 --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 86d0ae677..45b9d460f 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -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 {