summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornickcooper-zhangtonghao <nic@opencloud.tech>2017-02-06 05:38:07 -0800
committerBen Pfaff <blp@ovn.org>2017-02-06 08:27:33 -0800
commit0ca7bf8a4f7de8dda81a32865aee87a1a4fde63d (patch)
treea9a462e906c6557eb7cd8faf4d828bd9e6215408
parentd5c2862a1f67e6f50fa0d99d02369c8332e00177 (diff)
downloadopenvswitch-0ca7bf8a4f7de8dda81a32865aee87a1a4fde63d.tar.gz
ofproto: Uses the VLOG_WARN_RL instead of VLOG_WARN.
There are a lot of logs when OvS bridges, connected to controllers, can't find the right routes. So we may use the VLOG_WARN_RL instead of VLOG_WARN to limit the log messages. The netdev-open and arp-lookingup are in the same case in this function. Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r--ofproto/in-band.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ofproto/in-band.c b/ofproto/in-band.c
index 4bb47c0b9..3d3675ed0 100644
--- a/ofproto/in-band.c
+++ b/ofproto/in-band.c
@@ -119,9 +119,11 @@ refresh_remote(struct in_band *ib, struct in_band_remote *r)
retval = netdev_get_next_hop(ib->local_netdev, &r->remote_addr.sin_addr,
&next_hop_inaddr, &next_hop_dev);
if (retval) {
- VLOG_WARN("%s: cannot find route for controller ("IP_FMT"): %s",
- ib->ofproto->name, IP_ARGS(r->remote_addr.sin_addr.s_addr),
- ovs_strerror(retval));
+ VLOG_WARN_RL(&rl, "%s: cannot find route for controller "
+ "("IP_FMT"): %s",
+ ib->ofproto->name,
+ IP_ARGS(r->remote_addr.sin_addr.s_addr),
+ ovs_strerror(retval));
return 1;
}
if (!next_hop_inaddr.s_addr) {