From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Subject: Re: [PATCH net] nfp: use full 40 bits of the NSP buffer address
Date: Sun, 25 Mar 2018 07:28:06 -0700 [thread overview]
Message-ID: <20180325072806.05713b51@cakuba.netronome.com> (raw)
In-Reply-To: <20180324024222.20134-1-jakub.kicinski@netronome.com>
On Fri, 23 Mar 2018 19:42:22 -0700, Jakub Kicinski wrote:
> From: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
>
> The NSP default buffer is a piece of NFP memory where additional
> command data can be placed. Its format has been copied from
> host buffer, but the PCIe selection bits do not make sense in
> this case. If those get masked out from a NFP address - writes
> to random place in the chip memory may be issued and crash the
> device.
>
> This has never been an issue because the buffer used to be
> allocated in memory with less-than-38-bit-long address but that
> is about to change.
>
> Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> ---
> drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c
> index 39abac678b71..b54ab02f5b33 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c
> @@ -71,8 +71,7 @@
> /* CPP address to retrieve the data from */
> #define NSP_BUFFER 0x10
> #define NSP_BUFFER_CPP GENMASK_ULL(63, 40)
> -#define NSP_BUFFER_PCIE GENMASK_ULL(39, 38)
> -#define NSP_BUFFER_ADDRESS GENMASK_ULL(37, 0)
> +#define NSP_BUFFER_ADDRESS GENMASK_ULL(39, 0)
self-nack, this is changing a shared define for all bufs, adding a new
define of NFP buf will be cleaner.
next prev parent reply other threads:[~2018-03-25 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-24 2:42 [PATCH net] nfp: use full 40 bits of the NSP buffer address Jakub Kicinski
2018-03-25 14:28 ` Jakub Kicinski [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-04-04 0:24 Jakub Kicinski
2018-04-04 15:45 ` David Miller
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=20180325072806.05713b51@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=davem@davemloft.net \
--cc=dirk.vandermerwe@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
/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).