<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/bridge/br_stp_timer.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-05-30T18:26:32+00:00</updated>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152</title>
<updated>2019-05-30T18:26:32+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2874c5fd284268364ece81a7bd936f3c8168e567'/>
<id>urn:sha1:2874c5fd284268364ece81a7bd936f3c8168e567</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: bridge: Convert timers to use timer_setup()</title>
<updated>2017-11-03T06:42:49+00:00</updated>
<author>
<name>Allen Pais</name>
<email>allen.pais@oracle.com</email>
</author>
<published>2017-11-03T06:21:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a3deb11d66ec4509462bbe9f162fc4bb991b061'/>
<id>urn:sha1:1a3deb11d66ec4509462bbe9f162fc4bb991b061</id>
<content type='text'>
switch to using the new timer_setup() and from_timer() api's.

Signed-off-by: Allen Pais &lt;allen.pais@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: add notifications for the bridge dev on vlan change</title>
<updated>2017-11-02T06:53:40+00:00</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@cumulusnetworks.com</email>
</author>
<published>2017-11-01T10:18:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=928990631327cf00a9195e30fa22f7ae5f8d7e67'/>
<id>urn:sha1:928990631327cf00a9195e30fa22f7ae5f8d7e67</id>
<content type='text'>
Currently the bridge device doesn't generate any notifications upon vlan
modifications on itself because it doesn't use the generic bridge
notifications.
With the recent changes we know if anything was modified in the vlan config
thus we can generate a notification when necessary for the bridge device
so add support to br_ifinfo_notify() similar to how other combined
functions are done - if port is present it takes precedence, otherwise
notify about the bridge. I've explicitly marked the locations where the
notification should be always for the port by setting bridge to NULL.
I've also taken the liberty to rearrange each modified function's local
variables in reverse xmas tree as well.

Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: start hello_timer when enabling KERNEL_STP in br_stp_start</title>
<updated>2017-05-21T17:33:28+00:00</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2017-05-19T14:20:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d18c732b95c0a9d35e9f978b4438bba15412284'/>
<id>urn:sha1:6d18c732b95c0a9d35e9f978b4438bba15412284</id>
<content type='text'>
Since commit 76b91c32dd86 ("bridge: stp: when using userspace stp stop
kernel hello and hold timers"), bridge would not start hello_timer if
stp_enabled is not KERNEL_STP when br_dev_open.

The problem is even if users set stp_enabled with KERNEL_STP later,
the timer will still not be started. It causes that KERNEL_STP can
not really work. Users have to re-ifup the bridge to avoid this.

This patch is to fix it by starting br-&gt;hello_timer when enabling
KERNEL_STP in br_stp_start.

As an improvement, it's also to start hello_timer again only when
br-&gt;stp_enabled is KERNEL_STP in br_hello_timer_expired, there is
no reason to start the timer again when it's NO_STP.

Fixes: 76b91c32dd86 ("bridge: stp: when using userspace stp stop kernel hello and hold timers")
Reported-by: Haidong Li &lt;haili@redhat.com&gt;
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Reviewed-by: Ivan Vecera &lt;cera@cera.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: move to workqueue gc</title>
<updated>2017-02-07T03:53:13+00:00</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@cumulusnetworks.com</email>
</author>
<published>2017-02-04T17:05:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f7cdee8a79a1cb03fa9ca71b825e72f880b344e1'/>
<id>urn:sha1:f7cdee8a79a1cb03fa9ca71b825e72f880b344e1</id>
<content type='text'>
Move the fdb garbage collector to a workqueue which fires at least 10
milliseconds apart and cleans chain by chain allowing for other tasks
to run in the meantime. When having thousands of fdbs the system is much
more responsive. Most importantly remove the need to check if the
matched entry has expired in __br_fdb_get that causes false-sharing and
is completely unnecessary if we cleanup entries, at worst we'll get 10ms
of traffic for that entry before it gets deleted.

Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: add helper to set topology change</title>
<updated>2016-12-11T02:27:23+00:00</updated>
<author>
<name>Vivien Didelot</name>
<email>vivien.didelot@savoirfairelinux.com</email>
</author>
<published>2016-12-10T18:44:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8384b5f5b293389a42cc65bfca2d767d15809aa1'/>
<id>urn:sha1:8384b5f5b293389a42cc65bfca2d767d15809aa1</id>
<content type='text'>
Add a __br_set_topology_change helper to set the topology change value.

This can be later extended to add actions when the topology change flag
is set or cleared.

Signed-off-by: Vivien Didelot &lt;vivien.didelot@savoirfairelinux.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: log port STP state on change</title>
<updated>2016-02-18T19:20:08+00:00</updated>
<author>
<name>Vivien Didelot</name>
<email>vivien.didelot@savoirfairelinux.com</email>
</author>
<published>2016-02-16T15:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c25b16dbbcf37ce8019bacf634ee47d852225d9'/>
<id>urn:sha1:7c25b16dbbcf37ce8019bacf634ee47d852225d9</id>
<content type='text'>
Remove the shared br_log_state function and print the info directly in
br_set_state, where the net_bridge_port state is actually changed.

Signed-off-by: Vivien Didelot &lt;vivien.didelot@savoirfairelinux.com&gt;
Acked-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: stp: when using userspace stp stop kernel hello and hold timers</title>
<updated>2015-07-29T06:33:20+00:00</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>razor@blackwall.org</email>
</author>
<published>2015-07-23T18:01:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=76b91c32dd86f624b5df038dcb68cddd5a18d355'/>
<id>urn:sha1:76b91c32dd86f624b5df038dcb68cddd5a18d355</id>
<content type='text'>
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 &lt;sashok@cumulusnetworks.com&gt;
Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: fix lockdep splat</title>
<updated>2015-05-22T20:23:56+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2015-05-21T20:28:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=93a33a584e2a49a217118148125944fd02d47b54'/>
<id>urn:sha1:93a33a584e2a49a217118148125944fd02d47b54</id>
<content type='text'>
Following lockdep splat was reported :

[   29.382286] ===============================
[   29.382315] [ INFO: suspicious RCU usage. ]
[   29.382344] 4.1.0-0.rc0.git11.1.fc23.x86_64 #1 Not tainted
[   29.382380] -------------------------------
[   29.382409] net/bridge/br_private.h:626 suspicious
rcu_dereference_check() usage!
[   29.382455]
               other info that might help us debug this:

[   29.382507]
               rcu_scheduler_active = 1, debug_locks = 0
[   29.382549] 2 locks held by swapper/0/0:
[   29.382576]  #0:  (((&amp;p-&gt;forward_delay_timer))){+.-...}, at:
[&lt;ffffffff81139f75&gt;] call_timer_fn+0x5/0x4f0
[   29.382660]  #1:  (&amp;(&amp;br-&gt;lock)-&gt;rlock){+.-...}, at:
[&lt;ffffffffa0450dc1&gt;] br_forward_delay_timer_expired+0x31/0x140
[bridge]
[   29.382754]
               stack backtrace:
[   29.382787] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.1.0-0.rc0.git11.1.fc23.x86_64 #1
[   29.382838] Hardware name: LENOVO 422916G/LENOVO, BIOS A1KT53AUS 04/07/2015
[   29.382882]  0000000000000000 3ebfc20364115825 ffff880666603c48
ffffffff81892d4b
[   29.382943]  0000000000000000 ffffffff81e124e0 ffff880666603c78
ffffffff8110bcd7
[   29.383004]  ffff8800785c9d00 ffff88065485ac58 ffff880c62002800
ffff880c5fc88ac0
[   29.383065] Call Trace:
[   29.383084]  &lt;IRQ&gt;  [&lt;ffffffff81892d4b&gt;] dump_stack+0x4c/0x65
[   29.383130]  [&lt;ffffffff8110bcd7&gt;] lockdep_rcu_suspicious+0xe7/0x120
[   29.383178]  [&lt;ffffffffa04520f9&gt;] br_fill_ifinfo+0x4a9/0x6a0 [bridge]
[   29.383225]  [&lt;ffffffffa045266b&gt;] br_ifinfo_notify+0x11b/0x4b0 [bridge]
[   29.383271]  [&lt;ffffffffa0450d90&gt;] ? br_hold_timer_expired+0x70/0x70 [bridge]
[   29.383320]  [&lt;ffffffffa0450de8&gt;]
br_forward_delay_timer_expired+0x58/0x140 [bridge]
[   29.383371]  [&lt;ffffffffa0450d90&gt;] ? br_hold_timer_expired+0x70/0x70 [bridge]
[   29.383416]  [&lt;ffffffff8113a033&gt;] call_timer_fn+0xc3/0x4f0
[   29.383454]  [&lt;ffffffff81139f75&gt;] ? call_timer_fn+0x5/0x4f0
[   29.383493]  [&lt;ffffffff8110a90f&gt;] ? lock_release_holdtime.part.29+0xf/0x200
[   29.383541]  [&lt;ffffffffa0450d90&gt;] ? br_hold_timer_expired+0x70/0x70 [bridge]
[   29.383587]  [&lt;ffffffff8113a6a4&gt;] run_timer_softirq+0x244/0x490
[   29.383629]  [&lt;ffffffff810b68cc&gt;] __do_softirq+0xec/0x670
[   29.383666]  [&lt;ffffffff810b70d5&gt;] irq_exit+0x145/0x150
[   29.383703]  [&lt;ffffffff8189f506&gt;] smp_apic_timer_interrupt+0x46/0x60
[   29.383744]  [&lt;ffffffff8189d523&gt;] apic_timer_interrupt+0x73/0x80
[   29.383782]  &lt;EOI&gt;  [&lt;ffffffff816f131f&gt;] ? cpuidle_enter_state+0x5f/0x2f0
[   29.383832]  [&lt;ffffffff816f131b&gt;] ? cpuidle_enter_state+0x5b/0x2f0

Problem here is that br_forward_delay_timer_expired() is a timer
handler, calling br_ifinfo_notify() which assumes either rcu_read_lock()
or RTNL are held.

Simplest fix seems to add rcu read lock section.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Reported-by: Dominick Grift &lt;dac.override@gmail.com&gt;
Cc: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: bridge: add a br_set_state helper function</title>
<updated>2014-10-02T02:03:50+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2014-09-30T23:13:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=775dd692bd34f9201ed2aa775a0edcba4f973f3e'/>
<id>urn:sha1:775dd692bd34f9201ed2aa775a0edcba4f973f3e</id>
<content type='text'>
In preparation for being able to propagate port states to e.g: notifiers
or other kernel parts, do not manipulate the port state directly, but
instead use a helper function which will allow us to do a bit more than
just setting the state.

Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
