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 849DB43A0E; Tue, 30 Jan 2024 15:34:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1EDF9402CE; Tue, 30 Jan 2024 15:34:53 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2089.outbound.protection.outlook.com [40.107.93.89]) by mails.dpdk.org (Postfix) with ESMTP id 6FAFA402CD for ; Tue, 30 Jan 2024 15:34:51 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KcHSky1kM5vEWskuZ7nYKkOd5jcemHvcPE5ZlwTNSal6+KGtfErHS8uXH9SXpicJsT3b5bVNosvkvJf0ilyzBW5FoXZBdSicCpTePxFQthN1PPlPofM3VfyGbA184mtzoYBaPZg8m3i5+0gNf3tK3BOj9Ld+Kd3pb9hljGf4nhj6kjB5jX8XdD/AYGVLADcnp09dODncmiWlMNAK9rnDzRKNU65CUIHPYCbGnmzY9+9Ba/kd9k06IECnZACjSlwT6bdqOJ1/lN0Gs95nNQBXDmKJGOJXZA2naC6jqFKgomTDmJkDT/ZMrO9jeDR/znQ+A5M6upszCuLUYj4dQCxI2A== 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=Yqlrmkzy0jeQSFbcfwtO+nVy4l9sRuKBj2+8oVqHMug=; b=gsTx10bcqhgmPAj/p+RPxppHxd7VH2Yn2MRG4nS3KnpaSfoHU5eup6FuLfyIKFgqy5DfIHrsgehZQILO8p8DC7GmxajicJFQqod044c0Stcl+lBYXd6k1c7hLO9zIgTYl45BB2CL1+UjS2WrlL6HojZlHswmn7jmjYXhnw08hZuJGWh9eJMQ+DhN/D2VlcJ8ijaeNIgijwlSC/LOSKEX64fAFStMAelcDQ63RHiKxEvDbEVMD/pcGxQ8muvBLGv8N7sCEHgVKUs5oGVKxk28QGX/LmhwKXbD9lVV5devhLH+Jjv3eARCM4Y+Nwta5Ci4bcSoUxe8iyvBpuXEWvkEHQ== 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=Yqlrmkzy0jeQSFbcfwtO+nVy4l9sRuKBj2+8oVqHMug=; b=YsppmU/ZHnPVXWkKsAStS7LYPoOWR5RlwMGdO3ktZcYCO48wiXoV4w8Z1mOGbFrdJ3Q+tV+OR+dpLInbv8+vn8QBqZBRNJdW1SQTTDyjzfsrxPsseMl+N9tUzrM/GgDLk+mxPyIyuAC7hzVAs5e3DeIS50/ixn3vvIgfY9amG+g= 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 LV3PR12MB9141.namprd12.prod.outlook.com (2603:10b6:408:1a7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.34; Tue, 30 Jan 2024 14:34:48 +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 14:34:48 +0000 Message-ID: Date: Tue, 30 Jan 2024 14:34:42 +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> <62e78a2b-4827-030e-713b-28d671b2dac3@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 AQIe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l+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <62e78a2b-4827-030e-713b-28d671b2dac3@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR0P281CA0152.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b3::7) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|LV3PR12MB9141:EE_ X-MS-Office365-Filtering-Correlation-Id: d098f768-e821-451c-1665-08dc21a09bbe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4D9yhDuqhrPPkgop+Kdm287oSq7aRdh6Vw0K98bQjKzFsYbvjvDqcWM4iR2GxdyXICYqZgXVopXTfJ7AVTHMGRKcz5eh1pddOGPdgThTeoTgCmlBuZquGBVMc+2R1r0LsYwU2pt9Rfik1n9diKSD53S9aVuLLFVSbac5iUsMG/GmUDvOvtA+wt6o3m+jJ1rbcSszgjQwERP0zVRzDSXutCzlUclPFcoQDiEYNqXxV35jOaB9RHo6OkYXPHzr06KGQGqjAt6R7F/ROD2OyXatVpv9PQjFgcTDWMrZexxJ/weIKkO72L2J2hPU1CbJpEG0OEjfOaO6m4dY5hZ4yzyIHauXg4zwB+/r7HbDBH5nTLg2QMdjwjcRscAuu0uBgat5ZKCd0tYe9vfVPbrtx3cGI29zxw28mswJaoo15hV2/jpoK0QRJPcfZHNBE0m9oFibfCusOzlmxYw1cNKsuuE3Uykgy0sGd6ZIBg6cpNdfvxNVY9d7dd1N2x4aZDYyRd4P6SV1SB4ZGkDH/FgtmezKj8LPD0WhoZKNsR/MS/WeWMUjF5HTMTCj6ep6BWomKsAJAQxLOCFxf73+zP8Vd2SdH2czblXn2anTFu3zPbkIRuAqJZ7twg41yKCKQ32xfILE/bx5QJrRgcEF8r1mzSo4+SCjHSMzrQcT7yF4Q1uUyyudGf3dqN8VjjbZ3OBh+pGP 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)(39860400002)(396003)(136003)(376002)(346002)(230173577357003)(230922051799003)(230273577357003)(186009)(1800799012)(451199024)(64100799003)(6486002)(86362001)(8936002)(2906002)(36756003)(83380400001)(54906003)(66556008)(6506007)(6916009)(316002)(53546011)(66476007)(66946007)(8676002)(478600001)(4326008)(44832011)(6666004)(26005)(31696002)(6512007)(2616005)(5660300002)(41300700001)(38100700002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RjRUVS9lQ0hPWS9vclJaRThySTg5L2MyclU5aU9Td092dHNvbkRlR3JpeGh2?= =?utf-8?B?SFY3NUViOGMwbWtzdTlweWltS3hMcnl5SkNXMC9ENVJhY0V0K01xZUUvZElu?= =?utf-8?B?YlZ1a0tJYkdEY2FPMEcyT1FyeUpPdWl1STNDaC9NYXZvQldYcThGaWhncGdD?= =?utf-8?B?YWM5ODZtWVhpSkIyL3pwbm5VTHFuZHRlU1JLNXQ0dEx6dk5FQ1UvZk0zdXU5?= =?utf-8?B?cHhTQnNtRk9HSHVOZlRSOGxqRW1TWU5SSVI1TEgwL290S1BPZ2tKallvdDJ0?= =?utf-8?B?ak9TNWxzZlNVRDZ4OC9FZXRibktVRktVa1cwTXQ3ZUtCa0hGamRDemVlODBr?= =?utf-8?B?OVdlaURQditlYTBVZ2NjUHF4bjk4MElhUElpekpUanNKVGNpaFBVOW5uTSt6?= =?utf-8?B?b0RCTCtHZEJ3NG9z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1g5RkN4M0txTEhWSFJPODZuUlY0TE9va3poQTZRdFRVTFNBejRtSGZNWnMr?= =?utf-8?B?TnZVS3pPUjBzb2J4c0hUUDViMmNoMkFtbmVTamtyM0oxZjZaVkR0STREUm03?= =?utf-8?B?YW1pNEVsTHIxYllHUElEc1k0aUdBTmxBRk9GeXlrTnA2elRlOS9mMGgwRUU5?= =?utf-8?B?bDhiRmlVUEVpNnU5cFBpRy93Y2l1VTh2RWtVa2ZGd0Rzc2tPR2JEUHZES0s4?= =?utf-8?B?aHdVTzREV3pqNEpNeDRDRHZVbWJlTytvYkFJNEpXM0duelVnbUxPaWMxU29O?= =?utf-8?B?TC9ENUlXM0hDU0RhanRDT00zMTNpL3FXT3dQUmtLcVBsUklQZXMyMTlid0pG?= =?utf-8?B?TkVuTWdnRTl2ZE9iSE9CUTN0RnJWMXZneVQwRXhDSVhXOFhhanREalNqZmVV?= =?utf-8?B?NGQyTUdBdS9VNVJCeFkwZE9GaFRlTjRncVUrN2hvWC9acElBRG9rU1VyWVZV?= =?utf-8?B?Y2ZUbVpBYko5dkE4Y0dsbjgwdzVFUGxDWXJMY2tOK01CS2ovbElUbTZ3NVF3?= =?utf-8?B?aTdnNjNLOG1peE1ZaGI4MExXRXRRaXZmSUlKYUhZb0d0aGNNYVFIRHlZSTRP?= =?utf-8?B?ZGxma1Z5OHRuWDlTUU8wN2JPTHNqRGdhaldqR2FxOUZmKzZISUtQVFppSHhI?= =?utf-8?B?ZW9hUEhLY1lzTy96aUc4dzBjODV6K0Y1eDQyZjJ1bUdvWHhrRlpZM3ZZUzRQ?= =?utf-8?B?eUdMV1ZmRW5hZXhvbmxNSDdic2ZHRFU2VzZPUEFNQW5jSHd4ejMyS1owemFx?= =?utf-8?Q?0o8c=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d098f768-e821-451c-1665-08dc21a09bbe X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2024 14:34:48.4818 (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: zSbfnFqS3jUWxoXngqRtJ2KP2cVO2qPB9sRS6MYhPQQESuQjmTdx8JiA4VtzdRL1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9141 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/30/2024 12:46 PM, Etelson, Gregory wrote: > Hello Ferruh, > >> >> 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 >> } >> > > The flow template API was designed for performance. > Application that implements the flow template API expects high > flows insertions, updates, and removals rates. > Locks are necessary for the table resize API. > > During the monolithic resize, application has no control over > PMD locks. Even if resize and each update operations are > relatively fast, application should expect table lock collisions > in rules insertions, deletions and updates for the entire > resize-and-update-and-update operation. > > With the separate resize API, lock collisions are expected > during the resize phase only. > After table resize completed, all flow operations will obtain > a lock without collision. > Also, application does not have to update all flows at once. > Updates can be executed in batches scheduled by application. > Another use case: application can increase a table, > offload all new flows and run updates while hardware handles > network traffic according to the new flows scheme. > >> Perhaps questions is, is there a usecase that user does the resize but >> doesn't want to update the old flows? > > Please see below. > >> >>> 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? >> > > Table resize API do not have any effect on running flows. > PMD uses the same procedure to create flows before and after table resize. > All flows instantiated from the same type before and after table resize. > > Flow update that follows table resize manages PMD flow object location. > In MLX5 PMD, flow update moves an object that references a flow > from old table to a new table. > After all flows were moved to a new table, PMD has no need for the old > table and it can be released. > > Since flow update manages PMD memory only, > application can ignore the update operation > if it does not care about effective memory management. > > PMD can release the old flow table after all flows it referenced were > moved to a new table only. > Event that notifies PMD about empty old table can be ether internal > or external. > Internal event assumes PMD ability to track flows in a table. > External event in form of application call is more general approach. > > Application must call resize_complete after it moved all flows > to the new table. That call notifies PMD that it safe to release > resources related to old table. > If application did not update flows it must not call resize_complte. > > Application can create new flows after table resize > regardless if it managed PMD memory with update and > resize_complete calls or not. > Thanks for clarification. So, by design, driver will keep the old table when it is resized. - Can this have a performance impact, like when rules updated/removed/inserted driver will need to look more tables? - Or can this cause additional capacity complexity, like total number of rules will be sum of rules in all tables, but new rules only can be added to latest table, so number of rules can be more than size of latest table. - Or user can add more flows after resize() and this may not leave enough room to update old rules to new table, what is expected behavior for this case? - Or if user did not updated rules at all after resize(), after each rule deletion driver won't need to check if old table emptied and needs to be freed? - Or can user call resize() API multiple times, causing driver to maintain multiple tables? How much memory overhead this may bring? 'rte_flow_async_update_resized()' API is called per flow, won't this force application to trace which flows are created in new table and which are in old table, so pushing additional work to application. Or what will happen if update() fails in the middle of update, should user retry, should PMD restore back the moved rules? I understood the logic behind the dividing responsibility to multiple APIs, and it makes sense, but it brings above complexities, and more work to application. Can it be possible to have monolithic API but only resize() part of it is blocking and update() part and later remove table part done asynchronously? I will also put more comment on the patch based on latest understanding.