From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: "Wieckowski, Jacob" <Jacob.Wieckowski@vector.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: DMA Transfers to PCIe Bar Memory
Date: Thu, 7 Nov 2024 12:42:25 +0300 [thread overview]
Message-ID: <20241107124225.50c22ee2@sovereign> (raw)
In-Reply-To: <AS4PR01MB10408FCD8A7946B6C4AFCE5C5FD5C2@AS4PR01MB10408.eurprd01.prod.exchangelabs.com>
2024-11-07 09:16 (UTC+0000), Wieckowski, Jacob:
> 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?
Could you please start with the problem you're solving?
DPDK uses DMA internally (mainly) to transfer packet data from/to HW.
It puts physical address of the buffer, etc. to NIC queue descriptor,
writes to a doorbell register, then the NIC DMA-writes/reads the buffer;
PCI transfer sizes are probably selected by HW.
All of this is within PMD (userspace drivers), no API is exposed.
rte_memcpy() is intended for copy from RAM to RAM.
You can Cc: Morten Brørup <mb@smartsharesystems.com> probably,
but I doubt that rte_memcpy() is specialized for DMA in any way.
The buffer may be filled with rte_mempcy() by application,
but this is done before handling the buffer to PMD, and thus before DMA.
Are you looking for functionality of "dmadev" library?
https://doc.dpdk.org/guides/prog_guide/dmadev.html
next prev parent reply other threads:[~2024-11-07 9:42 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
2024-11-07 9:42 ` Dmitry Kozlyuk [this message]
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=20241107124225.50c22ee2@sovereign \
--to=dmitry.kozliuk@gmail.com \
--cc=Jacob.Wieckowski@vector.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).