2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ofp-print: Consistently print priority only if it is not default.

In NXST_FLOW replies, the priority was printed only if it was not
OFP_DEFAULT_PRIORITY, but it was always printed in OFPST_FLOW replies.
This commit changes OFPST_FLOW replies to match NXST_FLOW replies.
This commit is contained in:
Ben Pfaff
2011-03-10 14:59:06 -08:00
parent a3e2d85f8f
commit fbc7ed06a7
2 changed files with 6 additions and 4 deletions

View File

@@ -1129,7 +1129,9 @@ ofp_print_ofpst_flow_reply(struct ds *string, const struct ofp_header *oh,
ofp_print_duration(string, ntohl(fs->duration_sec),
ntohl(fs->duration_nsec));
ds_put_format(string, ", table_id=%"PRIu8", ", fs->table_id);
ds_put_format(string, "priority=%"PRIu16", ", ntohs(fs->priority));
if (fs->priority != htons(OFP_DEFAULT_PRIORITY)) {
ds_put_format(string, "priority=%"PRIu16", ", ntohs(fs->priority));
}
ds_put_format(string, "n_packets=%"PRIu64", ",
ntohll(get_32aligned_be64(&fs->packet_count)));
ds_put_format(string, "n_bytes=%"PRIu64", ",