]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Introduce FIB event queue instead of separate works
authorJiri Pirko <jiri@nvidia.com>
Tue, 10 Nov 2020 09:48:48 +0000 (11:48 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 23:55:19 +0000 (15:55 -0800)
commitcc418eaf3ba0ef71a213606d0bb9191a779222e9
tree38dbf9f3c0ec116f3e03452ae74d9a16c82e3cbe
parented6bedbfad0e0fe6d7926c4be97d9ed3dc1a7d32
mlxsw: spectrum_router: Introduce FIB event queue instead of separate works

Currently, every FIB event is queued-up as a separate work to be
processed. However, that allows to process only one FIB entry per work
callback.

In preparation of future XMDR register bulking of multiple FIB entries,
convert to FIB event queue. Implement this by a list_head, adding new
events to the end of the list in the FIB notify callback. That allows to
process multiple events from the list inside the work callback.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h