]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Offload neighbours based on NUD state change
authorYotam Gigi <yotamg@mellanox.com>
Tue, 5 Jul 2016 09:27:44 +0000 (11:27 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2016 16:06:29 +0000 (09:06 -0700)
commit89b33e4416d58aa85c80187dcd429a3fc11622b8
treefc5df7e6d823242911b31989054f3992dc26c5ba
parented600de5ed3cae6c4b6a2b5dd631ec680833884b
mlxsw: spectrum_router: Offload neighbours based on NUD state change

Listen to any NEIGH_UPDATE events sent and program the device
accordingly. If NUD state is VALID and neighbour isn't yet offloaded,
then program it into the device's table. Otherwise, just edit its
parameters.

If NUD state machine transitioned neighbour out of VALID state and it's
present in the device's table, then remove it.

Note that the device is programmed in delayed work, as the netevent
notification chain is atomic and prevents us from going to sleep.

Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
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_router.c