From: Jon Mason <jdmason@kudzu.us>
To: "Mehta, Sanju" <Sanju.Mehta@amd.com>
Cc: "dave.jiang@intel.com" <dave.jiang@intel.com>,
"allenbh@gmail.com" <allenbh@gmail.com>,
"linux-ntb@googlegroups.com" <linux-ntb@googlegroups.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"S-k, Shyam-sundar" <Shyam-sundar.S-k@amd.com>
Subject: Re: [PATCH] point to right memory window index
Date: Tue, 10 Sep 2019 17:42:12 +0100 [thread overview]
Message-ID: <CAPoiz9wqa4zhhitBeu8XDvOckhVWpEviPdk=UTCh-pLUvk9QvQ@mail.gmail.com> (raw)
In-Reply-To: <MN2PR12MB3455BFCFE060E38FEDF686E1E52E0@MN2PR12MB3455.namprd12.prod.outlook.com>
On Wed, Apr 10, 2019 at 11:24 AM Mehta, Sanju <Sanju.Mehta@amd.com> wrote:
>
> Hi All,
>
> Any comments on below patch?
I wasn't cc'ed, so this one missed my inbox. Applied to ntb-next, thanks.
>
> Thanks & Regards,
> Sanjay Mehta
>
> -----Original Message-----
> From: Mehta, Sanju <Sanju.Mehta@amd.com>
> Sent: Friday, March 29, 2019 5:03 PM
> To: S-k, Shyam-sundar <Shyam-sundar.S-k@amd.com>; jdmason@kudzu.us; dave.jiang@intel.com; allenbh@gmail.com
> Cc: linux-ntb@googlegroups.com; linux-kernel@vger.kernel.org; Mehta, Sanju <Sanju.Mehta@amd.com>
> Subject: [PATCH] point to right memory window index
>
> From: Sanjay R Mehta <sanju.mehta@amd.com>
>
> second parameter of ntb_peer_mw_get_addr is pointing to wrong memory window index by passing "peer gidx" instead of "local gidx".
>
> For ex, "local gidx" value is '0' and "peer gidx" value is '1', then
>
> on peer side ntb_mw_set_trans() api is used as below with gidx pointing to local side gidx which is '0', so memroy window '0' is chosen and XLAT '0'
> will be programmed by peer side.
>
> ntb_mw_set_trans(perf->ntb, peer->pidx, peer->gidx, peer->inbuf_xlat,
> peer->inbuf_size);
>
> Now, on local side ntb_peer_mw_get_addr() is been used as below with gidx pointing to "peer gidx" which is '1', so pointing to memory window '1'
> instead of memory window '0'.
>
> ntb_peer_mw_get_addr(perf->ntb, peer->gidx, &phys_addr,
> &peer->outbuf_size);
>
> So this patch pass "local gidx" as parameter to ntb_peer_mw_get_addr().
>
> Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
> ---
> drivers/ntb/test/ntb_perf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index c7d1a48..08e18d7 100644
> --- a/drivers/ntb/test/ntb_perf.c
> +++ b/drivers/ntb/test/ntb_perf.c
> @@ -1381,7 +1381,7 @@ static int perf_setup_peer_mw(struct perf_peer *peer)
> int ret;
>
> /* Get outbound MW parameters and map it */
> - ret = ntb_peer_mw_get_addr(perf->ntb, peer->gidx, &phys_addr,
> + ret = ntb_peer_mw_get_addr(perf->ntb, perf->gidx, &phys_addr,
> &peer->outbuf_size);
> if (ret)
> return ret;
> --
> 2.7.4
>
prev parent reply other threads:[~2019-09-10 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 11:32 [PATCH] point to right memory window index Mehta, Sanju
2019-04-10 10:24 ` Mehta, Sanju
2019-09-10 16:42 ` Jon Mason [this message]
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='CAPoiz9wqa4zhhitBeu8XDvOckhVWpEviPdk=UTCh-pLUvk9QvQ@mail.gmail.com' \
--to=jdmason@kudzu.us \
--cc=Sanju.Mehta@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=allenbh@gmail.com \
--cc=dave.jiang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntb@googlegroups.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).