OSDN Git Service

mlxsw: Respin SPAN on switchdev events
authorPetr Machata <petrm@mellanox.com>
Sun, 29 Apr 2018 07:56:12 +0000 (10:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Apr 2018 16:42:40 +0000 (12:42 -0400)
commitc520bc6986472621469f9dc1cec1a5dbbb4769bf
tree38d6215b18b829d0fa9370ce60121cb488299955
parentcda880de939ed81dbd310e2d6784451609fc5913
mlxsw: Respin SPAN on switchdev events

Changes to switchdev artifact can make a SPAN entry offloadable or
unoffloadable. To that end:

- Listen to SWITCHDEV_FDB_*_TO_BRIDGE notifications in addition to
  the *_TO_DEVICE ones, to catch whatever activity is sent to the
  bridge (likely by mlxsw itself).

  On each FDB notification, respin SPAN to reconcile it with the FDB
  changes.

- Also respin on switchdev port attribute changes (which currently
  covers changes to STP state of ports) and port object additions and
  removals.

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