Thanks Yifeng (and Ansis, off-list). I applied this to master.
On Thu, Dec 28, 2017 at 02:30:33PM -0800, Yifeng Sun wrote: > Looks good, thanks for the change. > > Reviewed-by: Yifeng Sun <[email protected]> > > On Thu, Dec 28, 2017 at 12:34 PM, Ben Pfaff <[email protected]> wrote: > > > flow_to_string() is relatively expensive. It is better to avoid it if the > > string is not actually going to be used. > > > > Signed-off-by: Ben Pfaff <[email protected]> > > --- > > ofproto/tunnel.c | 9 +++++---- > > 1 file changed, 5 insertions(+), 4 deletions(-) > > > > diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c > > index 1676f4d46fdf..9896d715a6f7 100644 > > --- a/ofproto/tunnel.c > > +++ b/ofproto/tunnel.c > > @@ -309,10 +309,11 @@ tnl_port_receive(const struct flow *flow) > > OVS_EXCLUDED(rwlock) > > tnl_port = tnl_find(flow); > > ofport = tnl_port ? tnl_port->ofport : NULL; > > if (!tnl_port) { > > - char *flow_str = flow_to_string(flow, NULL); > > - > > - VLOG_WARN_RL(&rl, "receive tunnel port not found (%s)", flow_str); > > - free(flow_str); > > + if (!VLOG_DROP_WARN(&rl)) { > > + char *flow_str = flow_to_string(flow, NULL); > > + VLOG_WARN("receive tunnel port not found (%s)", flow_str); > > + free(flow_str); > > + } > > goto out; > > } > > > > -- > > 2.10.2 > > > > _______________________________________________ > > dev mailing list > > [email protected] > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
