]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_switchdev: Only query FDB notifications when necessary
authorIdo Schimmel <idosch@nvidia.com>
Wed, 4 May 2022 06:29:08 +0000 (09:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 May 2022 10:21:33 +0000 (11:21 +0100)
commitef73c1efda213f48789457d283547391fb5b337e
tree315e2a32006d97bca6f0e0b4b81c9d708b5629ca
parentdb09b23c33c03af914bc822b4774924083252d43
mlxsw: spectrum_switchdev: Only query FDB notifications when necessary

The driver periodically queries the device for FDB notifications (e.g.,
learned, aged-out) in order to update the bridge driver. These
notifications can only be generated when bridges are offloaded to the
device.

Avoid unnecessary queries by starting to query upon installation of the
first bridge and stop querying upon removal of the last bridge.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c