The spanning tree library keeps track of time to know how often it
should update its state and send out BPDUs. OVS is able to track time
in milliseconds, but STP uses a coarser-grained count (256 ticks per
second). To prevent losing milliseconds that didn't account for an
entire tick, the library keeps track of these remaining milliseconds. A
bug miscalculated the remainder and made it too high, which caused the
library to think time was passing more quickly than it was.
This bug wasn't noticeable on a quiet system, since STP only asks to be
woken every second. However, a system with a lot of activity would wake
OVS more frequently and have it call the subsystems' "run" functions.
Bug #8283
---
lib/stp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/stp.c b/lib/stp.c
index 62c2ea8..bc50830 100644
--- a/lib/stp.c
+++ b/lib/stp.c
@@ -1258,7 +1258,7 @@ ms_to_timer(int ms)
static int
ms_to_timer_remainder(int ms)
{
- return ms * 0x100 % 1000;
+ return (ms * 0x100 % 1000) / 0x100;
}
/* Returns the number of whole milliseconds in 'timer' STP timer ticks. There
--
1.7.1
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev