Any thoughts or suggestions of how to ensure a buffer's data is transferred from the driver to the PCIe card in a single TLP (where the intended payload size is less than the max payload value in Device Control register of the PCI register space)? Thank you to everyone who has taken the time to read this post.
Jordan Meyers
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
If you are doing MMIO (memory-mapped IO, that is, the CPU is using write
operations to write to a memory-mapped PCI BAR), then you probably
cannot ensure that the data goes into a single PCIe packet. I think the
best you can do is map the PCI memory into the CPU's address space with
write combining (WC) enabled (see ioremap_wc() in recent kernels), which
is likely to generate larger bursts if possible.
- R.
In general you have no control over what the chipset decides to do with
CPU writes over the PCI or PCI Express bus. In newer kernels you might
be able to use iomap_wc, etc. to map the device BAR as write combining
(if your device can handle the effects of this) which would likely at
least result in sending more than one dword per TLP. However, in
general, if you want full efficiency in bus utilization, you typically
have to make the device perform the reads from memory rather than
pushing data from the CPU.