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


Reply via email to