lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 12 Dec 2020 19:25:02 +0200
From:   Ido Schimmel <idosch@...sch.org>
To:     Jakub Kicinski <kuba@...nel.org>, jiri@...dia.com
Cc:     netdev@...r.kernel.org, davem@...emloft.net, mlxsw@...dia.com,
        Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next 13/15] mlxsw: spectrum_router_xm: Introduce
 basic XM cache flushing

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 <jiri@...dia.com>
> > 
> > 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 <jiri@...dia.com>
> > Signed-off-by: Ido Schimmel <idosch@...dia.com>
> 
> 32 bit does not like this patch:

Thanks

Jiri, looks like this fix is needed:

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);
>       |         ^~~~~~~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ