<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><span></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">Hello everyone<div><br></div><div>I want to be able to send 1-2KB of data from host, using BARs of a PCIe device, with very low latency. </div><div><br></div><div><span style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress">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.</span><div style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress"><br></div><div style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress">I started out with the device driver provided to me by my FPGA board vendor. That driver allocates &#39;uncached&#39; 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. </div><div style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress"><br></div><div style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress">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 &#39;write combined&#39; 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. </div><div style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress"><br></div><div style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress">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?</div></div></div></div><div style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress"><br></div><div style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress">Thanks</div><div style="color:rgba(0,0,0,0.701961);text-decoration:-webkit-letterpress">Ankit</div></body></html>