From: Justin Pettit Date: Wed, 2 May 2012 17:20:07 +0000 (-0700) Subject: ofproto: Rate-limit STP status errors on non-existent ports. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0a5c43bd76c248408326f51823e67dcd87d0994;p=openvswitch ofproto: Rate-limit STP status errors on non-existent ports. As part of the bridge's main loop, it queries the STP status of all ports. If the port doesn't exist, log files can become filled with warning messages. This situation is very unusual, since system devices do not normally disappear, but it's easy enough to rate-limit these messages. Bug #10936 Reported-by: Reid Price Signed-off-by: Justin Pettit --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index cb46d26d..6ef2a5d7 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -664,8 +664,8 @@ ofproto_port_get_stp_status(struct ofproto *ofproto, uint16_t ofp_port, { struct ofport *ofport = ofproto_get_port(ofproto, ofp_port); if (!ofport) { - VLOG_WARN("%s: cannot get STP status on nonexistent port %"PRIu16, - ofproto->name, ofp_port); + VLOG_WARN_RL(&rl, "%s: cannot get STP status on nonexistent " + "port %"PRIu16, ofproto->name, ofp_port); return ENODEV; }