]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Add router interface struct
authorIdo Schimmel <idosch@mellanox.com>
Sat, 2 Jul 2016 09:00:16 +0000 (11:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Jul 2016 19:21:17 +0000 (15:21 -0400)
commit8b20945800a1c184c4e4395d51beb5d1584a700a
tree883e715191491c946ae7069ab16eafd1f38c57c0
parent017aa14a05571d2aa049b374bbe5705756eb6aae
mlxsw: spectrum: Add router interface struct

When enabling the router in the device we will represent L3 netdevs
using router interfaces (RIFs). These will be specified whenever
programming routes or neighbours on the netdev.

Introduce the basic RIF infrastructure which allows one to lookup a RIF
by its netdev. Later patches in the series will extend this, but the
basic routines are needed now in order to direct traffic to CPU.

Pointers to the RIF structs are stored in an array indexed by the RIF's
number. This will allow us to efficiently update the kernel's neighbour
table when regularly dumping the device's table.

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