From: "Volkan Atlı" <volkan.atli@b-ulltech.com>
To: "users@dpdk.org" <users@dpdk.org>
Cc: "avatli@itu.edu.tr" <avatli@itu.edu.tr>
Subject: [dpdk-users] rte_eth_from_rings: how to free descriptors
Date: Tue, 4 Feb 2020 07:53:48 +0000 [thread overview]
Message-ID: <AM7PR08MB54455E1769405FC5F684FD8FBA030@AM7PR08MB5445.eurprd08.prod.outlook.com> (raw)
Hi
I'm trying to use rte_eth_from_rings() to allow data exchange between cores using rings to be done in the same way as sending or receiving packets from an Ethernet device. However, I don't understand exactly how rte_mbuf descriptors are cleaned.
For example, for a forwarding application, I don't need to free an rte_mbuf when I use rte_eth_rx_burst() and rte_eth_tx_burst() on the real Ethernet device. Because the rte_eth_tx_burst() function picks up the next available descriptor in the transmit ring and frees the network buffer previously sent with that descriptor. As a result, I do not need to free rte_mbuf descriptor since it will be freed in rte_eth_tx_burst(). Please correct me if I'm wrong.
Does the same behavior apply to rte_eth_from_rings() model? If so, I have to copy the rte_mbuf from pseudo-Ethernet port (created by rte_eth_from_rings) to send to a real Ethernet port, otherwise it will be freed twice (in the 2th and 4rd below). Is there any other way than copy? Please correct me if it is wrong.
app_1
1) allocate rte_mbuf
2) sent the rte_mbuf to pseudo-Ethernet using rte_eth_tx_burst()
app_2
3) pseudo-Ethernet rte_eth_rx_burst()
4) real-Ethernet rte_eth_tx_burst()
Best regards...
Volkan
next reply other threads:[~2020-02-04 23:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 7:53 Volkan Atlı [this message]
2020-02-04 11:22 avatli
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=AM7PR08MB54455E1769405FC5F684FD8FBA030@AM7PR08MB5445.eurprd08.prod.outlook.com \
--to=volkan.atli@b-ulltech.com \
--cc=avatli@itu.edu.tr \
--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).