Message ID | 1533334008-42228-1-git-send-email-zwhitt.vmware@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [ovs-dev] ofproto-dpif-xlate: Added logging when attempting to send out an in_port | expand |
On Fri, Aug 03, 2018 at 03:06:48PM -0700, Zak Whittington wrote: > VMware-BZ: 2158607 > Signed-off-by: Zak Whittington <zwhitt.vmware@gmail.com> > --- > ofproto/ofproto-dpif-xlate.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c > index 01f1faf..93fbee5 100644 > --- a/ofproto/ofproto-dpif-xlate.c > +++ b/ofproto/ofproto-dpif-xlate.c > @@ -5007,6 +5007,8 @@ 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); > + VLOG_INFO_RL(&rl, "skipping output to input port"); > xlate_report(ctx, OFT_WARN, "skipping output to input port"); > } > break; Thanks for working to making Open vSwitch easier for developers of controllers to debug. I think that this new log message could be more useful if it provided more context. The xlate_report() message is short and sweet and still useful because there is a lot of context in the rest of the report, which has details of the full original packet as well as all of the flow table entries that were traversed to get to the output action. Just reporting in the log that some packet skipped output to the input port is going to be less informative. I'd suggest adding at least the flow information to the log message. Thanks, Ben.
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 01f1faf..93fbee5 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -5007,6 +5007,8 @@ 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); + VLOG_INFO_RL(&rl, "skipping output to input port"); xlate_report(ctx, OFT_WARN, "skipping output to input port"); } break; @@ -5092,6 +5094,8 @@ 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); + VLOG_INFO_RL(&rl, "skipping output to input port"); xlate_report(ctx, OFT_WARN, "skipping output to input port"); } break;
VMware-BZ: 2158607 Signed-off-by: Zak Whittington <zwhitt.vmware@gmail.com> --- ofproto/ofproto-dpif-xlate.c | 4 ++++ 1 file changed, 4 insertions(+)