]> 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)
commita29a246393fd663383a379a6eda5745f02c343a3
tree315e2a32006d97bca6f0e0b4b81c9d708b5629ca
parentce32ee2174ba07922e8b67593c8f5b9e4fd2b9f5
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