-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XDMA: read file: Unknown error 512 when start 1MB C2H transfer(stream mode) on Ubuntu 18.04.1(4.15.0-88-generic) #54
Comments
does the solution at bottom here help you? |
It doesn't work. I think that the offset(0x80000000) solution is mainly used for AXI-Memorymapped mode. My XDMA mode is AXI-Stream. |
https://forums.xilinx.com/t5/PCIe-and-CPM/C2H-Streaming-XDMA-Linux-Driver-Broken/td-p/833977 anything in this one? See this fix done as well. |
Thank you. I have saw that link which has no useful methods. |
Hello! I have tried the [fd5f152] but it didn't work. I got the same error.
I have read some source code dma_from_device.c and dma_utils.c (https://github.com/Xilinx/dma_ip_drivers/tree/master/XDMA/linux-kernel/tools). It seems that in the read_to_buffer() and write_from_buffer() the read() or write() return -1(0xffffffffffffffff) cause "rc != bytes". But why the two funtions return -1 I don't know. |
Im not a dev but i compared to older 65444 code of dma_from_device.c /* file argument given? / is it me or does this duplicate Size variable? should it just be one or the other? |
I analyzer the old and the new and There have no problem ethier size or i*size. The difference is that memset () and posix_memalign(). |
@bhathaway would you give this issue some attention? |
Hi again I am not a dev but I saw on AWS they had similar issues and made some references to 4096 buffer size. the search results also pointed to some other code section you experts might make sense of. I tried to show first link of where this git has the memalign. Hope it helps. posix_memalign((void **)&allocated, 4096 /*alignment */ , size + 4096); From: //Read from specified address, specified size within a bank
h2c_desc_table = (XDMA_DESC *)memalign(4096, 4096); // allocate 4k aligned to a 4k boundary
|
I'm just going to say that @bhathaway is not affiliated with Xilinx and is one of their customers. You should probaly ping Xilinx harder and not a fellow user. Unless we decide to create our own fork, which we could probably maintain with little effort. |
Sorry, I thought you were the developer of this driver. I made a wrong judgment. |
no, you can see that their PR is in limbo just like the rest of our issues ;) XIlinx basically refuses to interact here. It is likely because their management banned them from using unauthorized channels to communicate. So just keep pinging them on their forums or through your FAE (but they likely aren't PCIe experts). |
Okay,thanks very much! |
@karenx-xilinx I guess you are the developer of Xilinx, would you give this issue some attention? This issue has been posted on Xilinx community forum but without reply. |
I do some more tests. Stream mode, Vivado 2018.3.1, Ubuntu 18.04.1(Kernel 4.15.0-91) , use dma_from_device cmd.
dmesg log4 dmesg log5 |
See this one 512 error and xdma stream |
In the reference forums it's about memory mapped mode, but this issue was happened on stream mode |
I had the same problem, If the amount of data exceeds 8K, it will time out |
This problem already exists a long time. The developers make more effort on AXI memory mapped mode. That troubles us that using AXI Stream mode. |
Hello, My name is Mark Harfouche. I am not affiliated with Xilinx in any way. Over the I've created a fork of dma_ip_drivers which I intend to maintain and work with the The fork can be found https://github.com/hmaarrfk/dma_ip_drivers For now, I am stating the main goals of the repository in If you are interested in working together, feel free to open an issue or PR to Best, Mark |
Just ran into the same issue and search led to this page. Indeed, in stream mode, as the write size touches 8k, it just blocks. However if I am writing using "dd" command it does not seem to block. Any idea, why? E.g. this doesn't block, even for sizes up to 1MB
UPDATE: The issue triggers for a write with exactly 8191 bytes, up to 8190 bytes the writes are fine. |
If this could help, strace shows use of writev, which returns with EINVAL error when the write size touches 8191. Below 8191 it makes use of write() which succeeds.
UPDATE: I was using C++ ofstream. Instead I switched to C's, write and read calls and then I am not facing the limit of 8192. |
The detailed description is https://forums.xilinx.com/t5/PCIe-and-CPM/XDMA-linux-driver-from-git-C2H-transfor-1MB-fail-crash-in-Stream/m-p/1087752#M16120.
Ubuntu18.04.1 , x64 OS, Vivado 2018.3.1
I git the master branch code at 2020-03-17 from the respoitory. My XDMA was used in AXI-Stream mode.
The test cmd is './dma_from_device -d /dev/xdma0_c2h_0 -f data/output_file.bin -s transfersize -c 1'
If I transfer 4KB(transfersize ) one time, the driver work correctly.
When I transfer 1MB(transfersize ) one time, the driver return error.
I read the libxdma.h and found that some parameters would be related to the transfersize: XDMA_TRANSFER_MAX_DESC and CYCLIC_RX_PAGES_MAX.
I changed XDMA_TRANSFER_MAX_DESC to 4096 and CYCLIC_RX_PAGES_MAX to 1024, then I test the transfer of 1MB but the error still exist:
/dev/xdma0_c2h_0, R off 0x0, 0xffffffffffffffff != 0x100000.
read file: Unknown error 512
The text was updated successfully, but these errors were encountered: