From: Ido Schimmel <idosch@idosch.org>
To: Jakub Kicinski <kuba@kernel.org>, jiri@nvidia.com
Cc: netdev@vger.kernel.org, davem@davemloft.net, mlxsw@nvidia.com,
Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH net-next 13/15] mlxsw: spectrum_router_xm: Introduce basic XM cache flushing
Date: Sat, 12 Dec 2020 19:25:02 +0200 [thread overview]
Message-ID: <20201212172502.GA2431723@shredder.lan> (raw)
In-Reply-To: <20201211202427.5871de8a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
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@nvidia.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@nvidia.com>
> > Signed-off-by: Ido Schimmel <idosch@nvidia.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);
> | ^~~~~~~
next prev parent reply other threads:[~2020-12-12 17:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 17:03 [PATCH net-next 00/15] mlxsw: Introduce initial XM router support Ido Schimmel
2020-12-11 17:03 ` [PATCH net-next 01/15] mlxsw: reg: Add XM Direct Register Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 02/15] mlxsw: reg: Add Router XLT Enable Register Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 03/15] mlxsw: spectrum_router: Introduce XM implementation of router low-level ops Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 04/15] mlxsw: pci: Obtain info about ports used by eXtended mezanine Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 05/15] mlxsw: Ignore ports that are connected to " Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 06/15] mlxsw: reg: Add Router XLT M select Register Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 07/15] mlxsw: reg: Add XM Lookup Table Query Register Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 08/15] mlxsw: spectrum_router: Introduce per-ASIC XM initialization Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 09/15] mlxsw: reg: Add XM Router M Table Register Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 10/15] mlxsw: spectrum_router_xm: Implement L-value tracking for M-index Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 11/15] mlxsw: reg: Add Router LPM Cache ML Delete Register Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 12/15] mlxsw: reg: Add Router LPM Cache Enable Register Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 13/15] mlxsw: spectrum_router_xm: Introduce basic XM cache flushing Ido Schimmel
2020-12-12 4:24 ` Jakub Kicinski
2020-12-12 17:25 ` Ido Schimmel [this message]
2020-12-14 7:59 ` Jiri Pirko
2020-12-11 17:04 ` [PATCH net-next 14/15] mlxsw: spectrum: Set KVH XLT cache mode for Spectrum2/3 Ido Schimmel
2020-12-11 17:04 ` [PATCH net-next 15/15] mlxsw: spectrum_router: Use eXtended mezzanine to offload IPv4 router Ido Schimmel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201212172502.GA2431723@shredder.lan \
--to=idosch@idosch.org \
--cc=davem@davemloft.net \
--cc=idosch@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).