From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1EC00A0532 for ; Tue, 4 Feb 2020 12:22:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 08E621C044; Tue, 4 Feb 2020 12:22:29 +0100 (CET) Received: from duman2.cc.itu.edu.tr (duman2.cc.itu.edu.tr [160.75.25.119]) by dpdk.org (Postfix) with ESMTP id 41FA31BFAD for ; Tue, 4 Feb 2020 12:22:27 +0100 (CET) Received: from itu.edu.tr (authenticated aid=ITUec8aa06da52a8f1ebd017cfae50385f2 bits=0) by duman2.cc.itu.edu.tr with ESMTP id 014BMO2J001052 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 4 Feb 2020 14:22:24 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 duman2.cc.itu.edu.tr 014BMO2J001052 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itu.edu.tr; s=itu; t=1580815344; bh=R/hjGLlWbKz16LAj/76lZuVtkQBPFjBXVkG5xsiMu4c=; h=Date:From:To:Cc:Subject:From; b=kFDalJmG0PT0THwBAJ7e0imn/jmPKBiI0I2P/NEEFFjNZVWxFEitdlLEATe+U1ILY GaiqN4pc/vX0r8avH6LYEdo061qqtp2Ru+sMI00RAOwJVLHtEYeBCCZNSenvKuQFqq +yWpffRTsP0/RO+cCWog6FihLLGPBonbpatrv5XM= Received: from 78.179.251.164.dynamic.ttnet.com.tr (78.179.251.164.dynamic.ttnet.com.tr [78.179.251.164]) by webmail.itu.edu.tr (Horde Framework) with HTTPS; Tue, 04 Feb 2020 14:22:24 +0300 Date: Tue, 04 Feb 2020 14:22:24 +0300 Message-ID: <20200204142224.Horde.ZK4n1WEcHbpPPxcXot1uO7d@webmail.itu.edu.tr> From: avatli@itu.edu.tr To: users@dpdk.org Cc: volkan.atli@b-ulltech.com User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline X-Virus-Scanned: clamav-milter 0.101.4 at duman2.cc.itu.edu.tr X-Virus-Status: Clean Subject: [dpdk-users] rte_eth_from_rings: how to free descriptors X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" 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