<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/ntb, branch v4.4.197</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.197</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.197'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-05-30T05:48:55Z</updated>
<entry>
<title>ntb_transport: Fix bug with max_mw_size parameter</title>
<updated>2018-05-30T05:48:55Z</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-12-18T18:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ddda6e247f6f5f8b19cecfaf9f0b3f5b3d953cd7'/>
<id>urn:sha1:ddda6e247f6f5f8b19cecfaf9f0b3f5b3d953cd7</id>
<content type='text'>
[ Upstream commit cbd27448faff4843ac4b66cc71445a10623ff48d ]

When using the max_mw_size parameter of ntb_transport to limit the size of
the Memory windows, communication cannot be established and the queues
freeze.

This is because the mw_size that's reported to the peer is correctly
limited but the size used locally is not. So the MW is initialized
with a buffer smaller than the window but the TX side is using the
full window. This means the TX side will be writing to a region of the
window that points nowhere.

This is easily fixed by applying the same limit to tx_size in
ntb_transport_init_queue().

Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Acked-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Cc: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ntb_transport: fix bug calculating num_qps_mw</title>
<updated>2017-08-30T08:19:29Z</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-06-05T20:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4e5f2c2041503bd0f855b9467de3cd05a8748c91'/>
<id>urn:sha1:4e5f2c2041503bd0f855b9467de3cd05a8748c91</id>
<content type='text'>
commit 8e8496e0e9564b66165f5219a4e8ed20b0d3fc6b upstream.

A divide by zero error occurs if qp_count is less than mw_count because
num_qps_mw is calculated to be zero. The calculation appears to be
incorrect.

The requirement is for num_qps_mw to be set to qp_count / mw_count
with any remainder divided among the earlier mws.

For example, if mw_count is 5 and qp_count is 12 then mws 0 and 1
will have 3 qps per window and mws 2 through 4 will have 2 qps per window.
Thus, when mw_num &lt; qp_count % mw_count, num_qps_mw is 1 higher
than when mw_num &gt;= qp_count.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Acked-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ntb_transport: fix qp count bug</title>
<updated>2017-08-30T08:19:28Z</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2017-06-05T20:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1aac8ffd619f893b93cbd4c28abe43ecee7f82ef'/>
<id>urn:sha1:1aac8ffd619f893b93cbd4c28abe43ecee7f82ef</id>
<content type='text'>
commit cb827ee6ccc3e480f0d9c0e8e53eef55be5b0414 upstream.

In cases where there are more mw's than spads/2-2, the mw count gets
reduced to match the limitation. ntb_transport also tries to ensure that
there are fewer qps than mws but uses the full mw count instead of
the reduced one. When this happens, the math in
'ntb_transport_setup_qp_mw' will get confused and result in a kernel
paging request bug.

This patch fixes the bug by reducing qp_count to the reduced mw count
instead of the full mw count.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Acked-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ntb_transport: Pick an unused queue</title>
<updated>2017-02-23T16:43:10Z</updated>
<author>
<name>Thomas VanSelus</name>
<email>tvanselus@xes-inc.com</email>
</author>
<published>2017-02-13T22:46:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=aee7d0412f170f6c38a2b61bb826ceaa037c31cf'/>
<id>urn:sha1:aee7d0412f170f6c38a2b61bb826ceaa037c31cf</id>
<content type='text'>
commit 8fcd0950c021d7be8493280541332b924b9de962 upstream.

Fix typo causing ntb_transport_create_queue to select the first
queue every time, instead of using the next free queue.

Signed-off-by: Thomas VanSelus &lt;tvanselus@xes-inc.com&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.com&gt;
Acked-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Fixes: fce8a7bb5 ("PCI-Express Non-Transparent Bridge Support")
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NTB: ntb_transport: fix debugfs_remove_recursive</title>
<updated>2017-02-23T16:43:10Z</updated>
<author>
<name>Allen Hubbe</name>
<email>Allen.Hubbe@dell.com</email>
</author>
<published>2016-12-27T22:57:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c6c6851adbaf002038aa2acdfdb9c53434a0b80d'/>
<id>urn:sha1:c6c6851adbaf002038aa2acdfdb9c53434a0b80d</id>
<content type='text'>
commit dd62245e73de9138333cb0e7a42c8bc1215c3ce6 upstream.

The call to debugfs_remove_recursive(qp-&gt;debugfs_dir) of the sub-level
directory must not be later than
debugfs_remove_recursive(nt_debugfs_dir) of the top-level directory.
Otherwise, the sub-level directory will not exist, and it would be
invalid (panic) to attempt to remove it.  This removes the top-level
directory last, after sub-level directories have been cleaned up.

Signed-off-by: Allen Hubbe &lt;Allen.Hubbe@dell.com&gt;
Fixes: e26a5843f ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>NTB: fix 32-bit compiler warning</title>
<updated>2015-11-08T21:24:43Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2015-10-07T07:59:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fdcb4b2e78220bde95ce4ba3213088e3a1f1cec6'/>
<id>urn:sha1:fdcb4b2e78220bde95ce4ba3213088e3a1f1cec6</id>
<content type='text'>
resource_size_t may be 32-bit wide on some architectures, which causes
this warning when building the NTB code:

drivers/ntb/ntb_transport.c: In function 'ntb_transport_link_work':
drivers/ntb/ntb_transport.c:828:46: warning: right shift count &gt;= width of type [-Wshift-count-overflow]

The warning is harmless but can be avoided by using the upper_32_bits()
macro.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: unify translation addresses</title>
<updated>2015-11-08T21:11:21Z</updated>
<author>
<name>Dave Jiang</name>
<email>dave.jiang@intel.com</email>
</author>
<published>2015-09-24T20:03:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8b782fab4da771c97a198f6cb496d124dace36fd'/>
<id>urn:sha1:8b782fab4da771c97a198f6cb496d124dace36fd</id>
<content type='text'>
There is no need for the upstream and downstream addresses to be different
for the NTB configs. Go to using a single set of address. It is still
possible to configure them differently using module parameter override
however.

Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Acked and Tested-by: Allen Hubbe &lt;Allen.Hubbe@emc.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: invalid buf pointer in multi-MW setups</title>
<updated>2015-11-08T21:11:21Z</updated>
<author>
<name>Jon Mason</name>
<email>jdmason@kudzu.us</email>
</author>
<published>2015-10-05T02:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c92ba3c5d97de59c016d1a23ebab17293a792621'/>
<id>urn:sha1:c92ba3c5d97de59c016d1a23ebab17293a792621</id>
<content type='text'>
Order of operations issue with the QP Num and MW count, which would
result in the receive buffer pointer being invalid if there are more
than 1 MW.  Corrected with parenthesis to enforce the proper order of
operations.

Reported-by: John I. Kading &lt;John.Kading@gd-ms.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: remove unused variable</title>
<updated>2015-11-08T21:11:21Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2015-10-03T08:09:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=70d4687d60184915b6f40920041caa1df4f4d033'/>
<id>urn:sha1:70d4687d60184915b6f40920041caa1df4f4d033</id>
<content type='text'>
These variables were not used anywhere. So remove them.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: fix access of free-ed pointer</title>
<updated>2015-11-08T21:11:21Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2015-10-03T08:09:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d4adee09fd1cf65189cb8901eb7506aea3e869ac'/>
<id>urn:sha1:d4adee09fd1cf65189cb8901eb7506aea3e869ac</id>
<content type='text'>
We were accessing nt-&gt;mw_vec after freeing it. Fix the error path so
that we free nt-&gt;mw_vec after we have finished using it.

Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.org&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
</feed>
