netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] bridge: Adjust min age inc for HZ > 256
@ 2012-03-01 18:12 Joakim Tjernlund
  2012-03-01 18:12 ` [PATCH 2/2] bridge: message age needs to increase, not decrease Joakim Tjernlund
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Joakim Tjernlund @ 2012-03-01 18:12 UTC (permalink / raw)
  To: netdev; +Cc: Joakim Tjernlund

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>
---

The bridge list seems very slow so try netdev instead.

 net/bridge/br_stp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
index a04eeb6..9a8aebd 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
@@ -17,9 +17,9 @@
 #include "br_private_stp.h"
 
 /* since time values in bpdu are in jiffies and then scaled (1/256)
- * before sending, make sure that is at least one.
+ * before sending, make sure that is at least one STP tick.
  */
-#define MESSAGE_AGE_INCR	((HZ < 256) ? 1 : (HZ/256))
+#define MESSAGE_AGE_INCR	((HZ / 256) + 1)
 
 static const char *const br_port_state_names[] = {
 	[BR_STATE_DISABLED] = "disabled",
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-03-05 21:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 18:12 [PATCH 1/2] bridge: Adjust min age inc for HZ > 256 Joakim Tjernlund
2012-03-01 18:12 ` [PATCH 2/2] bridge: message age needs to increase, not decrease Joakim Tjernlund
2012-03-05  2:57   ` David Miller
2012-03-05  2:57 ` [PATCH 1/2] bridge: Adjust min age inc for HZ > 256 David Miller
2012-03-05  5:03 ` Stephen Hemminger
2012-03-05  5:09   ` David Miller
2012-03-05  8:14     ` Joakim Tjernlund
2012-03-05  8:24       ` David Miller
2012-03-05  8:47         ` Joakim Tjernlund
2012-03-05 21:30           ` Stephen Hemminger
2012-03-05  8:09   ` Joakim Tjernlund
2012-03-05 10:15   ` Vitalii Demianets

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).