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 2F3E843ADC; Thu, 8 Feb 2024 13:46:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF53C4028B; Thu, 8 Feb 2024 13:46:53 +0100 (CET) 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 152ED40278 for ; Thu, 8 Feb 2024 13:46:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oSYljTHEpLO9HN+xZ0YLCRnogOGaC44kkek4BmeaapHdoQdWKPqRMEo6Ko5e03BozEtPd++6Za9MpE9gr7rXK/qP7Gsz3aa3hm7LVcMngW5bCc+W9CGBADDN/ccngaZsg8IsRk1H3GAXq0N2LAN5hK7H/jig3SWj+II4iW342Rf7EqDMJ9TVNuGBtUhrFnM8JWubPztBmkpxxSoVMGqKXc9uCvfsOirceMjbAbPdA7oMQ6j6PLBtRD4RVrZ/S06oR8WbmFhTMnAOjPnxJ1rw9LQb4Vtqewv1usoiEOmTn8PllGjHHv+ICBoHFAcE7A36HqSIAr8ZqoR1cmnhxVk6kw== 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=nd3pmwymv3X9jdD9UH/tWfSaBxOsfhwhBWw2bSgYxds=; b=CaMNUMcUPhpfg/qUYOHSHjiKaD8Tpfrc+zC2ALEREFHN4BV+fLjVf6mVleKzTp56KwvTriFSIhfxoDxxVJJu5dnrge+9tzktx9s7W5zL5ltPHY27X7ZA2szoWVC8+Rc8oECmM9u80I21mVXuk2rKGgF+2sXv/c7kHxAxWLP+2DG2Se/dmsjigsbsq9aeD1c6OV1yqk6Ng18SDfpzedWNbO6xJOtjndPxNjqOrN6iAgCCdvVG3mvvuD9HMoi0fWVPXmvibyI925av/odJK1mpZOvH0o2r288XpDgHZzgXKN9JMzT0bWW/hvo6Le9LgRhpVjurp1LFnBuZcJ0NZWx38A== 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=nd3pmwymv3X9jdD9UH/tWfSaBxOsfhwhBWw2bSgYxds=; b=M6ziPFtv5T0d/8XQiX6rSG0bclDP24RvfFfp5M1uQbbIhFeSd8zWWatuXn4D/wP37XgfHMEBR4jVR3Vdsrri0yHVtKWr7R5qpa195RswRjaQwyuIBEZCoX5LWG75xbd1idsw0Wb7ontout3gCyHBY2UP6b8FMyLRIHpmCk4caiU= 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 PH7PR12MB5904.namprd12.prod.outlook.com (2603:10b6:510:1d8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Thu, 8 Feb 2024 12:46:47 +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.7292.009; Thu, 8 Feb 2024 12:46:47 +0000 Message-ID: <5bafdaf7-2d8c-41dd-90bd-043c54ff1d7f@amd.com> Date: Thu, 8 Feb 2024 12:46:43 +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> <8e25176d-9438-3ca5-e862-6d3cab7ef377@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 aXQgPGZlcnJ1aC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Mh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <8e25176d-9438-3ca5-e862-6d3cab7ef377@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0234.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:b::30) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB5904:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d602e9a-9138-45e9-de74-08dc28a40321 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FMKdzNWU/+qZsFvDn/gUEeMk7k1+rMTFbcgjllk0bL2GVuZRpAt0i4zxu58MzzDOxnfBCkzujiMqdwhoc7YKzxKopaA92DR4xU1cL3nEZccle0EYKVgEchQeBcry0UBF9hUb69/r9syKQeV/zr2L/vWg6ghi/zDZErkFX9lQIwHmWfLNnZkgHqBifRuDpxdxMiwSRGEpUoVGbVhe0ITmlcl82du7yDR0349BEiruMv2tZ7zWeBQTydbCJftUZRACT6nCD5HoIFI1mio28VAI71pR4ilP6LtScaj8xrgAg5cgZ8ooG78NkwhW4onsLSBaPOIvsHmo9oRvrdeROyYRndAG0Ej1jsCrMGYJeUcmbaD/nLrUBK4kQBFd1tXhrz+aNE2tZ6eWynD7MjTabxKLJ8J8YjB4+PnjXulInCnIxbV3QjVxoVhyGykYuHaEvnlie28CiGL8F1UoUc1GZHkhnBiUC9WTSTHUsibIrFdoVzZfCasnvgBz4xgcuVxvESqnImj1PN/E7eIOsZkpc14xx9GXHrPFaeL4qqTIxfNAYq7WEFtEE5Oi8hjsjGddgcC3 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)(39860400002)(376002)(366004)(136003)(396003)(346002)(230922051799003)(451199024)(186009)(64100799003)(1800799012)(36756003)(44832011)(2906002)(5660300002)(41300700001)(6512007)(6666004)(2616005)(38100700002)(26005)(83380400001)(478600001)(6506007)(53546011)(31696002)(86362001)(6486002)(31686004)(66476007)(66556008)(66946007)(54906003)(4326008)(316002)(8936002)(6916009)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?R3BNU25WOU1ZN1RpdVRURkgzaG1WRjRvb0xEVFZkd0N3a3UxRm1NR05ZbVM2?= =?utf-8?B?MHpXVFNvMWZXWlhDOG4ycVlkdmtDc0MwNURScEIyazF1MDROZ0xCYkZTRGl4?= =?utf-8?B?UUlOcXJITnlsTi9ONHlnK0hFSm5SWE9rOEh3UGRtMVR5YlJvYzFvclFhRU9a?= =?utf-8?B?Uityck1SdXJzbjNoOW4xMVlTZXFIdTdzNVZUVWg4ajRIR2FoU3oxMFovU2hk?= =?utf-8?B?eXVGaHp2QUM0U0RWcTBCZkE1dWZ5Z05TYnlzZ09BOXZwUWZ4cTRtZmRweWxp?= =?utf-8?B?VG1kQW1ndnJZMjIxT0xEWFNwc2kyNzNvall3UGpFbG1Sb3BRNWNsclRyWUdG?= =?utf-8?B?Z1BIaXRUTzFmQ3h1TmdXVVFiU3ZERWNPTUVGNEtqSVpzZkxXNzlKSXpIa3Rq?= =?utf-8?B?ei9VOTJsalFNVWJQcWRzTEhrUDAzZk1RZG1FVXVFWUtMUE85MFhwcU5zcUts?= =?utf-8?B?NzZ2eXAyRDJhMFRUZUptc2Z3aHNJeTFpZTd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L0ZXeXNJWklJck12OEREQ2kvRHhsVk1CSkplMVA1cnVo?= =?utf-8?B?N2g1RWxPK3BNSUR4RVN6TWRCNEc4NU1OVGlreUZ6UkFhSXVLWHNYRnBIb2wz?= =?utf-8?B?aVJvVnF2K2RqcVR0NVZVa3U3Zzg0b05NQ1RvMFBHYXZndjNqeTk2elVIdlNj?= =?utf-8?B?VHF2alF3ZnprcndaUmhkNzZBZHZaUGhRZ0MyT0FhTjk4TzcrWmtma2FnZGFr?= =?utf-8?B?b0kyN3RHVkwvVnhVazZjVkpNNUJUU01ObldUYXVORlFEVG05a2pBdGI2cVdZ?= =?utf-8?B?SjUvMnU4dHZuWlVBSTMwR216ZmJBbkY3Z3lqVDdWVzVVZU1iWEZ4QnJhOUl5?= =?utf-8?B?eXdVNWgxdVVUeWw5azZiaWhBVGU2cjZEUnREUGlSU2JQMXZCdjVHbVM1eHhT?= =?utf-8?B?Qi8zSTdaNWxPalNKelBaS2xidHhwZlRnMEtEaEUxeEZVZVpaMXN4a1IwamR2?= =?utf-8?B?T1liZU51ZHV4UU1QOUpCenpnbU15MndNK2xyeXVYSVN2VnhPR1BoalU0Q2k2?= =?utf-8?B?N3BkQVE1VzQzbG0wcCt5R0FEWHBlRmk1ZUFiOGQ5WEhGRldEZmNoOHRoUnpY?= =?utf-8?B?YjNmL0tiM2RYUTAzbFYxeW8zQU5YSnlpRHJRbjZPNTAwMGdyMTJNVlZycm1N?= =?utf-8?B?MXlWT3VBaHRKL0xkMFNScWZPdFoyTldaSDl0MWZzQklwUVR5MlQ2QXMxQXNz?= =?utf-8?Q?gkWAlCDJTfn7pmJVpybqnwQAy?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d602e9a-9138-45e9-de74-08dc28a40321 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 12:46:47.4713 (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: 1Fpl9JTrQTZX5ToUdDc+OpwmtE083Dvxt99SutjbOMKpNOyw1iiY3lNIAY8H+ZUY X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5904 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 6:15 PM, Etelson, Gregory wrote: > Hello Ferruh, > >> 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? > > After "resize, update, complete" sequence table performance must be > the same as before resize. > If application skiped updates or resize completion, performance is > undefined. > According below update, it is expected some time will pass until user updates flows, during this time there may be some performance impact, does it make sense to mention from it in API documentation? > Driver must verify that total flows number does not exceed capacity set > in table resize. > OK, this is more complexity to driver Is multiple resize() call supported? In the worst case, think about a case, for each rule application first increase the size by one and adds that rule. Is this supported and should there be a limit how many resize() can be done? >> '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. > > Application must trace what flows require update after table resize. > As the general rule, all flows that were created before table resize > call has returned must be updated: > > "old" flows |<-----------------resize------------>| "new" flows >   update                                              keep >                unknown flow location: update > > ----------------------------TIME--------------------------------------> > > In MLX5 PMD, if update was called with a "new" flow, the call returns > will success, without changing the flow. > At least this makes life easy for the application, can we document this behavior as API requirement? But still in a case there is high amount of flow insertion and deletion happening in parallel, how application call the update(), it may still need to keep list of flows to update. >> >> Or what will happen if update() fails in the middle of update, should >> user retry, should PMD restore back the moved rules? >> > > If flow update call failed, it treated as failure during flow create, > update or destroy. > >> >> 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? >> > > Table resize and single flow update operations consume approximately the > same time duration. > Ah, thanks. I was missing this bit of information. > An update of a table with 1_000_000 flows will consume driver for too > much time. > During that time application will not be able to create, destroy or > update existing "old" flows. > Such operation must be coordinated with application. > Got it. Briefly I was trying to highlight the complexities that multiple APIs bring, and responsibility pushed to the application, but above performance impact explains the design decision. Eventually application needs to get this hit, how application expected to use these APIs? First call resize(), after this point how application should handle updating flows? Can something like async updating flow work? Like driver returns success but it sets a thread that in background moves flows in a loop, if it gets the lock and release it per flow, this lets other thread get the lock for other flow related operations? > A driver could provide a batch flows update, but I don’t see how it helps. > It's ether update one or update all and the latter does not scale. > >> >> I will also put more comment on the patch based on latest understanding. >> >>