]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Direct macvlans' MACs to router
authorIdo Schimmel <idosch@mellanox.com>
Sat, 14 Jul 2018 08:39:52 +0000 (11:39 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Jul 2018 18:23:26 +0000 (11:23 -0700)
commit8ab88b6ac4765e301d9cce2e7ff2bc0c599b64c8
tree5b2ab47261fb163d6664e28ec63ec0c5393eb10b
parent4b0dd888b9288231082870f00a4212d523d9f889
mlxsw: spectrum_router: Direct macvlans' MACs to router

An IP packet received on a netdev with a macvlan upper whose MAC matches
the packet's destination MAC will be re-injected to the Rx path as if it
was received by the macvlan, and perform an L3 lookup.

Reflect this functionality to the ASIC by programming FDB entries that
will direct MACs of macvlan uppers to the router.

In a similar fashion to router interfaces (RIFs) that are programmed
upon the addition of the first IP address on an interface and destroyed
upon the removal of the last IP address, the FDB entries for the macvlan
are added and destroyed based on the addition of the first and removal
of the last IP address on the macvlan.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@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_router.c