summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_stp_timer.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <razor@blackwall.org>2015-07-23 11:01:05 -0700
committerDavid S. Miller <davem@davemloft.net>2015-07-28 23:33:20 -0700
commit76b91c32dd86f624b5df038dcb68cddd5a18d355 (patch)
treecd59c7fc695b814aea9022c0636298023915fefc /net/bridge/br_stp_timer.c
parent158cd4af8dedbda0d612d448c724c715d0dda649 (diff)
downloadop-kernel-dev-76b91c32dd86f624b5df038dcb68cddd5a18d355.zip
op-kernel-dev-76b91c32dd86f624b5df038dcb68cddd5a18d355.tar.gz
bridge: stp: when using userspace stp stop kernel hello and hold timers
These should be handled only by the respective STP which is in control. They become problematic for devices with limited resources with many ports because the hold_timer is per port and fires each second and the hello timer fires each 2 seconds even though it's global. While in user-space STP mode these timers are completely unnecessary so it's better to keep them off. Also ensure that when the bridge is up these timers are started only when running with kernel STP. Signed-off-by: Satish Ashok <sashok@cumulusnetworks.com> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp_timer.c')
-rw-r--r--net/bridge/br_stp_timer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c
index 7caf7fa..5f0f5af 100644
--- a/net/bridge/br_stp_timer.c
+++ b/net/bridge/br_stp_timer.c
@@ -40,7 +40,9 @@ static void br_hello_timer_expired(unsigned long arg)
if (br->dev->flags & IFF_UP) {
br_config_bpdu_generation(br);
- mod_timer(&br->hello_timer, round_jiffies(jiffies + br->hello_time));
+ if (br->stp_enabled != BR_USER_STP)
+ mod_timer(&br->hello_timer,
+ round_jiffies(jiffies + br->hello_time));
}
spin_unlock(&br->lock);
}
OpenPOWER on IntegriCloud