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 5259CA0C4B; Thu, 14 Oct 2021 16:42:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3BCD94112E; Thu, 14 Oct 2021 16:42:16 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id BF20840E50 for ; Thu, 14 Oct 2021 16:42:14 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="227972634" X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="227972634" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 07:42:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="525073574" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga001.jf.intel.com with ESMTP; 14 Oct 2021 07:42:07 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 14 Oct 2021 07:41:58 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 14 Oct 2021 07:41:43 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 14 Oct 2021 07:41:43 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.45) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 14 Oct 2021 06:49:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IL6ULb5CmzO833oKKpddz6lzzmDxMGBwJf9LhqfFLKKZdhCWIIVOoJTRiQNFZ0Q1jCRBxXm7ku5VHW0vGREqlAjJ+5qUFVjcCn5uskNj9raBh8Im3cGYe/tQXOQToKPHX73FBoIOO+U6pKyR9jTYL95DX/bJZ8T/7J1sA9M5IY2pgzxIQQO5nrIlgmixQRVN6RPgJ+8ZiYL6Rywl6ZOGIH7UGKsQYb3gSApnD8Vts+og5aVKBMZaiHwwM32Jrxuu0CM2JTa9s0PoIV4vgTqxdT7T/WKJh/e9S+CGkYIW+D+sPMMC1gaVq+OU9KX6OosRbm9B4iaOLO/6Hyizxda1KQ== 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=VRsROPaXSHUjoklwSkj+VydL79/NdgghOoTP9tOX8PM=; b=Oq6vxSM3y8FcbjzqZ0P/HKQJRwLzrsjjc5VQTXna0TyBENMs4scnVQx3oJj7pyT3yEZp9LM/hUJHLUUgky+tKWEyjoqPr0ynnmnZ/WbEVLps9g9K28ffkRWsgowNw8e+b/AVxg8+lHbT8stMQZndTzmZbPCk+ZXfgf42JKV9Z2v3lxgjpZfbUmGs0ZaycsIJGqj4dYB3MLZuxNL4rnqII2M+2hNcECD4b3WCr55Nw7bdGV+A09+tRhXl1ovRuGOHr5e7JJ9x8YZB8bg+Nd/4qGLAdES+8siYrltsdePOwzrsRiEsSUEyq/J2wZwL5aSkIgevhJCg2lVvbrapuU5YuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VRsROPaXSHUjoklwSkj+VydL79/NdgghOoTP9tOX8PM=; b=KPMNy0aS86/LV9V0W2R2onT+Q4k1ia8JyuojcrwcNoTsUWxx7X+Y0pz42w+ZYOUaBpuK3LoVovzwyQMdMRuRmNXVRXkKikeZcJb/QMjCh/xsuEWKtfE3Omp23xLZz2rF29EpemiGm4VbY2KqjQH41ucBAKDLWo6RvTzaYhHEr6E= Authentication-Results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4965.namprd11.prod.outlook.com (2603:10b6:510:34::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.17; Thu, 14 Oct 2021 13:47:04 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%5]) with mapi id 15.20.4608.017; Thu, 14 Oct 2021 13:47:04 +0000 Message-ID: <9a9ab2b5-89d1-1653-9022-ebf1b8a86902@intel.com> Date: Thu, 14 Oct 2021 14:46:56 +0100 Content-Language: en-US To: Dmitry Kozlyuk , "dev@dpdk.org" , Andrew Rybchenko , Ori Kam , Raslan Darawsheh CC: NBU-Contact-Thomas Monjalon , Qi Zhang , "jerinj@marvell.com" , "Maxime Coquelin" References: <20211005005216.2427489-1-dkozlyuk@nvidia.com> <20211005005216.2427489-3-dkozlyuk@nvidia.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB8PR03CA0007.eurprd03.prod.outlook.com (2603:10a6:10:be::20) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB8PR03CA0007.eurprd03.prod.outlook.com (2603:10a6:10:be::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Thu, 14 Oct 2021 13:47:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 310b8e1b-66cf-4000-50ab-08d98f191ad5 X-MS-TrafficTypeDiagnostic: PH0PR11MB4965: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vDNyomvJVIUJwvhBIGF11wbMKsc6FJpg7va1xnZh4BVz3KfiGQ/CPfgQTVrWxzCTFjBIAzK4AZgui798KPz1OEAmNEXFF6Oy7ocv6ZOf8Gfk+NJSQInP1P84HnEIk1F3E+6WXYExZdDMFS1zau20RiQh507RVoou/TvC086lUutq70MpqMWMMzTr84FoR1lcERnI/o3VOORsAYGVZNwzv21KSaMmBgFWzb9gc3g9R4EuHY/6O9CSlABM3gde6HqGhfhhefF8rFj2Ilpb3t8W9B1aEBZc78OMw6KhH9C8RmfMxWT+85KFgPvAZNOJtYaN3qI4nal/VG4LGvQOIWv5DGPXZQBD2M7fU+3elkv/uLYxrpCTQuJaidLLmujtLGEKbqpd16VQRHtDvDcy0yAPF5oqYiAE2UiIQgorbNuEbSIxWppCcDoe3snMBHBEyJxgYZ/lcHNOpvY6IqEJhHrs6oDhWh0gnac25LVvflvgckEmyYurjmG+FUzUMiFixKnF7cYN530RZbdL5/fC+NtJLZe8zd9YME+r8SJyTfsZ3ZCxOOvLATDP2QNlohKrp3INtEsxJxyJzOd57hHXjgocDVC9WEv0awhXGwQXGrbvSGggX8sEeDvfor4McciPNGwSws3oGmgUTIDxZUJ99yWBl6Xtjlbik6LzleLdjtNUdXiu6k5+2knmpFre0ibgOiQeoRHoYCCKBiTas6GsKI6v22tlPkN5azwsIK8Iar8DkKn9i9KaUDDVGsnufAWgP+kimqBZpXeXvZH0OucZg/aaRgw3P2hKR0I/1a/IjHvX2Q6+EnFr1xx9P8pI/L9HEuwkiTJgZ1XYWCSfYXIda0sg+w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8936002)(5660300002)(8676002)(316002)(6486002)(31686004)(53546011)(44832011)(26005)(86362001)(36756003)(2906002)(38100700002)(956004)(66476007)(6666004)(66946007)(2616005)(66556008)(186003)(4326008)(508600001)(83380400001)(966005)(45080400002)(31696002)(54906003)(16576012)(110136005)(82960400001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aHpJbEdpcVFmQmtEQmF4ckF4RlE2SHBTdnVTRnNERjcwQm9WWnU3WW5samVI?= =?utf-8?B?dElSb2c2SnNPMVd6Q2pqQjRHRURtNTIxMXNOV1haYW1VSFRlNHVqRk1rZHd2?= =?utf-8?B?WFVKYmhqQTVkLy9ka0FQcmM2OWg5UFNYZERHUnZ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3REN1MWtxb05xSVdORXpSYzRxYktBZmZBWjhVTVg1?= =?utf-8?B?NlJoVGhGVFlIWVR4VnNzM2VXRW9kRmlhS3UzWjVNSmplK2k5dVVKclpqc25a?= =?utf-8?B?NXBRV21GWnlnNE81eHBGWWI5NkUvU1VBYW1zTUNKVTRvWmVrWFBGS2NXTk1t?= =?utf-8?B?elUxOGszUm5kdGJLd05aR3dRT1NFWmVFQzJLTldPMDdNR3U0R0ZkTXpONHRq?= =?utf-8?B?S1l6MGhkY1d5bWFiMTlkbEJSNTk0Y1ZuZGU2VU9EMHVnOU9WeG9VbUEwcTJR?= =?utf-8?B?MDQvK2R6YWF5akIwckVLL2NhZUprbWdoMVd5YWRQZER1WDZiMVVQYWN6MG5J?= =?utf-8?B?ajhLTFhVdE1FYjlZMDVDc2dxdlRIQVFDV0MrVzFJM0NDLzBCVGFLeXhsWlhC?= =?utf-8?B?NUF3cFBKRi85amhpQVdHK2kzYThZN0Z0eWtGKzAxMWtaVnFMMjl2anMySUVs?= =?utf-8?B?c2dOMkxxRURjb3pFZ1ZjQ0RscVEyM2RTVEFJdW9TK2piRnNyaXFkWVpDZWsv?= =?utf-8?B?Y2FkcCtNQkpIV0UxYU1yaTMxV2xpNXJtOUQ5TE9TRDJRU3hkcEdXTHpsd2ZR?= =?utf-8?B?WFRMeVNGTHZBb3hEYmwwbmlQMUlnQ3BrNE1RZWhONkU0bE80NEJnZWVQdkpt?= =?utf-8?B?aXRUaXo1SnU5dlJTWDBzTE1GZFgxRCtGSUhndHQzVnhZYTg1a2dwREtXdEFJ?= =?utf-8?Q?1Pfr6kbDcI7ohoLRE7mGj81QFDKGJ9cfy5msjCy?= X-MS-Exchange-CrossTenant-Network-Message-Id: 310b8e1b-66cf-4000-50ab-08d98f191ad5 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2021 13:47:03.9535 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0mRD8Po7Ms9ICPS3MgcECbAlbWjAd6LXttqzlrKboe3U8O5nLQd+K/Re8Cz41EgncIQQrPRNhY/WLoYQ6vwxaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4965 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/5] ethdev: add capability to keep shared objects on restart 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 Sender: "dev" On 10/13/2021 9:32 AM, Dmitry Kozlyuk wrote: > This thread continues discussions on previous versions > to keep everything in the thread with final patches: > > [1]: http://inbox.dpdk.org/dev/d5673b58-5aa6-ca35-5b60-d938e56cfee1@oktetlabs.ru/ > [2]: http://inbox.dpdk.org/dev/DM8PR12MB5400997CCEC9169AC5AE0C89D6EA9@DM8PR12MB5400.namprd12.prod.outlook.com/ > > Please see below. > >> -----Original Message----- >> From: Dmitry Kozlyuk >> Sent: 5 октября 2021 г. 3:52 >> To: dev@dpdk.org >> Cc: Dmitry Kozlyuk ; Ori Kam ; NBU- >> Contact-Thomas Monjalon ; Ferruh Yigit >> ; Andrew Rybchenko >> Subject: [PATCH 2/5] ethdev: add capability to keep shared objects on >> restart >> >> From: Dmitry Kozlyuk >> >> rte_flow_action_handle_create() did not mention what happens with an >> indirect action when a device is stopped, possibly reconfigured, and >> started again. It is natural for some indirect actions to be persistent, >> like counters and meters; keeping others just saves application time and >> complexity. However, not all PMDs can support it. >> It is proposed to add a device capability to indicate if indirect actions >> are kept across the above sequence or implicitly destroyed. >> >> In the future, indirect actions may not be the only type of objects shared >> between flow rules. The capability bit intends to cover all possible types >> of such objects, hence its name. >> >> It may happen that in the future a PMD acquires support for a type of >> shared objects that it cannot keep across a restart. It is undesirable to >> stop advertising the capability so that applications that don't use >> objects of the problematic type can still take advantage of it. >> This is why PMDs are allowed to keep only a subset of shared objects >> provided that the vendor mandatorily documents it. >> >> If the device is being reconfigured in a way that is incompatible with an >> existing shared objects, PMD is required to report an error. >> This is mandatory, because flow API does not supply users with >> capabilities, so this is the only way for a user to learn that >> configuration is invalid. For example, if queue count changes and RSS >> indirect action specifies queues that are going away, the user must update >> the action before removing the queues or remove the action and all flow >> rules that were using it. >> >> Signed-off-by: Dmitry Kozlyuk >> --- >> [...] > > Current pain point is that capability bits may be insufficient > and a programmatic way is desired to check which types of objects > can be kept across restart, instead of documenting the limitations. > > I support one of previous Ori's suggestions and want to clarify it [1]: > > Ori: "Another way is to assume that if the action was created before port start it will be kept after port stop." > Andrew: "It does not sound like a solution. May be I simply don't know > target usecase." > > What Ori suggests (offline discussion summary): Suppose an application wants to check whether a shared object (indirect action) or a flow rule of a particular kind. It calls rte_flow_action_handle_create() or rte_flow_create() before rte_eth_dev_start(). If it succeeds, 1) it means objects of this type can be kept across restart, 2) it's a normal object created that will work after the port is started. This is logical, because if the PMD can keep some kind of objects when the port is stopped, it is likely to be able to create them when the port is not started. It is subject to discussion if "object kind" means only "type" or "type + transfer bit" combination; for mlx5 PMD it doesn't matter. One minor drawback is that applications can only do the test when the port is stopped, but it seems likely that the test really needs to be done at startup anyway. > > If this is acceptable: > 1. Capability bits are not needed anymore. > 2. ethdev patches can be accepted in RC1, present behavior is undefined anyway. > 3. PMD patches will need update that can be done by RC2. > Hi Dmitry, Are you planning to update drivers yourself on -rc2? Or do you mean PMD maintainers should update themselves, if so do they know about it? If the ethdev layer is updated in a way to impact the drivers, it should be either: - all drivers updated with a change or - give PMDs time to implement it on their own time, meanwhile they can report their support status by a flag We had multiple sample of second case in the past but it is harder for this case. For this case what about having three states: - FLOW_RULE_KEEP - FLOW_RULE_DESTROY - FLOW_RULE_UNKNOWN And set 'FLOW_RULE_UNKNOWN' for all drivers, to simulate current status, until driver is updated.