Message ID | 1486388287-21708-1-git-send-email-nic@opencloud.tech |
---|---|
State | Accepted |
Headers | show |
On Mon, Feb 06, 2017 at 05:38:07AM -0800, nickcooper-zhangtonghao wrote: > 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> Thanks, I applied this to master, branch-2.6, and branch-2.7.
diff --git a/ofproto/in-band.c b/ofproto/in-band.c index 4bb47c0..3d3675e 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) {
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> --- ofproto/in-band.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)