Sat, Dec 12, 2020 at 06:25:02PM CET, [email protected] wrote:
>On Fri, Dec 11, 2020 at 08:24:27PM -0800, Jakub Kicinski wrote:
>> 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:
>
>Thanks
>
>Jiri, looks like this fix is needed:
Okay, will send you fixed version. Thx.
>
>diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c
>b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c
>index b680c22eff7d..d213af723a2a 100644
>--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c
>+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router_xm.c
>@@ -358,7 +358,7 @@ mlxsw_sp_router_xm_cache_flush_node_destroy(struct
>mlxsw_sp *mlxsw_sp,
>
> static u32 mlxsw_sp_router_xm_flush_mask4(u8 prefix_len)
> {
>- return GENMASK(32, 32 - prefix_len);
>+ return GENMASK(31, 32 - prefix_len);
> }
>
> static unsigned char *mlxsw_sp_router_xm_flush_mask6(u8 prefix_len)
>
>>
>> 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);
>> | ^~~~~~~