* Allocate write combined memory for BAR of a PCIe device and transfer data in bursts
@ 2015-07-21 3:00 Ankit Pradhan
0 siblings, 0 replies; only message in thread
From: Ankit Pradhan @ 2015-07-21 3:00 UTC (permalink / raw)
To: kernelnewbies
Hello everyone
I want to be able to send 1-2KB of data from host, using BARs of a PCIe
device, with very low latency.
I am working on an FPGA project in which I have to send packet data from
Host to FPGA over PCIe 3.0 interface. This is a latency critical
application and therefore I want to use BARs to send data in bursts and not
use DMA because it has a lot of overhead.
I started out with the device driver provided to me by my FPGA board
vendor. That driver allocates 'uncached' memory for the BAR via mmap and
provides its virtual pointer to the user application for use. When I
initiate a transfer by dereferencing that pointer in my application and
observe the write signals that arrive at my FPGA using a logic analyzer. I
see all write requests arriving after constant time period and the burst
count signal is always 1. I have concluded that these transfers are not in
bursts.
I modified the driver by using the ioremap_wc() on the physical address of
BAR and then passed the virtual pointer it returned to set_memory_wc()
(apparently I have to use both). I was able to get 'write combined' memory
for the physical BAR address. When I do writes using this pointer and
observe from logic analyzer I can see burst transfers. That is, I see 4
bursts of 5-6 write requests sent within a short time period.
The problem is that the pointer to this memory is a kernel virtual pointer.
I want to be able to do the above from user space. How can I do this?
Thanks
Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150720/ebbb8c2e/attachment.html
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-21 3:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21 3:00 Allocate write combined memory for BAR of a PCIe device and transfer data in bursts Ankit Pradhan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).