DPDK usage discussions
 help / color / mirror / Atom feed
From: "Wieckowski, Jacob" <Jacob.Wieckowski@vector.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: RE: DMA Transfers to PCIe Bar Memory
Date: Thu, 7 Nov 2024 09:16:39 +0000	[thread overview]
Message-ID: <AS4PR01MB10408FCD8A7946B6C4AFCE5C5FD5C2@AS4PR01MB10408.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <20241106204604.444529d5@sovereign>

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@gmail.com> 
Sent: Wednesday, November 6, 2024 6:46 PM
To: Wieckowski, Jacob <Jacob.Wieckowski@vector.com>
Cc: users@dpdk.org
Subject: Re: DMA Transfers to PCIe Bar Memory

[Sie erhalten nicht h?ufig E-Mails von dmitry.kozliuk@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

  reply	other threads:[~2024-11-07  9:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 15:50 Wieckowski, Jacob
2024-11-06 17:46 ` Dmitry Kozlyuk
2024-11-07  9:16   ` Wieckowski, Jacob [this message]
2024-11-07  9:42     ` Dmitry Kozlyuk
2024-11-07 13:09       ` Wieckowski, Jacob
2024-11-07 16:13         ` Stephen Hemminger
2024-11-07 16:11       ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS4PR01MB10408FCD8A7946B6C4AFCE5C5FD5C2@AS4PR01MB10408.eurprd01.prod.exchangelabs.com \
    --to=jacob.wieckowski@vector.com \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).