]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Correctly dump neighbour activity
authorArkadi Sharshevsky <arkadis@mellanox.com>
Fri, 11 Nov 2016 15:34:26 +0000 (16:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Nov 2016 17:51:00 +0000 (12:51 -0500)
commit2fb6bda9d91484bb0aa5fb40a1f643a0b9a8172c
tree3574728ce3bf65ab262de17abd6cc03e6dd1cd4a
parent4cdd2d2fababc8a8d92ca9f8bfb8ef7661cca7c5
mlxsw: spectrum_router: Correctly dump neighbour activity

The device's neighbour table is periodically dumped in order to update
the kernel about active neighbours. A single dump session may span
multiple queries, until the response carries less records than requested
or when a record (can contain up to four neighbour entries) is not full.
Current code stops the session when the number of returned records is
zero, which can result in infinite loop in case of high packet rate.

Fix this by stopping the session according to the above logic.

Fixes: 842a6e37f8ac ("mlxsw: spectrum_router: Periodically update the kernel's neigh table")
Signed-off-by: Arkadi Sharshevsky <arkadis@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