]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'bridge-FDB-Notify-about-removal-of-non-user-added-entries'
authorDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2018 17:46:48 +0000 (13:46 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2018 17:46:48 +0000 (13:46 -0400)
commita6a3009ba00da18dff2206c1acb6ee30af81b645
treee502263bda06c2ca20ae238414773447c015ef93
parentc0dcac405acc81f016f7b5b12ea8df1ea5dacf95
parent5973cfd6835ba6c447323096bfb89d17b9801a12
Merge branch 'bridge-FDB-Notify-about-removal-of-non-user-added-entries'

Petr Machata says:

====================
bridge: FDB: Notify about removal of non-user-added entries

Device drivers may generally need to keep in sync with bridge's FDB. In
particular, for its offload of tc mirror action where the mirrored-to
device is a gretap device, mlxsw needs to listen to a number of events,
FDB events among the others. SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE would be
a natural notification in that case.

However, for removal of FDB entries added due to device activity (as
opposed to explicit addition through "bridge fdb add" or similar), there
are no notifications.

Thus in patch #1, add the "added_by_user" field to switchdev
notifications sent for FDB activity. Adapt drivers to ignore activity on
non-user-added entries, to maintain the current behavior. Specifically
in case of mlxsw, allow mlxsw_sp_span_respin() call for any and all FDB
updates.

In patch #2, change the bridge driver to actually emit notifications for
these FDB entries. Take care not to send notification for bridge
updates that itself originate in SWITCHDEV_FDB_*_TO_BRIDGE events.

Changes from v1 to v2:
- Instead of introducing a new variant of fdb_delete(), add a new
  parameter to the existing function.
- Name the parameter swdev_notify, not notify.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>