From: avatli@itu.edu.tr
To: users@dpdk.org
Cc: volkan.atli@b-ulltech.com
Subject: [dpdk-users] rte_eth_from_rings: how to free descriptors
Date: Tue, 04 Feb 2020 14:22:24 +0300 [thread overview]
Message-ID: <20200204142224.Horde.ZK4n1WEcHbpPPxcXot1uO7d@webmail.itu.edu.tr> (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 11:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 11:22 avatli [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-02-04 7:53 Volkan Atlı
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=20200204142224.Horde.ZK4n1WEcHbpPPxcXot1uO7d@webmail.itu.edu.tr \
--to=avatli@itu.edu.tr \
--cc=users@dpdk.org \
--cc=volkan.atli@b-ulltech.com \
/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).