]> 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)
commit9e3c3bb63186901e9399ede9e873e4543d4646e8
tree3574728ce3bf65ab262de17abd6cc03e6dd1cd4a
parent9f71144523676eb53c90e03b105281b5a1ea4f62
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: ed600de5ed3c ("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