switchdev: Add fdb.added_by_user to switchdev notifications
authorPetr Machata <petrm@mellanox.com>
Thu, 3 May 2018 12:43:46 +0000 (14:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 May 2018 17:46:47 +0000 (13:46 -0400)
commit816a3bed9549fcc0c90ba97c9077e64e734f0df6
treeeff4b54b648c8b9d7c79d1592a4a18c9a435906f
parent0e913f28ba56d29c65a95ac5d46f25c42f876db0
switchdev: Add fdb.added_by_user to switchdev notifications

The following patch enables sending notifications also for events on FDB
entries that weren't added by the user. Give the drivers the information
necessary to distinguish between the two origins of FDB entries.

To maintain the current behavior, have switchdev-implementing drivers
bail out on notifications about non-user-added FDB entries. In case of
mlxsw driver, allow a call to mlxsw_sp_span_respin() so that SPAN over
bridge catches up with the changed FDB.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
drivers/net/ethernet/rocker/rocker_main.c
include/net/switchdev.h
net/bridge/br_switchdev.c
net/dsa/slave.c