mlxsw: spectrum_router: Add private neigh table
authorJiri Pirko <jiri@mellanox.com>
Tue, 5 Jul 2016 09:27:39 +0000 (11:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2016 16:06:28 +0000 (09:06 -0700)
commit6cf3c971dc84cb36579515ddb488919b9e9fb6de
treea222cda7bcb7e83cea3606a1bc0cb56c60d9e711
parent18bfb924f0005a728caadd90ba755b2a660bf441
mlxsw: spectrum_router: Add private neigh table

We need to hold some private data for every neigh entry. It would be
possible to do it using neigh_priv_len/ndo_neigh_construct/
ndo_neigh_destroy however only for the port device itself. That would not
work for stacked devices like bridge/team/bond. So introduce a private
neigh table. Hook onto ndos neigh_construct/destroy and add/remove
table entry according to that.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@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