[ovs-dev] [PATCH] ofproto-dpif-xlate: Added logging for when sending out an in port

Zak Whittington zwhitt.vmware at gmail.com
Tue Aug 7 17:37:35 UTC 2018


VMware-BZ: 2158607
Signed-off-by: Zak Whittington <zwhitt.vmware at gmail.com>
---
 ofproto/ofproto-dpif-xlate.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 01f1faf..9b36536 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -5007,6 +5007,18 @@ xlate_output_action(struct xlate_ctx *ctx, ofp_port_t port,
         if (port != ctx->xin->flow.in_port.ofp_port) {
             compose_output_action(ctx, port, NULL, is_last_action, truncate);
         } else {
+            static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
+            if (!VLOG_DROP_INFO(&rl)) {
+                struct ds s = DS_EMPTY_INITIALIZER;
+                ds_put_cstr(&s,
+                    "Skipping output to input port while processing: ");
+                flow_format(&s, &ctx->base_flow, NULL);
+                ds_put_format(&s, " on bridge %s", ctx->xbridge->name);
+                VLOG_INFO("%s", ds_cstr(&s));
+                ds_destroy(&s);
+            }
+
+            /* For when tracing only: */
             xlate_report(ctx, OFT_WARN, "skipping output to input port");
         }
         break;
@@ -5092,6 +5104,18 @@ xlate_output_trunc_action(struct xlate_ctx *ctx,
                 ctx->xout->slow |= SLOW_ACTION;
             }
         } else {
+            static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
+            if (!VLOG_DROP_INFO(&rl)) {
+                struct ds s = DS_EMPTY_INITIALIZER;
+                ds_put_cstr(&s,
+                    "Skipping output to input port while processing:");
+                flow_format(&s, &ctx->base_flow, NULL);
+                ds_put_format(&s, " on bridge %s", ctx->xbridge->name);
+                VLOG_INFO("%s", ds_cstr(&s));
+                ds_destroy(&s);
+            }
+
+            /* For when tracing only: */
             xlate_report(ctx, OFT_WARN, "skipping output to input port");
         }
         break;
-- 
2.7.4



More information about the dev mailing list