summaryrefslogtreecommitdiff
path: root/ofproto/tunnel.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2017-12-28 12:34:49 -0800
committerBen Pfaff <blp@ovn.org>2018-01-04 10:32:24 -0800
commit9d31db0082ff6f10827465c52eda422318d2796a (patch)
tree0bcdad6a1690e1571fcd4c7bacfae84375748865 /ofproto/tunnel.c
parent3194a7906c97752782c1fd6fedcc5117e2b6e3b0 (diff)
downloadopenvswitch-9d31db0082ff6f10827465c52eda422318d2796a.tar.gz
tunnel: Log sanely in tnl_port_receive().
When this function was introduced in 2012, it modified its 'flow' argument and logged the changes (at debug level). However, since 2013 it has no longer modified its 'flow' argument, but the logging was still oriented around the idea that it did. This commit fixes up the logging to make sense again. This doesn't fix an actual bug that causes problems, but it does fix a conceptual error. Fixes: 2301f7ebc15e ("tunnel: Make tnl_port_receive() parameter 'const'.") Signed-off-by: Ben Pfaff <blp@ovn.org> Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
Diffstat (limited to 'ofproto/tunnel.c')
-rw-r--r--ofproto/tunnel.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c
index 9896d715a..f6d266a00 100644
--- a/ofproto/tunnel.c
+++ b/ofproto/tunnel.c
@@ -301,7 +301,6 @@ tnl_port_del(const struct ofport_dpif *ofport, odp_port_t odp_port)
const struct ofport_dpif *
tnl_port_receive(const struct flow *flow) OVS_EXCLUDED(rwlock)
{
- char *pre_flow_str = NULL;
const struct ofport_dpif *ofport;
struct tnl_port *tnl_port;
@@ -318,20 +317,11 @@ tnl_port_receive(const struct flow *flow) OVS_EXCLUDED(rwlock)
}
if (!VLOG_DROP_DBG(&dbg_rl)) {
- pre_flow_str = flow_to_string(flow, NULL);
- }
-
- if (pre_flow_str) {
- char *post_flow_str = flow_to_string(flow, NULL);
+ char *flow_str = flow_to_string(flow, NULL);
char *tnl_str = tnl_port_fmt(tnl_port);
- VLOG_DBG("flow received\n"
- "%s"
- " pre: %s\n"
- "post: %s",
- tnl_str, pre_flow_str, post_flow_str);
+ VLOG_DBG("tunnel port %s receive from flow %s", tnl_str, flow_str);
free(tnl_str);
- free(pre_flow_str);
- free(post_flow_str);
+ free(flow_str);
}
out: