]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Edit RIF properties based on netdev events
authorIdo Schimmel <idosch@mellanox.com>
Mon, 4 Jul 2016 06:23:13 +0000 (08:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2016 01:25:15 +0000 (18:25 -0700)
commitdd737eb8b3807686bf72b1a762338333f6335e30
tree1d012e51c6d806f2907ad1249f028126bdb1cd52
parent3179063addcd49a4b54327cf6e3e542d875e8b84
mlxsw: spectrum: Edit RIF properties based on netdev events

We are just about to introduce router interfaces (RIFs), but before that
we need to be able update the device with the correct RIF attributes
whenever they change for the netdev the RIF is backing. Two such
attributes are MTU and MAC.

The MAC is used both to set the source MAC of packets egressing from the
RIF and also to program an FDB rule that will direct packets to the
router block.

Use the existing netdevice notification block and respond to CHANGEADDR
and CHANGEMTU accordingly. Store both attributes in the RIF struct
in case we need to revert to old attributes following a failed update.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c