Skip to content

Commit

Permalink
ofproto: Rate-limit STP status errors on non-existent ports.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Justin Pettit <[email protected]>
  • Loading branch information
Justin Pettit committed May 2, 2012
1 parent f66b87d commit b0a5c43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ofproto/ofproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b0a5c43

Please sign in to comment.