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 6966043A08; Tue, 30 Jan 2024 09:58:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1539340395; Tue, 30 Jan 2024 09:58:54 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2081.outbound.protection.outlook.com [40.107.237.81]) by mails.dpdk.org (Postfix) with ESMTP id DA7E34029A for ; Tue, 30 Jan 2024 09:58:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B8mAZ+yJDdOawx2vqHnqj/+ewRNgXtFn3nvyanjtSNIUOq5sqOQ6pBIVsz9+MNxSmj5O+JYm7ZjI5ks+M7ijhqxnwFqaox8/5nxCSa9/Gqhj2T+pxZ5LIR5+EZmCDhyMrTBSPPC3o22sTMrrpx5AEbt3khIOQMUIEFyKDmDgMiz7UVvlDhH77MyEk8C6pXZFqqsKgDAXAOe/3muFOucBDD/MmFontT+OFqqXzxDjLiI32POJZsDi4m2e1LyJQ5ztqJ2gWXwxF4tS8m4DFAFc6ifFwHXd2Ci5KOMcom/U+n8dDuJ9jXM9BLrbM6H1mqGKNzBV8DIwzgiVQByRjcm6eg== 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=ZDIpKetTF3fKEqoaQSpNfD4ykqB2fGp0T3lYLDr+u7o=; b=PsJllTQjud88t13OX+l7adl++D1nOzzKZGI4+aWNk97nKng2wAK5ef2QSsy8iBC6TKiVTNKrb07kErjr2WuH1S+bZ5oJnTX1RcXXEOg4yKutpA+M9ZroFB05J+N/G7rrKk3MI9VAE7UlhufaqA5sisJ9VE32gDa7MzGdqeKYWd0nMDblr/TRxjcQ/Cl4hLL5DJw2FVy1YbHJDgGfOspbVZEr3Mp3VsUP1BVqWhVClQwI8ro9UTb3q5KA9izXAwkJ0iO0zpyoyfobWikTklh5NsFnOgX68pYZIhpsWCX7H8vrcO6mfad5fchKJE6I2Hj11sELd9UPsU7TSyP+P+7JbQ== 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=ZDIpKetTF3fKEqoaQSpNfD4ykqB2fGp0T3lYLDr+u7o=; b=uRJU7AZUbtdo5olSBgVd47At6Zj+Xh9wGCrQlMpA+HKQ49JsWG3nTtI3hdYRa+I+JVGA2/JUM/g1uH+oiB9rKih4+ZEm58yV+7YCIXNuMVf4UWuJ9+fwZSDMeBzBix1nj84OYKBXQKi5m98y44Y1xdMIJfidexUhccJAE3+tZBg= 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 SJ2PR12MB9162.namprd12.prod.outlook.com (2603:10b6:a03:555::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.22; Tue, 30 Jan 2024 08:58:51 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f%4]) with mapi id 15.20.7228.029; Tue, 30 Jan 2024 08:58:50 +0000 Message-ID: Date: Tue, 30 Jan 2024 08:58:45 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ethdev: add template table resize API Content-Language: en-US To: "Etelson, Gregory" Cc: dev@dpdk.org, mkashani@nvidia.com, Ori Kam , Aman Singh , Yuying Zhang , Thomas Monjalon , Andrew Rybchenko References: <20231217093205.321082-1-getelson@nvidia.com> <56337607-a330-0967-e99c-32a6f6e9f058@nvidia.com> From: Ferruh Yigit 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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e2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <56337607-a330-0967-e99c-32a6f6e9f058@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR5P281CA0028.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f1::10) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ2PR12MB9162:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e481569-b01b-4dda-2acc-08dc2171ad74 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jj4TMlFzkin2dCOgM/cCVhV5TpG8MfjpWPKpSq5DwD7tZZoy3VY+7oyGxSwlxjrA4UldP7B0ujLcpRMBcD+SsF5C1zKOw2MgIXZCtQxruFYVvh84+3UBXNtaSj1IDTRms7vmO05llH1j6D+uKPdsChT4uALt/oqglUAEku47P27WW6AjXCQ1jL8BfSWIJ46Pd7yNmzI4sH2yxFTxpYPgH1ofDK72Yk9G9TjfJpdDDslayWEturNz22MiVQpQ9NhYmNGv3tzo7yCtpSyKpipcDQ4jzsyOPVBmwkgmdrJKHsdHREoMkL85kCwGbeLxeDjRcblZyW215C8jlGux+4YbUi8vtE0mi8nWa4LiaUrD23nmmr5+S/JzmrmH0cI4qO4QMBQQCfBRtl4/0Q1CCLXM9Yeh0Fpi92uxciTbR2Y3OZlyjQ2gt2tB1yueOdT9u8+StK7tqFZHB22KFzGR3buFkaZL77UUl5/pcQhwZ9G2YEtDv9y62mVFQki+uuAwTtW4NuRvhUlk/XW+NmHWv0n3/gmQESjnzXl9VWzXqhAkt5LZAfabwPy1Q9iZ+Al/qE9K00jvHREWt0Z/wwGNd78OGmjr8kSRLW6JfoM/12wm7pYxGynCnyr3OhLLuBGR0Z3c93yI9wRdYsU3lWsosVZAIw== 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)(366004)(136003)(396003)(376002)(39860400002)(346002)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(8676002)(4326008)(8936002)(44832011)(2906002)(5660300002)(31696002)(86362001)(66946007)(66556008)(66476007)(54906003)(6916009)(316002)(36756003)(38100700002)(53546011)(6506007)(6512007)(478600001)(6486002)(6666004)(83380400001)(26005)(2616005)(41300700001)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YzVzdkdBcFRyTmhoMHpuZUhFbGYwL2RCRk5KL3RHK280WE4yWlArWnJLVjFn?= =?utf-8?B?Tkt6SHlhY3lpZit1eGRFS0ZneE56Q25ON1ZQL1NWZHBaT0NPNmpubHpNVHF6?= =?utf-8?B?UUV1N2xKZncvcE9LTTVyajQ1UVRnM0hoajFVTUphZUFKRGpDQWpEOGMxR2U1?= =?utf-8?B?K1NFTDNmWE9UVHBiZ29EV2lWWkYreWVjYlpMYTJoMFFIUWxUa2pDZVJIa0xn?= =?utf-8?B?aEluQXN2dHBRQUlMOCtNSVBOUTROVHVlV09DM3ZSbmRBMnZCbHpZeFcxSXNu?= =?utf-8?B?ZUt0elVXalVSU1hoNXRHdE9lb293akRUNmtlWlplSkFweHNQYUVlbllWUVY5?= =?utf-8?B?V2VhZlFmNFRpYWJTY2FFZzJHMDYrSDBrS096cFp4RDNDRzN0aE1CWFNxOEZO?= =?utf-8?B?TncxbDF5M2ZxcUtTa1RzRzdVRUVQMHZGQVFyNXh0NmREN0pndEJhbUt3NjlW?= =?utf-8?B?OEl6eGUwbGVBUktiUHplUDlPV2MyeHpXVnN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EZ5VGJGcHNTZG53TTdFN2R0b2pjeEVo?= =?utf-8?B?SktRcDNlWDltb2FIRkxEL3R5MktxZjN5OVd3UldicXpJM2tUWWVNb2oxMVk0?= =?utf-8?B?TGlOUU5sOVRPWEpicHFlQmRDVUJCYVhRRzdmdDd0Qm92UlE0NCtQWlpRV2or?= =?utf-8?B?WElHbmxQTDR6QzNJUXpPQTR2bnh0NVVsdXVmQ3JraURHSkNuYkx0WlFHRU1y?= =?utf-8?B?RUJUTUU2NlJsMUU3ZlFPclV0N3VpWkhTVC83YWRKSFpLR0RxM0o3TVZBc1VM?= =?utf-8?B?LzdYSUhJRGx1REN3Kys2aVJyUXpNK0FMOVc3aDBzcW54NXkrMkZmZ0pBUDEv?= =?utf-8?B?S1ZlRExhRktCZ2xsUGxBdTVrbG5QREszbE9RRTdMWnQwTFdUU0wvNW93Z3gr?= =?utf-8?B?bkdPLzNKcFNxaHUzQUU5bHZYS1NzYTZaNk5GenBodklPQmhaYWZUd09CMVpr?= =?utf-8?B?NnltZlVWam1jMk8zMmpIeGptZ01MejVKRXFjNW14UlhrZTB2U01oOTFFSk9P?= =?utf-8?B?M0hDeVB0SlJ2dUVoRFh1Yzg4dkZGTnJkM3pVcGdWSnViRmdLRWRWdThZU2J3?= =?utf-8?B?cVo2WHV6bHNjaG1zakdwSHdmK3pUOTJBaEQzYU01VkQ1ckpRYUpsaFdCcUVi?= =?utf-8?B?RDcvT2xSZ2lNUjIwaXlCdzBieHVDbUV1b3NGWDRTS0kzbFFRVVducWcvRnNi?= =?utf-8?Q?2ZIgIlT8YvvMSJ47CLb/nU7BJ?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e481569-b01b-4dda-2acc-08dc2171ad74 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2024 08:58:50.8474 (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: c0jkK0o4yJfoJnVvnnXXazMG9PIg5nLuKcWiB5nr1dq8ybsQdftd0qFrmVXAmXJT X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9162 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 1/29/2024 3:08 PM, Etelson, Gregory wrote: > Hello Ferruh, > >> >> Hi Gregory, Ori, >> >> Why we need three separate APIs, >> rte_flow_template_table_resize >> rte_flow_async_update_resized >> rte_flow_template_table_resize_complete >> >> Why not 'rte_flow_template_table_resize()' update existing flows and >> release resources related to the original tables automatically? >> > > > Template table resize API allows to add new flows immediately after > rte_flow_template_table_resize completed. > A multi-threaded application can add new and update old flows > simultaneously. > > A single resize-and-update API would require to lock PMD for entire > operation. > For application with 1e6 flows doubling a table would end up with > considerable down time. > If a multi-threaded application can add new and updated old simultaneously, this should be done via monolithic API, like: { lock resize unlock for each flow lock update unlock } Perhaps questions is, is there a usecase that user does the resize but doesn't want to update the old flows? > The rte_flow_template_table_resize_complete was added for PMDs that > cannot differentiate flows created before and after table resize. > Can you please elaborate this? Does it mean old flows and new flows require different handling and PMD doesn't know how to differentiate old and new flows? If so how update() converts old flows, there must be a way for driver to differentiate them for update() to work. Also if resize_complete() NOT called at all, does this mean PMD can't handle any flows anymore as it can't differentiate old and new ones?