From: "Allen Hubbe" <Allen.Hubbe@dell.com>
To: 'Shyam Sundar S K' <ssundark@amd.com>, 'Jon Mason' <jdmason@kudzu.us>
Cc: "'Yu, Xiangliang'" <Xiangliang.Yu@amd.com>,
'Dave Jiang' <dave.jiang@intel.com>,
linux-ntb@googlegroups.com, "'Sen, Pankaj'" <Pankaj.Sen@amd.com>,
"'Shah, Nehal-bakulchandra'" <Nehal-bakulchandra.Shah@amd.com>,
"'Agrawal, Nitesh-kumar'" <Nitesh-kumar.Agrawal@amd.com>,
"'Subramaniyan, Ramkumar'" <ramkumar.ks@amd.com>,
Richard1.Su@amd.com
Subject: RE: [PATCH] NTB: Register and offset values fix for memory window
Date: Tue, 29 Nov 2016 11:03:46 -0500 [thread overview]
Message-ID: <000001d24a5a$2dcbaac0$89630040$@dell.com> (raw)
In-Reply-To: <631ba7a7-3c3e-3c7c-d164-b53c52d81753@amd.com>
From: Shyam Sundar S K
> On 11/22/2016 7:49 PM, Allen Hubbe wrote:
> > Instead, limit the number of memory windows actually used by ntb_transport, such that
> ntb_transport can configure those memory windows using only the available scratchpads. If
> there are not enough scratchpads to exchange values for all of the memory windows, then
> ntb_transport should limit itself to use fewer memory windows.
> >
>
> Allen, I get your point. So, you are asking to limit the number of memory windows we
> advertise in our driver since there are less number of scratchpads available when we have
> to configure the 3rd
> window. I believe you are asking me to do
>
> - ndev->mw_count = AMD_MW_CNT;
> + ndev->mw_count = AMD_MW_CNT - 1;
>
> in amd_init_ntb(). Is this understanding correct ?
That would work, but it would limit other transport drivers from using all the memory windows of your device.
This is the change I meant to describe, in ntb_transport:
static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev)
{
...
mw_count = ntb_mw_count(ndev);
Instead of this:
nt->mw_count = mw_count;
Limit the mw count like this:
spad_count = ntb_spad_count(ndev);
max_mw_count_for_spads = some_arithmetic(spad_count);
nt->mw_count = min(mw_count, max_mw_count_for_spads);
next prev parent reply other threads:[~2016-11-29 16:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 9:00 [PATCH] NTB: Register and offset values fix for memory window Shyam Sundar S K
2016-11-14 14:35 ` Allen Hubbe
2016-11-15 7:04 ` Shyam Sundar S K
2016-11-17 15:39 ` Jon Mason
2016-11-22 1:45 ` Shyam Sundar S K
2016-11-22 14:19 ` Allen Hubbe
2016-11-22 15:12 ` Shyam Sundar S K
2016-11-29 14:55 ` Shyam Sundar S K
2016-11-29 16:03 ` Allen Hubbe [this message]
2016-12-01 18:57 ` Shyam Sundar S K
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='000001d24a5a$2dcbaac0$89630040$@dell.com' \
--to=allen.hubbe@dell.com \
--cc=Nehal-bakulchandra.Shah@amd.com \
--cc=Nitesh-kumar.Agrawal@amd.com \
--cc=Pankaj.Sen@amd.com \
--cc=Richard1.Su@amd.com \
--cc=Xiangliang.Yu@amd.com \
--cc=dave.jiang@intel.com \
--cc=jdmason@kudzu.us \
--cc=linux-ntb@googlegroups.com \
--cc=ramkumar.ks@amd.com \
--cc=ssundark@amd.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