From a4c3463d024e51a0d2089b9fba50d8d90c7c668c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 7 Aug 2018 11:18:56 -0700 Subject: [PATCH] ofproto-dpif-xlate: Improve log message. Until now, the bridge name was at the end of the log message, after the flow, which made it easy to miss. This commit moves it before the flow where it is easier to spot. Signed-off-by: Ben Pfaff Acked-by: Flavio Leitner --- ofproto/ofproto-dpif-xlate.c | 4 ++-- tests/ofproto-dpif.at | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index aa169bff3..e26f6c8f5 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -666,9 +666,9 @@ xlate_report_error(const struct xlate_ctx *ctx, const char *format, ...) if (ctx->xin->trace) { oftrace_report(ctx->xin->trace, OFT_ERROR, ds_cstr(&s)); } else { - ds_put_cstr(&s, " while processing "); + ds_put_format(&s, " on bridge %s while processing ", + ctx->xbridge->name); flow_format(&s, &ctx->base_flow, NULL); - ds_put_format(&s, " on bridge %s", ctx->xbridge->name); VLOG_WARN("%s", ds_cstr(&s)); } ds_destroy(&s); diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index caa9b434c..362c58db4 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -8030,7 +8030,7 @@ recirc_id(0),in_port(100),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(src=192.1 ]) AT_CHECK([grep -e '|ofproto_dpif_xlate|WARN|' ovs-vswitchd.log | sed "s/^.*|WARN|//"], [0], [dnl -stack underflow while processing icmp,in_port=LOCAL,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 on bridge br1 +stack underflow on bridge br1 while processing icmp,in_port=LOCAL,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0 ]) OVS_VSWITCHD_STOP(["/stack underflow/d"])