<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/ntb/test/ntb_perf.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-08-18T13:50:06Z</updated>
<entry>
<title>dtivers: ntb: fix parameter check in perf_setup_dbgfs()</title>
<updated>2023-08-18T13:50:06Z</updated>
<author>
<name>Minjie Du</name>
<email>duminjie@vivo.com</email>
</author>
<published>2023-07-13T03:47:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=45191087c3e2866e4fbcd775e443ee0380211ed1'/>
<id>urn:sha1:45191087c3e2866e4fbcd775e443ee0380211ed1</id>
<content type='text'>
Make IS_ERR() judge the debugfs_create_dir() function return
in perf_setup_dbgfs().

Signed-off-by: Minjie Du &lt;duminjie@vivo.com&gt;
Reviewed-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: perf: Fix an error code in perf_setup_inbuf()</title>
<updated>2021-09-04T22:36:04Z</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2021-06-07T08:40:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0097ae5f7af5684f961a5f803ff7ad3e6f933668'/>
<id>urn:sha1:0097ae5f7af5684f961a5f803ff7ad3e6f933668</id>
<content type='text'>
When the function IS_ALIGNED() returns false, the value of ret is 0.
So, we set ret to -EINVAL to indicate this error.

Clean up smatch warning:
drivers/ntb/test/ntb_perf.c:602 perf_setup_inbuf() warn: missing error
code 'ret'.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Reviewed-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: perf: Fix race condition when run with ntb_test</title>
<updated>2020-06-06T00:02:09Z</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2019-01-09T19:22:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=34d8673a01b053b6231a995a4eec9341163d63be'/>
<id>urn:sha1:34d8673a01b053b6231a995a4eec9341163d63be</id>
<content type='text'>
When running ntb_test, the script tries to run the ntb_perf test
immediately after probing the modules. Since adding multi-port support,
this fails seeing the new initialization procedure in ntb_perf
can not complete instantly.

To fix this we add a completion which is waited on when a test is
started. In this way, run can be written any time after the module is
loaded and it will wait for the initialization to complete instead of
sending an error.

Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Acked-by: Allen Hubbe &lt;allenbh@gmail.com&gt;
Tested-by: Alexander Fomichev &lt;fomichev.ru@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: perf: Fix support for hardware that doesn't have port numbers</title>
<updated>2020-06-06T00:02:09Z</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2019-01-09T19:22:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b54369a248c2e033bfcf5d6917e08cf9d73d54a6'/>
<id>urn:sha1:b54369a248c2e033bfcf5d6917e08cf9d73d54a6</id>
<content type='text'>
Legacy drivers do not have port numbers (but is reliably only two ports)
and was broken by the recent commit that added mult-port support to
ntb_perf. This is especially important to support the cross link
topology which is perfectly symmetric and cannot assign unique port
numbers easily.

Hardware that returns zero for both the local port and the peer should
just always use gidx=0 for the only peer.

Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Acked-by: Allen Hubbe &lt;allenbh@gmail.com&gt;
Tested-by: Alexander Fomichev &lt;fomichev.ru@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: perf: Don't require one more memory window than number of peers</title>
<updated>2020-06-06T00:02:08Z</updated>
<author>
<name>Logan Gunthorpe</name>
<email>logang@deltatee.com</email>
</author>
<published>2019-01-09T19:22:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a9c4211ac918ade1522aced6b5acfbe824722f7d'/>
<id>urn:sha1:a9c4211ac918ade1522aced6b5acfbe824722f7d</id>
<content type='text'>
ntb_perf should not require more than one memory window per peer. This
was probably an off-by-one error.

Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Acked-by: Allen Hubbe &lt;allenbh@gmail.com&gt;
Tested-by: Alexander Fomichev &lt;fomichev.ru@gmail.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb_perf: avoid false dma unmap of destination address</title>
<updated>2020-06-06T00:02:08Z</updated>
<author>
<name>Sanjay R Mehta</name>
<email>sanju.mehta@amd.com</email>
</author>
<published>2020-05-06T04:21:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9cb8bfdf5262b14d29617d1595b79e1f360135ab'/>
<id>urn:sha1:9cb8bfdf5262b14d29617d1595b79e1f360135ab</id>
<content type='text'>
The DMA map and unmap of destination address is already being
done in perf_init_test() and perf_clear_test() functions.
Hence avoiding it by making necessary changes in perf_copy_chunk()
function.

Signed-off-by: Sanjay R Mehta &lt;sanju.mehta@amd.com&gt;
Signed-off-by: Arindam Nath &lt;arindam.nath@amd.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb_perf: increase sleep time from one milli sec to one sec</title>
<updated>2020-06-06T00:02:08Z</updated>
<author>
<name>Sanjay R Mehta</name>
<email>sanju.mehta@amd.com</email>
</author>
<published>2020-05-06T04:21:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d7699665773b6afc14d4eef82bb3ef50467a9353'/>
<id>urn:sha1:d7699665773b6afc14d4eef82bb3ef50467a9353</id>
<content type='text'>
After trying to send commands for a maximum of MSG_TRIES
re-tries, link-up fails due to short sleep time(1ms) between
re-tries. Hence increasing the sleep time to one second providing
sufficient time for perf link-up.

Signed-off-by: Sanjay R Mehta &lt;sanju.mehta@amd.com&gt;
Signed-off-by: Arindam Nath &lt;arindam.nath@amd.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>ntb_perf: pass correct struct device to dma_alloc_coherent</title>
<updated>2020-06-06T00:02:08Z</updated>
<author>
<name>Sanjay R Mehta</name>
<email>sanju.mehta@amd.com</email>
</author>
<published>2020-05-06T04:21:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=98f4e140264eeb52f22ff05be6b6dd48237255ac'/>
<id>urn:sha1:98f4e140264eeb52f22ff05be6b6dd48237255ac</id>
<content type='text'>
Currently, ntb-&gt;dev is passed to dma_alloc_coherent
and dma_free_coherent calls. The returned dma_addr_t
is the CPU physical address. This works fine as long
as IOMMU is disabled. But when IOMMU is enabled, we
need to make sure that IOVA is returned for dma_addr_t.
So the correct way to achieve this is by changing the
first parameter of dma_alloc_coherent() as ntb-&gt;pdev-&gt;dev
instead.

Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Sanjay R Mehta &lt;sanju.mehta@amd.com&gt;
Signed-off-by: Arindam Nath &lt;arindam.nath@amd.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: Fix static check warning in perf_clear_test</title>
<updated>2020-04-13T14:28:34Z</updated>
<author>
<name>Jiasen Lin</name>
<email>linjiasen@hygon.cn</email>
</author>
<published>2020-04-09T07:11:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a0348a4da1a7073fa14065f370f507073b857782'/>
<id>urn:sha1:a0348a4da1a7073fa14065f370f507073b857782</id>
<content type='text'>
As pthr-&gt;dma_chan can't be NULL in this context, so there is
no need to check pthr-&gt;dma_chan.

Fixes: 99a06056124d ("NTB: ntb_perf: Fix address err in perf_copy_chunk")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Jiasen Lin &lt;linjiasen@hygon.cn&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
<entry>
<title>NTB: ntb_perf: Fix address err in perf_copy_chunk</title>
<updated>2020-03-13T14:03:49Z</updated>
<author>
<name>Jiasen Lin</name>
<email>linjiasen@hygon.cn</email>
</author>
<published>2019-11-21T02:28:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=99a06056124dcf5cfc4c95278b86c6ff96aaa1ec'/>
<id>urn:sha1:99a06056124dcf5cfc4c95278b86c6ff96aaa1ec</id>
<content type='text'>
peer-&gt;outbuf is a virtual address which is get by ioremap, it can not
be converted to a physical address by virt_to_page and page_to_phys.
This conversion will result in DMA error, because the destination address
which is converted by page_to_phys is invalid.

This patch save the MMIO address of NTB BARx in perf_setup_peer_mw,
and map the BAR space to DMA address after we assign the DMA channel.
Then fill the destination address of DMA descriptor with this DMA address
to guarantee that the address of memory write requests fall into
memory window of NBT BARx with IOMMU enabled and disabled.

Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support")
Signed-off-by: Jiasen Lin &lt;linjiasen@hygon.cn&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Jon Mason &lt;jdmason@kudzu.us&gt;
</content>
</entry>
</feed>
