On Fri, 11 Dec 2020 19:04:11 +0200 Ido Schimmel wrote:
> From: Jiri Pirko <[email protected]>
>
> 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.
>
> Signed-off-by: Jiri Pirko <[email protected]>
> Signed-off-by: Ido Schimmel <[email protected]>
32 bit does not like this patch:
In file included from ../include/linux/bitops.h:5,
from ../include/linux/kernel.h:12,
from
../drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c:4:
../drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c: In function
‘mlxsw_sp_router_xm_flush_mask4’:
../include/linux/bits.h:36:11: warning: right shift count is negative
[-Wshift-count-negative]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
../include/linux/bits.h:38:31: note: in expansion of macro ‘__GENMASK’
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
../drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c:361:9: note: in
expansion of macro ‘GENMASK’
361 | return GENMASK(32, 32 - prefix_len);
| ^~~~~~~
../drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c:361:16: warning:
shift count is negative (-1)
In file included from ../include/linux/bitops.h:5,
from ../include/linux/kernel.h:12,
from
../drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c:4:
../drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c: In function
‘mlxsw_sp_router_xm_flush_mask4’:
../include/linux/bits.h:36:11: warning: right shift count is negative
[-Wshift-count-negative]
36 | (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
../include/linux/bits.h:38:31: note: in expansion of macro ‘__GENMASK’
38 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
../drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c:361:9: note: in
expansion of macro ‘GENMASK’
361 | return GENMASK(32, 32 - prefix_len);
| ^~~~~~~