From 8961de6adfd44216f47007ff75fd1cea213d7e31 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 9 Dec 2010 12:31:31 -0800 Subject: [PATCH] ofp-print: Print every flow on a new line for NXST_FLOW replies too. This makes NXST_FLOW formatting consistent with OFPST_FLOW. Suggested-by: Justin Pettit --- lib/ofp-print.c | 3 ++- tests/ofproto.at | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index a49c3854..5370c9aa 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1221,6 +1221,8 @@ ofp_print_nxst_flow_reply(struct ds *string, const struct ofp_header *oh) int match_len; int error; + ds_put_char(string, '\n'); + fs = ofpbuf_try_pull(&b, sizeof *fs); if (!fs) { ds_put_format(string, " ***%td leftover bytes at end***", b.size); @@ -1276,7 +1278,6 @@ ofp_print_nxst_flow_reply(struct ds *string, const struct ofp_header *oh) ds_put_char(string, ' '); ofp_print_actions(string, (const struct ofp_action_header *) actions, n_actions * sizeof *actions); - ds_put_char(string, '\n'); } } diff --git a/tests/ofproto.at b/tests/ofproto.at index 9777e161..907ac13b 100644 --- a/tests/ofproto.at +++ b/tests/ofproto.at @@ -66,7 +66,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS], [0], [NXST_FLOW reply: AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=0]) AT_CHECK([ovs-ofctl add-flow br0 in_port=0,actions=1]) AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS | STRIP_DURATION], [0], [dnl -NXST_FLOW reply: cookie=0x0, duration=?s, table_id=0, priority=32768, n_packets=0, n_bytes=0, in_port=1 actions=output:0 +NXST_FLOW reply: + cookie=0x0, duration=?s, table_id=0, priority=32768, n_packets=0, n_bytes=0, in_port=1 actions=output:0 cookie=0x0, duration=?s, table_id=0, priority=32768, n_packets=0, n_bytes=0, in_port=65534 actions=output:1 ]) AT_CHECK([ovs-ofctl del-flows br0]) -- 2.30.2