]> 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)
commite5df6bc04345d969efb4953daaf6ba0cde920c18
tree38dbf9f3c0ec116f3e03452ae74d9a16c82e3cbe
parent6b1813bb85dcea5e85d9a02cd13d4f91cac989b3
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