mlxsw: spectrum_router_xm: Introduce basic XM cache flushing
authorJiri Pirko <jiri@nvidia.com>
Mon, 14 Dec 2020 11:30:39 +0000 (13:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Dec 2020 03:09:55 +0000 (19:09 -0800)
commit2dfad87a24de41a2d4b3d02e373cf101fa932296
treec86144ce12e341f6a625a13fa00862f4c2818b77
parent069254662b657bd602fc9fe97efa4ebc3151df46
mlxsw: spectrum_router_xm: Introduce basic XM cache flushing

Upon route insertion and removal, it is needed to flush possibly cached
entries from the XM cache. Extend XM op context to carry information
needed for the flush. Implement the flush in delayed work since for HW
design reasons there is a need to wait 50usec before the flush can be
done. If during this time comes the same flush request, consolidate it
to the first one. Implement this queued flushes by a hashtable.

v2:
* Fix GENMASK() high bit

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_xm.c