aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2012-03-01 03:12:18 -0500
committerDavid S. Miller <davem@davemloft.net>2012-03-04 21:57:39 -0500
commitaaca735f4f188641c4786af8f20ed39fcce3809c (patch)
treed00d17d74a3eb0b657e0af774bfbcfd156972181 /net
parentc0638c247f559e1a16ee79e54df14bca2cb679ea (diff)
bridge: Adjust min age inc for HZ > 256
min age increment needs to round up its min age tick for all HZ values to guarantee message age is increasing. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_stp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
index dd147d78a588..c9ef3db737d9 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
@@ -17,9 +17,9 @@
17#include "br_private_stp.h" 17#include "br_private_stp.h"
18 18
19/* since time values in bpdu are in jiffies and then scaled (1/256) 19/* since time values in bpdu are in jiffies and then scaled (1/256)
20 * before sending, make sure that is at least one. 20 * before sending, make sure that is at least one STP tick.
21 */ 21 */
22#define MESSAGE_AGE_INCR ((HZ < 256) ? 1 : (HZ/256)) 22#define MESSAGE_AGE_INCR ((HZ / 256) + 1)
23 23
24static const char *const br_port_state_names[] = { 24static const char *const br_port_state_names[] = {
25 [BR_STATE_DISABLED] = "disabled", 25 [BR_STATE_DISABLED] = "disabled",