[ovs-dev] [PATCH] ofproto: Add "actions=" to drop action in "ovs-appctl bridge/dump-flows".

Justin Pettit jpettit at nicira.com
Thu Jan 17 08:37:07 UTC 2013


The function flow_stats_ds() did its own formatting when there were no
actions, but this didn't include "action=".  There's actually no reason
to special-case this, since ofpact_format() properly handles actions
with a zero length and prints it properly.

Signed-off-by: Justin Pettit <jpettit at nicira.com>
---
 ofproto/ofproto.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index ddf51f8..918b9b4 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -2809,11 +2809,7 @@ flow_stats_ds(struct rule *rule, struct ds *results)
     ds_put_format(results, "n_bytes=%"PRIu64", ", byte_count);
     cls_rule_format(&rule->cr, results);
     ds_put_char(results, ',');
-    if (rule->ofpacts_len > 0) {
-        ofpacts_format(rule->ofpacts, rule->ofpacts_len, results);
-    } else {
-        ds_put_cstr(results, "drop");
-    }
+    ofpacts_format(rule->ofpacts, rule->ofpacts_len, results);
     ds_put_cstr(results, "\n");
 }
 
-- 
1.7.5.4




More information about the dev mailing list