From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8F1874261A; Fri, 22 Sep 2023 17:30:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11C7D40150; Fri, 22 Sep 2023 17:30:42 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id C880C4013F for ; Fri, 22 Sep 2023 17:30:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EOaWb08EIwXGKZuhOds846i2Kf0yt6IMKG/MMCIUjggxnJBsoMP3S8PcGGL4Qjiyf4iBQqzE3po8B5FqlQtRERpt/xfASG0Gx3i/6FLeh73VBzbUqoemYmFEmxqwxYIlQnRodyiAyBVjtYE1tc+s11TRUEUA5HaxWIjDJ3KUXCTU+t25G1mhMSYVUTSGgyUOcasjX7LD6BQaDU4ZfrChFUIXXmg+6rVaGR/V1CmoOh8VR7AypjFag6AXH+fN0VI+WEmj4b1+4opjHTZ9Fw0qkh9TggPhswODZA+7SIMrOdydJXvHlFCoMdDcankpm82OdcUIls0fOB2EIWeDP2H5xA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Weyxz795QrWM2DHCH8wqmeDBayg0DepyNgUXA/fgyUE=; b=hMol0ylqoYkr+pt4IGV2ryXqtBoeF7lYRmL3xZUblik+1JQ1Lj3VXOuQN/nSAovj3q1o5/b69fC0PuOk+0qs+KC3HZA2j0YWKR417btVO0VUYN36tElr+mU52xncQsM9tcsfoh3X/Z/k4ZW3ENY8aH0s10YDmMypeEz5JQa86V2P0cX/mDjUHq3wuQ27hY+s46pdurLUoGpuvSM4XITsWR+tyMxvBdbf+4m1QZc/YApugVxtj1J7ryr08mQ97L3qxt+mbXvfF/P6fsnmmE5Ql6f2Qv+ipHxFnFq6lCs1WIre6wU5Pr8V9I7/GwMs631NFWmcChBGcuOwhsNop+WvRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Weyxz795QrWM2DHCH8wqmeDBayg0DepyNgUXA/fgyUE=; b=FWk+FQwgYnr03XCMhUHz8tZieQNtJ4K97KuHvWZ/HU/P1pYqM7dRBHcbUjs61Pwm0p3KBarZnKY29/mnfvSmqquzzq34wHw1KwGAqoOYqjBPWC0pml+Rv4OBL+QtHliiRyDT09UxCW4b8DrkAMbTGWQuv6Dxg9k+NtozAkmRGJs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB5294.namprd12.prod.outlook.com (2603:10b6:5:39e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.23; Fri, 22 Sep 2023 15:30:39 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8%4]) with mapi id 15.20.6813.017; Fri, 22 Sep 2023 15:30:38 +0000 Message-ID: Date: Fri, 22 Sep 2023 16:30:32 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v12 0/4] Recycle mbufs from Tx queue into Rx queue Content-Language: en-US From: Ferruh Yigit To: Feifei Wang , Konstantin Ananyev Cc: dev@dpdk.org, nd@arm.com, Honnappa Nagarahalli References: <20220420081650.2043183-1-feifei.wang2@arm.com> <20230824073629.2577864-1-feifei.wang2@arm.com> <4c33779b-6c78-4578-a789-e73343a193c8@amd.com> Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm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/tXmA17nx+c2uR5jx8wb4j68umG2X++0dSta5eHAVhmtXvrqPW6Ku 3FQ= In-Reply-To: <4c33779b-6c78-4578-a789-e73343a193c8@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0694.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:37b::16) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB5294:EE_ X-MS-Office365-Filtering-Correlation-Id: af5a2eb4-b4be-40fe-2333-08dbbb80dfac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kLRrGR9oCRC5zLLaRZUuD46W9c3Ojk8VMV/1YP3qRJQ6BrVmkvLF7ssnfKzLW7EAchjkTuDB1yCXvel+DI2DVu76g6p9hbkKCcUAEnK3xhjjWh+sb1mP997NuG2B82hJ2ucoYQX96TW5zYKGPsuqzxoYE8I5HgAcl2dnfSD7YWmI55R09m0ByMB+454PbPeu3DHQmvaBQN/h1i+v9vzy16wbQC4iLMmIZCRZic6c1kc9SCWwmgHZncC0nN9zwbXPBcgvIUkhgkKKnMS+ZAemd7MItMLW6FTAPQqZjOuPwe510bXv2+zaWH3UNf+9ayVT0SRMZruY4coNplJw5WrtblwW10rCh0ACZjLH/48nX27Cwr7oBXzP9zGbk6HMf2/bRNVBdyeIngrVQx5NI7eHcjJrOY5LmDpVXc2AJtVc9aDJYhKiIF1LRFYZzHX5Ay3MYt/CGJz5L5VVkF4aobCRjMzwF4sJ/9Pzo2ju/gJovZuw7guQkb0rK9EfACYiBbrsiVlpDOwinROK/zBAMqbWKjjmfJneTimKxaKnwHWoTvVuxRyoRnseh2CDmOt4VkMpq9nStJkA/ugFbOAc5VSHaQ85uCADpBS0c2Adc8oXi59O140UkFm7RKbYk6JkwFTHsryfCCbUMrZzJJqQr1jxZJOWSnFy6wJbj7ZJaWzpE5B4IZeuoPx5AjRwFgn7YoRo X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(376002)(396003)(366004)(136003)(39860400002)(451199024)(186009)(1800799009)(31686004)(38100700002)(6486002)(53546011)(6506007)(36756003)(86362001)(31696002)(26005)(2906002)(478600001)(6512007)(966005)(6666004)(83380400001)(2616005)(8676002)(8936002)(4326008)(41300700001)(110136005)(5660300002)(44832011)(66476007)(316002)(66946007)(66556008)(43740500002)(45980500001)(414714003)(473944003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MGIzeHJVUE9ob2pMN3huRXVVR2NSeVhzK2RaTHhTaFFnRVVSSDNSQllOTWw4?= =?utf-8?B?WDd4QjhDelVFQTlWRVFKVGRJWStjdGE4dWllanFKVnZKd2dxWjREN1NadVd6?= =?utf-8?B?K0dKOEIxU3M2TC9yRWI1ZW9NWFF6NlJvSkNuaVJHbkJtd0tzUmt0S0hxZklx?= =?utf-8?B?eDNwNVROekpTLzREV0pTSzFPbERCRXZlVDVGLzdVcy9qYWlYQ2xycjVVVnVH?= =?utf-8?B?SzE1TkxkMHJHYW80QVg4anZUOGhXYTlxa2Q2QWNaTGg2ZkhGSjNXZ09SK3JP?= =?utf-8?B?M0t2TkI4WVl0NXBoU3RQSkNYUmRVdWg3cGVTaVl2RkZVcEtuWTJsSEdKMVlY?= =?utf-8?B?dkEycytMeFh3bG9SWkVMWldrd2FuL1NSRUZ2cVE3Vkpycmh3cGRwcmc5ZEV5?= =?utf-8?B?R2lrZU1oVGIwNFZPNnV1QnRmTUZyb001R0R2ZVN4a0lPVk5MalBPQzlxK29k?= =?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lRjMVBGSnd5NjE3?= =?utf-8?B?bGsxNE0yVDdMejFxMVZ2cnpxcTNXZVJtWWRxeTV3S1UvQkZsT3N4OFIrOE5Z?= =?utf-8?B?YUdxZUlHclpSYlF0b0RUdjVmVjl2OWt1RndhaUxrN2YveDdzbFAzMXlvaEJ4?= =?utf-8?B?cGl6QzBVM1o3ZHJkSkRNdkZlS0xrUGNQZHNFaUEzV1dXMk1aS1NRYUppOTlI?= =?utf-8?B?ZU9aUlhEQ1JBdC9TV2VpWTNXWGx3azdCR2Q2K2ZBUURFRGJibU1odlJ3ODdo?= =?utf-8?B?SVo3cjBlaGtLWm94eXBIcTNEYmh3N2JYWnZ6bDE1RTJRZHFlOUQ5WlMvdCsy?= =?utf-8?B?ZFd0NTZ2Y0t0K3U1TDl1c2g0cmw4MmhxcXpMa2s5NkRXZ3NQaGU3YnB5MERp?= =?utf-8?B?Z3d0NjltT1VYTVV6VzhzbFo4MEd3YnpXL01XMnFwdVJKa1NvbTRWL3lodlJK?= =?utf-8?B?UytzR0tZTStESGtEaDhBVGFubXdqalhkamZNQmZnWDVtUUswVG81bzBuNG50?= =?utf-8?B?enNwekNhU080TW5DZWQzM0pLVWE5aFVyeFV0Uk11dlRvZGxlM1FsYW9qaVp2?= =?utf-8?B?WXNWeWJiYzFSRHdYOFArN3JyWkozUko1ZFo0RVAxQWh6ZzZWUFhmZEdjOHVo?= =?utf-8?B?WnpmWHRLcFVUVFhBaWJ2YnlSVDdXVEl2ditlbis4RXRqR2lVYThSY0IwdXB5?= =?utf-8?B?OG93ejJhL3N0SGZoMzVZdzhubVFWNGp0YUhGc3gwY1A2NVd5UFBxZytpbEpM?= =?utf-8?Q?8lr7JKtyHADAsJ4XOaaxDule5?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: af5a2eb4-b4be-40fe-2333-08dbbb80dfac X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2023 15:30:38.9071 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tycqO0ODEGptidSVJkW5ptnvXWFvEJLK7ffjvT25kDeP0bfw8vOkxcEaP1CauTnu X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5294 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 9/20/2023 2:12 PM, Ferruh Yigit wrote: > On 8/24/2023 8:36 AM, Feifei Wang wrote: >> Currently, the transmit side frees the buffers into the lcore cache and >> the receive side allocates buffers from the lcore cache. The transmit >> side typically frees 32 buffers resulting in 32*8=256B of stores to >> lcore cache. The receive side allocates 32 buffers and stores them in >> the receive side software ring, resulting in 32*8=256B of stores and >> 256B of load from the lcore cache. >> >> This patch proposes a mechanism to avoid freeing to/allocating from >> the lcore cache. i.e. the receive side will free the buffers from >> transmit side directly into its software ring. This will avoid the 256B >> of loads and stores introduced by the lcore cache. It also frees up the >> cache lines used by the lcore cache. And we can call this mode as mbufs >> recycle mode. >> >> In the latest version, mbufs recycle mode is packaged as a separate API. >> This allows for the users to change rxq/txq pairing in real time in data plane, >> according to the analysis of the packet flow by the application, for example: >> ----------------------------------------------------------------------- >> Step 1: upper application analyse the flow direction >> Step 2: recycle_rxq_info = rte_eth_recycle_rx_queue_info_get(rx_portid, rx_queueid) >> Step 3: rte_eth_recycle_mbufs(rx_portid, rx_queueid, tx_portid, tx_queueid, recycle_rxq_info); >> Step 4: rte_eth_rx_burst(rx_portid,rx_queueid); >> Step 5: rte_eth_tx_burst(tx_portid,tx_queueid); >> ----------------------------------------------------------------------- >> Above can support user to change rxq/txq pairing at run-time and user does not need to >> know the direction of flow in advance. This can effectively expand mbufs recycle mode's >> use scenarios. >> >> Furthermore, mbufs recycle mode is no longer limited to the same pmd, >> it can support moving mbufs between different vendor pmds, even can put the mbufs >> anywhere into your Rx mbuf ring as long as the address of the mbuf ring can be provided. >> In the latest version, we enable mbufs recycle mode in i40e pmd and ixgbe pmd, and also try to >> use i40e driver in Rx, ixgbe driver in Tx, and then achieve 7-9% performance improvement >> by mbufs recycle mode. >> >> Difference between mbuf recycle, ZC API used in mempool and general path >> For general path: >> Rx: 32 pkts memcpy from mempool cache to rx_sw_ring >> Tx: 32 pkts memcpy from tx_sw_ring to temporary variable + 32 pkts memcpy from temporary variable to mempool cache >> For ZC API used in mempool: >> Rx: 32 pkts memcpy from mempool cache to rx_sw_ring >> Tx: 32 pkts memcpy from tx_sw_ring to zero-copy mempool cache >> Refer link: http://patches.dpdk.org/project/dpdk/patch/20230221055205.22984-2-kamalakshitha.aligeri@arm.com/ >> For mbufs recycle: >> Rx/Tx: 32 pkts memcpy from tx_sw_ring to rx_sw_ring >> Thus we can see in the one loop, compared to general path, mbufs recycle mode reduces 32+32=64 pkts memcpy; >> Compared to ZC API used in mempool, we can see mbufs recycle mode reduce 32 pkts memcpy in each loop. >> So, mbufs recycle has its own benefits. >> >> Testing status: >> (1) dpdk l3fwd test with multiple drivers: >> port 0: 82599 NIC port 1: XL710 NIC >> ------------------------------------------------------------- >> Without fast free With fast free >> Thunderx2: +7.53% +13.54% >> ------------------------------------------------------------- >> >> (2) dpdk l3fwd test with same driver: >> port 0 && 1: XL710 NIC >> ------------------------------------------------------------- >> Without fast free With fast free >> Ampere altra: +12.61% +11.42% >> n1sdp: +8.30% +3.85% >> x86-sse: +8.43% +3.72% >> ------------------------------------------------------------- >> >> (3) Performance comparison with ZC_mempool used >> port 0 && 1: XL710 NIC >> with fast free >> ------------------------------------------------------------- >> With recycle buffer With zc_mempool >> Ampere altra: 11.42% 3.54% >> ------------------------------------------------------------- >> >> Furthermore, we add recycle_mbuf engine in testpmd. Due to XL710 NIC has >> I/O bottleneck in testpmd in ampere altra, we can not see throughput change >> compared with I/O fwd engine. However, using record cmd in testpmd: >> '$set record-burst-stats on' >> we can see the ratio of 'Rx/Tx burst size of 32' is reduced. This >> indicate mbufs recycle can save CPU cycles. >> >> V2: >> 1. Use data-plane API to enable direct-rearm (Konstantin, Honnappa) >> 2. Add 'txq_data_get' API to get txq info for Rx (Konstantin) >> 3. Use input parameter to enable direct rearm in l3fwd (Konstantin) >> 4. Add condition detection for direct rearm API (Morten, Andrew Rybchenko) >> >> V3: >> 1. Seperate Rx and Tx operation with two APIs in direct-rearm (Konstantin) >> 2. Delete L3fwd change for direct rearm (Jerin) >> 3. enable direct rearm in ixgbe driver in Arm >> >> v4: >> 1. Rename direct-rearm as buffer recycle. Based on this, function name >> and variable name are changed to let this mode more general for all >> drivers. (Konstantin, Morten) >> 2. Add ring wrapping check (Konstantin) >> >> v5: >> 1. some change for ethdev API (Morten) >> 2. add support for avx2, sse, altivec path >> >> v6: >> 1. fix ixgbe build issue in ppc >> 2. remove 'recycle_tx_mbufs_reuse' and 'recycle_rx_descriptors_refill' >> API wrapper (Tech Board meeting) >> 3. add recycle_mbufs engine in testpmd (Tech Board meeting) >> 4. add namespace in the functions related to mbufs recycle(Ferruh) >> >> v7: >> 1. move 'rxq/txq data' pointers to the beginning of eth_dev structure, >> in order to keep them in the same cache line as rx/tx_burst function >> pointers (Morten) >> 2. add the extra description for 'rte_eth_recycle_mbufs' to show it can >> support feeding 1 Rx queue from 2 Tx queues in the same thread >> (Konstantin) >> 3. For i40e/ixgbe driver, make the previous copied buffers as invalid if >> there are Tx buffers refcnt > 1 or from unexpected mempool (Konstantin) >> 4. add check for the return value of 'rte_eth_recycle_rx_queue_info_get' >> in testpmd fwd engine (Morten) >> >> v8: >> 1. add arm/x86 build option to fix ixgbe build issue in ppc >> >> v9: >> 1. delete duplicate file name for ixgbe >> >> v10: >> 1. fix compile issue on windows >> >> v11: >> 1. fix doc warning >> >> v12: >> 1. replace rx queue check code with eth_dev_validate_rx_queue >> function (Stephen) >> 2. put port and queue check before function call (Konstantin) >> >> Feifei Wang (4): >> ethdev: add API for mbufs recycle mode >> net/i40e: implement mbufs recycle mode >> net/ixgbe: implement mbufs recycle mode >> app/testpmd: add recycle mbufs engine >> > > Thanks for dedication to improve the patchset and finding better > solution, it is appreciated. > > Series applied to dpdk-next-net/main, thanks. > Konstantin highlighted that there is an outstanding discussion: http://patchwork.dpdk.org/project/dpdk/patch/20230822072710.1945027-3-feifei.wang2@arm.com/ Dropping the patchset from next-net, and updating its status in the patchwork as "Changes Requested".