mlxsw: spectrum_router: Optimize processing of VRRP MACs
authorIdo Schimmel <idosch@mellanox.com>
Sat, 14 Jul 2018 08:39:54 +0000 (11:39 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Jul 2018 18:23:26 +0000 (11:23 -0700)
commitc3a495409adeb677fa8b53f4cfe37cf9cfb7c751
tree6433b6c8589d2210b4304651e37c701b1426f51d
parent11566d34f8952a780d86e8a6e734006ed035aa6b
mlxsw: spectrum_router: Optimize processing of VRRP MACs

Hosts using a VRRP router send their packets with a destination MAC of
the VRRP router which is of the following form [1]:

IPv4 - 00-00-5E-00-01-{VRID}
IPv6 - 00-00-5E-00-02-{VRID}

Where VRID is the ID of the virtual router. Such packets are directed to
the router block in the ASIC by an FDB entry that was added in the
previous patch.

However, in certain cases it is possible to skip this FDB lookup and
send such packets directly to the router. This is accomplished by adding
these special MAC addresses to the RIF cache. If the cache is hit, the
packet will skip the L2 lookup and ingress the router with the RIF
specified in the cache entry.

1. https://tools.ietf.org/html/rfc5798#section-7.3

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/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c