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 85EF7A0535 for ; Wed, 5 Feb 2020 00:22:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 581961C222; Wed, 5 Feb 2020 00:22:55 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2043.outbound.protection.outlook.com [40.107.20.43]) by dpdk.org (Postfix) with ESMTP id BD96E1BFAD for ; Tue, 4 Feb 2020 08:53:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TNPCn5uSnmjsTJv6r592ZTYNyQD/C570GjSK3FLe2THMPWn7i4/cakL2OaX9WULTX0mJ6cuL+XTsQiAjrjeAkSx+l3I+2W5qV7YXmaTCZ45DLYzkhiSwsl9QT7cJzF3jgJ7pQUCI+8MdEFSLz/7fX4Yn/Dq0jnxc8Y9K/6dj5R7bdTCNBjKtjbjkMGC2LhrDedK38qidlCK5yv8eu4B0o+9nropkHvi4b3J9poCnQhssBWr7SHZUASpnFfDs2WuBjfCo4U0wYOMn4lGrnLeWj3utnWm1Z5omRZg0BY2/sv5gI6R4l42TXWtWmhkBV6Tgx/Lxx35WhILqWjc8pgvgkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lFr2aMLg4O35JPa/EY6te0dvT/zO4pXi/aK33lkylyQ=; b=bVAxKSVMA5XzQQScgpYIM+mpdcpB48wAViRxCKu7GQKa0g+3pMXrTeOANxP2aIhY4+fLgMv4J7J7EwTGNvQ1bBZNFjiOmCwHMRnV3vkZzBujugNmo1PCLvB862EcaeCglokmQ2zx/1RD25q1ghRcgGxC7s4nSEQcSNs65g2dOfTg/9tig0aeDSBL2hwSyNZt/mobz7/LiBHF7igQQn9GUF+UIz9L2YB1EsnuC8zQTol/3u6tPs9hn56VCG1YBUEIGXCJTjWaaB0+IACTAxxqrvNjCK9BoRfJRzgtQc97fPDUbnpyRtEnuTI9yU3+dtQRlWdBTpldgDCqo8SmKGrFvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=b-ulltech.com; dmarc=pass action=none header.from=b-ulltech.com; dkim=pass header.d=b-ulltech.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tacirler.onmicrosoft.com; s=selector2-tacirler-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lFr2aMLg4O35JPa/EY6te0dvT/zO4pXi/aK33lkylyQ=; b=BNNVmy6XUgp8cehcAaqhHSvG9t1WO6n7zhpc/Bc8n6b1JAfVHvnLxX3bIcY2qplIR1S/OWMtAFsTq2Zju0OepbXesfpNG4+NDHJM7wb0pwg48XV2FpQmeNc9cdoiJZteX5BF/bajraku3bwXGYlQE/jY7wEjMzAcjCWD5O+wnHo= Received: from DB8PR08MB5449.eurprd08.prod.outlook.com (52.133.242.16) by DB8PR08MB5001.eurprd08.prod.outlook.com (10.255.16.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.21; Tue, 4 Feb 2020 07:53:48 +0000 Received: from DB8PR08MB5449.eurprd08.prod.outlook.com ([fe80::60a0:c783:ee3d:c036]) by DB8PR08MB5449.eurprd08.prod.outlook.com ([fe80::60a0:c783:ee3d:c036%6]) with mapi id 15.20.2686.034; Tue, 4 Feb 2020 07:53:48 +0000 From: =?iso-8859-3?Q?Volkan_Atl=B9?= To: "users@dpdk.org" CC: "avatli@itu.edu.tr" Thread-Topic: rte_eth_from_rings: how to free descriptors Thread-Index: AQHV2y7Ydwspm2w4oE6Ns/7+6KpEhg== Date: Tue, 4 Feb 2020 07:53:48 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=volkan.atli@b-ulltech.com; x-originating-ip: [78.179.251.164] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 738b3d83-d829-4d2b-8e5e-08d7a9475e4b x-ms-traffictypediagnostic: DB8PR08MB5001: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 03030B9493 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(39860400002)(366004)(136003)(199004)(189003)(19627405001)(2906002)(478600001)(6486002)(71200400001)(66476007)(86362001)(81156014)(8676002)(81166006)(8936002)(5660300002)(186003)(26005)(52536014)(4326008)(33656002)(6506007)(76116006)(6512007)(66446008)(9686003)(6916009)(66556008)(64756008)(66946007)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB8PR08MB5001; H:DB8PR08MB5449.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: b-ulltech.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VV+vqT0baXc46UyMq23bBSBn+XkAVmaITZd7aww60PsfZSDtqgERr5d27k6uU9uIsBfVpCw6XblSnpcbdc6Hy/RHQ0qzxBioEnyAANg1GfPMulWtvBvNz/GM/PqhYJalyvgpxTCInkXGvEFjRM09hXCN9FGX9Eg7kQIcVbVrQ1kHpHZJGVmdbvZpJwEYTGA0qLWUWj2TfGfmnFny13kghJ4RUH7Ao0C3rBcAxm0DwCkgNcSZsgTeG0aR5+4Atf6b/A+zI0v8S4m7HnqWUc+qR9j9M2uXqBD9yBVEhk4OH8NeOW6XuJ0ukBBrBDwAA08Jv3TJq8DGfU/388gMtvv6s6u9QSpEncursUZWKHPBy7t1Eh/6c9gJ33QOePahXSZenCeNXPHDwL9QwV+uXRWCXygo+fxDMYnzxWz245BSUKo+qYu7OxvtaKR1aPrbV2ni x-ms-exchange-antispam-messagedata: dhF/JmXCS68oaS08HwCO6gR6r9xZR7yPPhN9uf7x7c6Qh29FMofpZNNaCS/VxIpLPySvB/hCL0ZR0xcVENC6km56QKozmkG96sfn9mSFu/W60Z2kzUI81ahNXxpFyQyU625iiKZi20kIZqIlZ39KQA== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: b-ulltech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 738b3d83-d829-4d2b-8e5e-08d7a9475e4b X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2020 07:53:48.4801 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 42185048-44ea-4757-bc9a-05cae8373e98 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +m83mDapfoWpb7m61sJlbwUPNM/20o7XVMil1hQdDubYzyaMO6SJ0m78pDf8aCi/EWdynr4qVNA/VakBsgBy7QT62b4U6jDIq228mXfV8Tk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5001 X-Mailman-Approved-At: Wed, 05 Feb 2020 00:22:54 +0100 Content-Type: text/plain; charset="iso-8859-3" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 fro= m an Ethernet device. However, I don't understand exactly how rte_mbuf des= criptors 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 se= nt with that descriptor. As a result, I do not need to free rte_mbuf descri= ptor 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 t= o copy the rte_mbuf from pseudo-Ethernet port (created by rte_eth_from_ring= s) to send to a real Ethernet port, otherwise it will be freed twice (in th= e 2th and 4rd below). Is there any other way than copy? Please correct me i= f 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