From c0a71f4e62617a9dbdd19089e22ec29b594f3860 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 5 Jun 2013 13:28:47 +0000 Subject: [PATCH] ofproto-dpif: Actually log errors in facet_check_consistency() 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 reverses a changes made by the same commit to use ds_put_cstr() instead of ds_put_char() in facet_check_consistency(). Cc: Justin Pettit Cc: Ethan Jackson Signed-off-by: Simon Horman Signed-off-by: Ethan Jackson --- 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 a9d2ddd47..776be9644 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -4943,8 +4943,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; @@ -4970,13 +4971,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); -- 2.43.0