UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor cgrant
Visitor
435 Views
Registered: ‎04-07-2015

C2H data loss with XDMA 20180420 Linux driver

Hi, 

 

I'm using the 20180420 release of the xdma driver on linux on an x86 processor. I have configured the IP to have four streaming c2h channels on a PCIe Gen3 x8 interface. I am streaming 1 MB of data from the FPGA in each packet (between each tlast), and I have two problems appearing at the driver:

 

1. Frequently, a little more than 1 MB appears in the driver buffer. I throw this away, because my userspace buffer would overrun.

2. Less frequently, the driver will appear to have skipped about as much data as the size of the kernelspace buffer.

 

What would you suspect for these symptoms? Any details about my setup I missed?

 

Thanks!

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
399 Views
Registered: ‎12-10-2013

Re: C2H data loss with XDMA 20180420 Linux driver

When you set up descriptors in C2H streaming for each channel, they create a buffer ring.  These will continue to be used as you feed in data in a loop, so if your data source has the ability to feed more data, it will continue to flow.  Basically, the tready will never go low - because there is always a "next valid" descriptor.

 

Is there a chance you are expecting the C2H Stream interface to throttle?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor cgrant
Visitor
383 Views
Registered: ‎04-07-2015

Re: C2H data loss with XDMA 20180420 Linux driver

I am hoping there is some path for feedback from the driver to the fpga if the descriptor buffers are all full. Is that not true? 

 

Without throttling, I would hope that I would be able to guarantee with fast enough processor operation that I wouldn't lose any data. How can I know when to stop sending data if the descriptor buffers are all full?

0 Kudos