]> 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)
commit5578e9b6f8b577e36905d55a5d615e76ed0b5c1c
treefc5df7e6d823242911b31989054f3992dc26c5ba
parent842a6e37f8aca21dc82ae31c08650513d8f18bee
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