| 03c9e6f0 | 10-Aug-2023 |
Ruan Jinjie <ruanjinjie@huawei.com> |
NTB: ntb_tool: Switch to memdup_user_nul() helper
Use memdup_user_nul() helper instead of open-coding to simplify the code.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Dave Jian
NTB: ntb_tool: Switch to memdup_user_nul() helper
Use memdup_user_nul() helper instead of open-coding to simplify the code.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| 45191087 | 13-Jul-2023 |
Minjie Du <duminjie@vivo.com> |
dtivers: ntb: fix parameter check in perf_setup_dbgfs()
Make IS_ERR() judge the debugfs_create_dir() function return in perf_setup_dbgfs().
Signed-off-by: Minjie Du <duminjie@vivo.com> Reviewed-by:
dtivers: ntb: fix parameter check in perf_setup_dbgfs()
Make IS_ERR() judge the debugfs_create_dir() function return in perf_setup_dbgfs().
Signed-off-by: Minjie Du <duminjie@vivo.com> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| e6315480 | 09-Jun-2021 |
Colin Ian King <colin.king@canonical.com> |
ntb: ntb_pingpong: remove redundant initialization of variables msg_data and spad_data
The variables msg_data and spad_data are being initialized with values that are never read, they are being upda
ntb: ntb_pingpong: remove redundant initialization of variables msg_data and spad_data
The variables msg_data and spad_data are being initialized with values that are never read, they are being updated later on. The initializations are redundant and can be removed.
Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| 0097ae5f | 07-Jun-2021 |
Yang Li <yang.lee@linux.alibaba.com> |
NTB: perf: Fix an error code in perf_setup_inbuf()
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: dr
NTB: perf: Fix an error code in perf_setup_inbuf()
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 <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| 34d8673a | 09-Jan-2019 |
Logan Gunthorpe <logang@deltatee.com> |
NTB: perf: Fix race condition when run with ntb_test
When running ntb_test, the script tries to run the ntb_perf test immediately after probing the modules. Since adding multi-port support, this fai
NTB: perf: Fix race condition when run with ntb_test
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 <logang@deltatee.com> Acked-by: Allen Hubbe <allenbh@gmail.com> Tested-by: Alexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| b54369a2 | 09-Jan-2019 |
Logan Gunthorpe <logang@deltatee.com> |
NTB: perf: Fix support for hardware that doesn't have port numbers
Legacy drivers do not have port numbers (but is reliably only two ports) and was broken by the recent commit that added mult-port s
NTB: perf: Fix support for hardware that doesn't have port numbers
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 <logang@deltatee.com> Acked-by: Allen Hubbe <allenbh@gmail.com> Tested-by: Alexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| a9c4211a | 09-Jan-2019 |
Logan Gunthorpe <logang@deltatee.com> |
NTB: perf: Don't require one more memory window than number of peers
ntb_perf should not require more than one memory window per peer. This was probably an off-by-one error.
Fixes: 5648e56d03fa ("N
NTB: perf: Don't require one more memory window than number of peers
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 <logang@deltatee.com> Acked-by: Allen Hubbe <allenbh@gmail.com> Tested-by: Alexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| ca93c457 | 09-Jan-2019 |
Logan Gunthorpe <logang@deltatee.com> |
NTB: ntb_pingpong: Choose doorbells based on port number
This commit fixes pingpong support for existing drivers that do not implement ntb_default_port_number() and ntb_default_peer_port_number(). T
NTB: ntb_pingpong: Choose doorbells based on port number
This commit fixes pingpong support for existing drivers that do not implement ntb_default_port_number() and ntb_default_peer_port_number(). This is required for hardware (like the crosslink topology of switchtec) which cannot assign reasonable port numbers to each port due to its perfect symmetry.
Instead of picking the doorbell to use based on the the index of the peer, we use the peer's port number. This is a bit clearer and easier to understand.
Fixes: c7aeb0afdcc2 ("NTB: ntb_pp: Add full multi-port NTB API support") Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Acked-by: Allen Hubbe <allenbh@gmail.com> Tested-by: Alexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| 912e1281 | 09-Jan-2019 |
Logan Gunthorpe <logang@deltatee.com> |
NTB: ntb_tool: reading the link file should not end in a NULL byte
When running ntb_test this warning is issued:
./ntb_test.sh: line 200: warning: command substitution: ignored null byte in input
NTB: ntb_tool: reading the link file should not end in a NULL byte
When running ntb_test this warning is issued:
./ntb_test.sh: line 200: warning: command substitution: ignored null byte in input
This is caused by the kernel returning one more byte than is necessary when reading the link file.
Reduce the number of bytes read back to 2 as it was before the commit that regressed this.
Fixes: 7f46c8b3a552 ("NTB: ntb_tool: Add full multi-port NTB API support") Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Acked-by: Allen Hubbe <allenbh@gmail.com> Tested-by: Alexander Fomichev <fomichev.ru@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| 9cb8bfdf | 06-May-2020 |
Sanjay R Mehta <sanju.mehta@amd.com> |
ntb_perf: avoid false dma unmap of destination address
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 ma
ntb_perf: avoid false dma unmap of destination address
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 <sanju.mehta@amd.com> Signed-off-by: Arindam Nath <arindam.nath@amd.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| d7699665 | 06-May-2020 |
Sanjay R Mehta <sanju.mehta@amd.com> |
ntb_perf: increase sleep time from one milli sec to one sec
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 incr
ntb_perf: increase sleep time from one milli sec to one sec
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 <sanju.mehta@amd.com> Signed-off-by: Arindam Nath <arindam.nath@amd.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| 433efe72 | 06-May-2020 |
Sanjay R Mehta <sanju.mehta@amd.com> |
ntb_tool: pass correct struct device to dma_alloc_coherent
Currently, ntb->dev is passed to dma_alloc_coherent and dma_free_coherent calls. The returned dma_addr_t is the CPU physical address. This
ntb_tool: pass correct struct device to dma_alloc_coherent
Currently, ntb->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->pdev->dev instead.
Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Signed-off-by: Arindam Nath <arindam.nath@amd.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| 98f4e140 | 06-May-2020 |
Sanjay R Mehta <sanju.mehta@amd.com> |
ntb_perf: pass correct struct device to dma_alloc_coherent
Currently, ntb->dev is passed to dma_alloc_coherent and dma_free_coherent calls. The returned dma_addr_t is the CPU physical address. This
ntb_perf: pass correct struct device to dma_alloc_coherent
Currently, ntb->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->pdev->dev instead.
Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support") Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com> Signed-off-by: Arindam Nath <arindam.nath@amd.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|
| 2ef97a6c | 14-Jan-2020 |
Helge Deller <deller@gmx.de> |
ntb_tool: Fix printk format
The correct printk format is %pa or %pap, but not %pa[p].
Fixes: 7f46c8b3a5523 ("NTB: ntb_tool: Add full multi-port NTB API support") Signed-off-by: Helge Deller <deller
ntb_tool: Fix printk format
The correct printk format is %pa or %pap, but not %pa[p].
Fixes: 7f46c8b3a5523 ("NTB: ntb_tool: Add full multi-port NTB API support") Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Jon Mason <jdmason@kudzu.us>
show more ...
|