DMA Transfers to PCIe Bar Memory

Wieckowski, Jacob Jacob.Wieckowski at vector.com
Thu Nov 7 10:16:39 CET 2024


Hi Dimitry,

thank you for the quick response.

Ok, DMA in the classic sense is not possible. 
However, if you carry out a write transfer into the BAR memory from DPDK, then, as I understand it, this access should be divided into several small postage-compliant TLP packets with a maximum payload size as specified in config space. 

Can block transfers in sizes of 512 bytes be carried out with the rte memcpy? The DPDK API states that the AVX-512 memcpy parameter must be enabled for x86 platforms.

Do other special precautions have to be taken in the DPDK environment to setup this kind of transfer?

Kind regards
Jakob

-----Original Message-----
From: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com> 
Sent: Wednesday, November 6, 2024 6:46 PM
To: Wieckowski, Jacob <Jacob.Wieckowski at vector.com>
Cc: users at dpdk.org
Subject: Re: DMA Transfers to PCIe Bar Memory

[Sie erhalten nicht h?ufig E-Mails von dmitry.kozliuk at gmail.com. Weitere Informationen, warum dies wichtig ist, finden Sie unter https://aka.ms/LearnAboutSenderIdentification ]

2024-11-06 15:50 (UTC+0000), Wieckowski, Jacob:
> Is DMA access to the bar memory of a PCIe device with DPDK possible?
> If so, which example project could be used as a reference to gain a better understanding of this topic?

Hi,

BAR (base address register) is a place in PCI configuration space, so one really doesn't "DMA transfers to PCIe BAR memory" to be precise.
Read https://wiki.osdev.org/PCI_Express to explore the topic.

DPDK drivers write to BARs to configure devices, specifically to setup memory-mapped IO which is used for DMA.
Take a look at this project, which is a toy version of DPDK, and thus it is easier to grasp:
https://github.com/ixy-languages/ixy-languages


More information about the users mailing list