2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +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", ",

View File

@@ -437,10 +437,10 @@ c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
00 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
00 00 00 01 00 03 50 54 00 00 00 05 50 54 00 00 \
00 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
80 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
00 00 04 fa 00 00 00 08 00 01 00 00 \
"], [0], [dnl
@@ -448,7 +448,7 @@ OFPST_FLOW reply (xid=0x4):
cookie=0x0, duration=4.2s, table_id=0, priority=65535, n_packets=1, n_bytes=60, idle_timeout=5,arp,in_port=3,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,opcode=2,nw_tos=0,tp_src=0,tp_dst=0 actions=output:1
cookie=0x0, duration=8.9s, table_id=0, priority=65535, n_packets=13, n_bytes=1274, idle_timeout=5,icmp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3
cookie=0x0, duration=4.28s, table_id=0, priority=65535, n_packets=1, n_bytes=60, idle_timeout=5,arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,opcode=1,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3
cookie=0x0, duration=9.096s, table_id=0, priority=65535, n_packets=13, n_bytes=1274, idle_timeout=5,icmp,in_port=3,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,icmp_type=8,icmp_code=0 actions=output:1
cookie=0x0, duration=9.096s, table_id=0, n_packets=13, n_bytes=1274, idle_timeout=5,icmp,in_port=*,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,icmp_type=8,icmp_code=0 actions=output:1
])
AT_CLEANUP