DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] rte_eth_from_rings: how to free descriptors
@ 2020-02-04 11:22 avatli
  0 siblings, 0 replies; 2+ messages in thread
From: avatli @ 2020-02-04 11:22 UTC (permalink / raw)
  To: users; +Cc: volkan.atli


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-users] rte_eth_from_rings: how to free descriptors
@ 2020-02-04  7:53 Volkan Atlı
  0 siblings, 0 replies; 2+ messages in thread
From: Volkan Atlı @ 2020-02-04  7:53 UTC (permalink / raw)
  To: users; +Cc: avatli

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-04 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 11:22 [dpdk-users] rte_eth_from_rings: how to free descriptors avatli
  -- strict thread matches above, loose matches on Subject: below --
2020-02-04  7:53 Volkan Atlı

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).