[ovs-dev] [PATCH v12 1/8] ofproto-dpif: Actually log errors in facet_check_consistency()

Simon Horman horms at verge.net.au
Wed Jun 5 05:28:47 UTC 2013


facet_check_consistency() goes to some effort to create informative
error messages, protected by a rate limit, but does not actually
log these messages.

This appears to be an unintended side effect of
4dff90977694784e67e9c08cc72dee28ebc343ae ("ofproto-dpif: Move odp_actions
from subfacet to facet.").  This patch restores the logging behaviour
present prior to the above commit.

This patch also revers a changes made by the same commit to use
ds_put_cstr() instead of ds_put_char() in facet_check_consistency().

Cc: Justin Pettit <jpettit at nicira.com>
Cc: Ethan Jackson <ethan at nicira.com>
Signed-off-by: Simon Horman <horms at verge.net.au>
---
 ofproto/ofproto-dpif.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 7c3abec..7016e73 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -4930,8 +4930,9 @@ facet_check_consistency(struct facet *facet)
             ds_put_format(&s, ") (should have been table=%"PRIu8",",
                           rule->up.table_id);
             cls_rule_format(&rule->up.cr, &s);
-            ds_put_cstr(&s, ")\n");
+            ds_put_char(&s, ')');
 
+            VLOG_WARN("%s", ds_cstr(&s));
             ds_destroy(&s);
         }
         return false;
@@ -4957,13 +4958,14 @@ facet_check_consistency(struct facet *facet)
             ds_put_cstr(&s, ") (correct actions: ");
             format_odp_actions(&s, xout.odp_actions.data,
                                xout.odp_actions.size);
-            ds_put_cstr(&s, ")");
+            ds_put_char(&s, ')');
         }
 
         if (facet->xout.slow != xout.slow) {
             ds_put_format(&s, " slow path incorrect. should be %d", xout.slow);
         }
 
+        VLOG_WARN("%s", ds_cstr(&s));
         ds_destroy(&s);
     }
     xlate_out_uninit(&xout);
-- 
1.8.2.1




More information about the dev mailing list