diff options
author | Ido Schimmel <idosch@mellanox.com> | 2016-01-10 09:32:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-11 00:21:19 -0500 |
commit | 366ce60315292a579b8ceae2777102e1954a2024 (patch) | |
tree | 2429a281a92e136cb22f4444f8d08ffdb49f19c8 /net | |
parent | 712f4aad406bb1ed67f3f98d04c044191f0ff593 (diff) | |
download | linux-366ce60315292a579b8ceae2777102e1954a2024.tar.bz2 |
mlxsw: spectrum: Add FDB lock to prevent session interleaving
Dumping the FDB (invoked with a process context) or handling FDB
notifications (polled periodicly in delayed work) might each entail
multiple EMAD transcations due to the number of entries.
While we only allow one EMAD transaction at a time, there is nothing
stopping the dump and notification processing sessions from
interleaving. However, this is forbidden by the hardware, so we need to
make sure only one of these sessions can run at a time.
Solve this by adding a mutex ('fdb_lock'), as both kernel threads can
sleep while waiting for the response EMAD.
Fixes: 56ade8fe3f ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions