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 0A48643A0F; Tue, 30 Jan 2024 19:15:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8505C402CD; Tue, 30 Jan 2024 19:15:26 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061.outbound.protection.outlook.com [40.107.223.61]) by mails.dpdk.org (Postfix) with ESMTP id E1EC5402A8 for ; Tue, 30 Jan 2024 19:15:24 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DAlrfZ6wUc8SEixpdTyun4h0yZqHGEc/njShXcXw9wNAwOAlCoX7kpuUosoBnrWrnFCGlwvLTuk2/qYW4uEXaFhbBGf2snPPHQ+7hktc8GgS3U91gSRV1vwRMS9WwAUfVqrFBHm8FuVZNpuq3MYYpJyOlaqLUrUygk97VO0j1MkHFhiTH9BzOoPCBvaZ4sNICZrHbF4wXQABBzIt1WeMAEY9nbFuwIF296/NQ2bPG22m/wCtlGTdlN8v+dE4cHE0HEb5WdUrrxJSBsYWHI2QRd9MC/gZho+NeHvCxYSzrJAPfx1UShnGmlS79ByIm6TkZ1klTt2wm3jb/2yfL/hb4g== 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=No+fUjJKG4EV9A9MrYNjBfEFBpgEHhUOCQcc6U4B09A=; b=C7AQNRobp46DwInTZQTcEcmHLhwswFdqY9UsYafi6vwu3MRqrOa0DBXB87cA05Nb9dYIwr1qZWuF4Hu7Ry8sZwUAngFM+CqwTbLcmnKZDuRhuya+0Dp15Hsv0PBMIn8he+arIRuRUNWyjC3On2wd28gqM4yoF2nVTWTLX4XwFVVpsFaDGAtiita86+zWx0/3/5/h/KyNxsA9zJ+gFF715eZ7zBvV7UIFOvbN55fku+x89w35qDA80sylpTeuwuHV6TrVdckaNB7sMp6N4U6f3i0JurMLaEo8O7g3xZ48/jUp52CJZAJughqFwZyyG57yVq9S+HSJtjOnToWOoJdaIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=No+fUjJKG4EV9A9MrYNjBfEFBpgEHhUOCQcc6U4B09A=; b=s89NLxJp+J+pWjlihLNEizZ7kN1blB5RY++VM7aR2Yk7AhIXcLi0GW+Kpg5+7hSLH6qNEbkIQMS+s7s851vopPFd3LXOKvglcpAGZJG11PtSzRwJ4EXn+ICyY1iM1vOoUcuJGpACqYoeSDkVsAD6kyISrDKFdEHxm8n2Q/netE+fr8+M04zJTMa7IZ6N41Gc7Fa4pt/46PEv7yAmqAREDnIYhg+kzE7/mDhGB0HDemJKgDAbMW7e3KF0xyWOGY9Vb6kacC+8HOxaFXssKs8WCfT2xRGCpjJthOzRdPC8GShTi7/TVkwLYJdOKyab/SqT/t/ye0hg7HTlj6G/A5PDgg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from IA1PR12MB6332.namprd12.prod.outlook.com (2603:10b6:208:3e2::13) by CO6PR12MB5490.namprd12.prod.outlook.com (2603:10b6:303:13d::9) 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 18:15:22 +0000 Received: from IA1PR12MB6332.namprd12.prod.outlook.com ([fe80::5610:835d:9e24:6cfd]) by IA1PR12MB6332.namprd12.prod.outlook.com ([fe80::5610:835d:9e24:6cfd%4]) with mapi id 15.20.7249.017; Tue, 30 Jan 2024 18:15:21 +0000 Date: Tue, 30 Jan 2024 20:15:17 +0200 (IST) From: "Etelson, Gregory" To: Ferruh Yigit cc: "Etelson, Gregory" , dev@dpdk.org, mkashani@nvidia.com, Ori Kam , Aman Singh , Yuying Zhang , Thomas Monjalon , Andrew Rybchenko Subject: Re: [PATCH] ethdev: add template table resize API In-Reply-To: Message-ID: <8e25176d-9438-3ca5-e862-6d3cab7ef377@nvidia.com> References: <20231217093205.321082-1-getelson@nvidia.com> <56337607-a330-0967-e99c-32a6f6e9f058@nvidia.com> <62e78a2b-4827-030e-713b-28d671b2dac3@nvidia.com> Content-Type: multipart/mixed; boundary="8323329-597627262-1706638521=:74113" X-ClientProxiedBy: LO4P265CA0235.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:315::12) To IA1PR12MB6332.namprd12.prod.outlook.com (2603:10b6:208:3e2::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR12MB6332:EE_|CO6PR12MB5490:EE_ X-MS-Office365-Filtering-Correlation-Id: 932e2796-5f41-41f8-1145-08dc21bf6c23 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mbSJXkLLW1Jj+pAR3pGyVnNJiFSwOT1A3L26KC/Pva0UcI3T1FbeprNRYrbzfoADLBrttSgkI9+wuLKEfmOpkYGBL1+QjTO4UVoKWMQUKNfRT31GavFHumMtVzoeLO8OFssX4tjyVx39+nesLXn8WxI20jmYpEntSqwHv2Q2gy535kwLmDi9fwZDje5+90kCcEcWLEZyrXPK9g//Ga/o1S4wU5EJrjkR42+cXiVdK8uT6oc2OzFNVjp4SPJ8dP/L5J088BJoYPBOMwQOm/zhqLmmsTaNXMqZzp8Oy/Yyi6x1FaiwFlvvvLYLNYA/1saF7X8H7GbQ+CxR9XakUqLs0iqN6kvsS1xDb8dClWqR3TzJLLdBp4bls0uYLO896NpQvQ50+hz4M8UJn32EM0jWGH8XWfayff21ztwO4d3lvBcstRtXY9YAOsDeT1nn/SQRNslHmFnYPW51XUfLzOvrdUwdFRVhWN6HLP/mZL9sfODgQVholVpbbK1CnCLbRTcTr7zVUn/FitS2P2Bq8s1kCJEklvgOAqJotykPxVTG4oFeLOpnK11dGiL1gq/+QWeCGt72E5zop6FAzsHw/NrDntLlDf3MeUwRrhOlZyJmm9rTePfJPmDKDBgiTA7Bmdm4 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR12MB6332.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(366004)(136003)(346002)(39860400002)(376002)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(38100700002)(83380400001)(86362001)(31696002)(66476007)(66556008)(66946007)(6916009)(6666004)(316002)(6506007)(33964004)(6486002)(478600001)(6512007)(54906003)(2906002)(36756003)(4326008)(5660300002)(8676002)(2616005)(8936002)(41300700001)(31686004)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Nmd4YlJyR1RTazQ2dFhLUTVNRnE5eUdNU3RnZG5KeDQ4MDhkM3N5NGVFTm1r?= =?utf-8?B?YUx6RjBYbWhYWVNpZjUyS2VHTFZQMCtNU3dsMERkdUVwd3AxUk9JM2pGSTlx?= =?utf-8?B?Mkc4YTVxbGVkcGloM2x3TFlKSWF3QlpGdlQ1VldELzBFRlRjS1R6OTlmenF1?= =?utf-8?B?YkNhR2dGMFgwRmhEVlBkYmJ2VTcxajR6ZmVLTjhZajN4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FZkx5cDdrcCt0?= =?utf-8?B?NTBzL1JOaWROVm1BbXNnZHAxWTltNXNoenpDQ1N6ZVJsYzN0NldJUkh2SlZB?= =?utf-8?B?Q0JGaEFrcEVSbG50WUI3bkZpNE9DdFU0M0lhS2ZIQ0g4MVgxOXpMd3pka01D?= =?utf-8?B?blE3ZHZTY3djL3RRYjB3TUlqTTB2REQyNzduazU4bnplckdHeDh4dUJDQUJa?= =?utf-8?Q?PD6yzyEbP9IyEFu6mzDX0bXAy+jqxrwoPSbQh6RUMPkI?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 932e2796-5f41-41f8-1145-08dc21bf6c23 X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB6332.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2024 18:15:21.8351 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uPCubP5EVeU90We3fGgft4W0WmBpLag53K33/3SUpz+SCbCBfKO8wBRB4dDhB65hZvj/2tfg7SfODgCzygLBcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5490 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 --8323329-597627262-1706638521=:74113 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT 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. Driver must verify that total flows number does not exceed capacity set in table resize. > '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. > > 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. 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. 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. > > --8323329-597627262-1706638521=:74113--