]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_mr: Protect multicast table list with a lock
authorIdo Schimmel <idosch@mellanox.com>
Fri, 21 Feb 2020 17:54:05 +0000 (19:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Feb 2020 05:24:51 +0000 (21:24 -0800)
commit0c16ce384dab972abd0ffbf9b05a45d6d5639770
treee426275bf5bd9b2e1f5f921e7ddc9e1b97428f0f
parenta7db5ece9bc1b57f94f3e5507114209f02edc274
mlxsw: spectrum_mr: Protect multicast table list with a lock

The multicast table list is traversed from a delayed work that
periodically updates the kernel about packets and bytes statistics from
each multicast route.

The list is currently protected by RTNL, but subsequent patches will
remove the driver's dependence on this contended lock.

In order to be able to remove dependence on RTNL in the next patch,
guard this list with a dedicated mutex.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c