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)
commitc1b290d594a12b4ed3b7386947162d5a061900b2
tree38dbf9f3c0ec116f3e03452ae74d9a16c82e3cbe
parentd57ff022866660a66bcb6b10f1f114fd5521c3df
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