netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] bridge: FDB: Notify about removal of non-user-added entries
@ 2018-05-01 17:04 Petr Machata
  2018-05-01 17:04 ` [PATCH net-next 1/2] switchdev: Add fdb.added_by_user to switchdev notifications Petr Machata
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Petr Machata @ 2018-05-01 17:04 UTC (permalink / raw)
  To: netdev; +Cc: ivecera, davem, stephen, andrew, vivien.didelot, f.fainelli, jiri

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.
SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE would be a natural notification to
listen to in order to keep up with FDB updates.

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.

Petr Machata (2):
  switchdev: Add fdb.added_by_user to switchdev notifications
  net: bridge: Notify about !added_by_user FDB entries

 .../ethernet/mellanox/mlxsw/spectrum_switchdev.c   |  4 +++
 drivers/net/ethernet/rocker/rocker_main.c          |  2 ++
 include/net/switchdev.h                            |  1 +
 net/bridge/br.c                                    |  4 +--
 net/bridge/br_fdb.c                                | 40 +++++++++++++++-------
 net/bridge/br_private.h                            |  4 +--
 net/bridge/br_switchdev.c                          | 12 ++++---
 net/dsa/slave.c                                    |  5 ++-
 8 files changed, 50 insertions(+), 22 deletions(-)

-- 
2.4.11

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-01 22:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-01 17:04 [PATCH net-next 0/2] bridge: FDB: Notify about removal of non-user-added entries Petr Machata
2018-05-01 17:04 ` [PATCH net-next 1/2] switchdev: Add fdb.added_by_user to switchdev notifications Petr Machata
2018-05-01 17:49   ` Nikolay Aleksandrov
2018-05-01 17:04 ` [PATCH net-next 2/2] net: bridge: Notify about !added_by_user FDB entries Petr Machata
2018-05-01 17:49   ` Nikolay Aleksandrov
2018-05-01 22:33     ` Petr Machata
2018-05-01 17:54 ` [PATCH net-next 0/2] bridge: FDB: Notify about removal of non-user-added entries Andrew Lunn
2018-05-01 22:27   ` Petr Machata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).