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 8551AA0C4B; Thu, 14 Oct 2021 16:14:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 091D74112E; Thu, 14 Oct 2021 16:14:35 +0200 (CEST) Received: from AZHDRRW-EX01.nvidia.com (azhdrrw-ex01.nvidia.com [20.51.104.162]) by mails.dpdk.org (Postfix) with ESMTP id 952E540E50 for ; Thu, 14 Oct 2021 16:14:33 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) by mxs.oss.nvidia.com (10.13.234.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.15; Thu, 14 Oct 2021 07:14:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W+qDyUUdnsvVyfnXrWVHMwKiwVlkZhjibFrSz5cQXrwACAckmZjv0VNKC3llKDRSnO4mQKhC7PngyBG4jyRa2Wf0RHNidMSVB1Nq7XIa9RA9t8fNbccY/ajukQo39MiI1P47ydUx3TEwc70q+Uzk/kQA5KwYA+f3u13bMi/LifR2NygaEh6ZpiDN8iR9YUtAK8dKXvlokC1erdbU2hPoN6fyigwhU85HU4Yk13257dM/turtXJIuUvv+AsdK3xKedOSwS1p+xkHkY0XaroDuaTX6jTMmimlQbjxFQOZsbu81N9Tlo7TeVdnGOSWi1NIicKpMFxkta3VxM+9k9tUbhg== 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=Ioc2inxEatjI6lpdu5KYtsjYSJbfgNo1BwBhsQkR5Rg=; b=jpAacQ2/HXu85tJKOKWu0xvEOWv7aaexKDxeCB3+3ntmj5c+KAq8nHraf9dlOzXMv7HiLJkebFFK6M84QTA9cVR80msh6jGV2ZIcbY7pSVmUnN9EUr8+Ln4Pl0gJu0tlUQ17vM7WNdaJXkmaK9C/IdR63V5WJqFey8kxVxykDVMDnGhiKQ7i2T08+nFfB3jlE5/AqaCbFcGHSSgB8qtmJ2qBasN1/VtPbrEjLrBIHq6nd/clTIGj35FkGl5vtyPbjf1bkVsJEvGk+8poDe0uhP49DXYJpUtPlcBlKtGxcOo1Tq3SfFTLY5TCzJj/ppyu0MpJC/ZPZVpfRU+eGfXcBQ== 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=Ioc2inxEatjI6lpdu5KYtsjYSJbfgNo1BwBhsQkR5Rg=; b=Y5gviZLzzP5XEpZpeY1p1VM2x/bDL/HO69hIo3oEgi+VtiF9zaopDfPBvajL/Nlj6mc9/v+o3iBi2cU5+PhxrSj1Jt9k6sjzN1nErycJWzAqizwQtD8Z49N32oGM9D7wZTQsBxiibiLIviNyIoZMJjowDU7KJE8xXDGSr2i3HS/4PS5fnJ5mFLQ24ZztLrmOpist4GEYmCgeckKI/35ZRDQ6NJ6lelHpJjdxpz5xAJtfrbULTZMU/F6uMRu31VWd9Ezh6RmM+JAX2IpYb5AqhgMt4dI7Ek6dwW21UzPyPykXhrK5u10qszqEpKkar/4owo+0z9zBMsNnxWSV21b9SA== Received: from CH0PR12MB5091.namprd12.prod.outlook.com (2603:10b6:610:be::10) by CH0PR12MB5043.namprd12.prod.outlook.com (2603:10b6:610:e2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Thu, 14 Oct 2021 14:14:31 +0000 Received: from CH0PR12MB5091.namprd12.prod.outlook.com ([fe80::59bf:640f:7140:ab97]) by CH0PR12MB5091.namprd12.prod.outlook.com ([fe80::59bf:640f:7140:ab97%9]) with mapi id 15.20.4587.030; Thu, 14 Oct 2021 14:14:31 +0000 From: Dmitry Kozlyuk To: "dev@dpdk.org" , Andrew Rybchenko , Ori Kam , Raslan Darawsheh CC: NBU-Contact-Thomas Monjalon , Ferruh Yigit Thread-Topic: [PATCH 2/5] ethdev: add capability to keep shared objects on restart Thread-Index: AQHXuYNQK50xrto6MEmDHPXWdlMdYavQnioAgAH1bHA= Date: Thu, 14 Oct 2021 14:14:31 +0000 Message-ID: References: <20211005005216.2427489-1-dkozlyuk@nvidia.com> <20211005005216.2427489-3-dkozlyuk@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9ce8b2e9-cdec-49f3-667d-08d98f1cf0d2 x-ms-traffictypediagnostic: CH0PR12MB5043: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rJUsMvBdAPXkBIwzjXUaLbmNb5oCueu+P8mxb19YlBIljbnHvL2Ss7Ll/XrwTSLn9620Qhk0F4Aj68J5NWEhNUztGR98Ld8hezlFyQlLZRcidoqmUFLWQTOVXAxpgs3mZxunCtHyrDpLZSWtJNvhE8GJYa+8HqLe76/801hOjd3jeOVmsxRLqzApHKycAShz4hD/MKcYAJxAkVv3gkRbXeEjdxOq9T9DC9h0YRTwtZwSGP6UM7ZyF3V3PxdB6oz+p6+t4IsY2mLVWXMsuMwnv5vC6PPr8EzAROYGlwbO6jytiPhFUQlZFkJIRtYqy3snMIGZiMcyYJKfbpPfuzNB0GRNEHn7QF40UOxG64aQBfq6LiLdq/IbnXsAOd6vHrNcrY5+uU7tMO6CtRgULkh660mirCcKrDTlI3eYn7pX8p45QF7MqQD1OFr0lEH//MxOy5gRRR+vdy4WqX+ysSjuMEwbThqW/HDpDZW/6447b5Zy1JimBxmKf8SH+EQzl71AJdRPsvE+q9Fs/febds46ZxzlVLLakv4Pk2y5/1LxU0SvFcBkMXb4CkEbzSrEewxPUCtiJsLHcEKmqFL9TPfzR0uN5rTN+Z1RWfnB2i7MXqGd0IjGeFRJFI9AGYEtStodUrmfGL9jEj8iOA1DNXU69Z/SsM9sXQM+PM5IwlckYAo1uvR19n8ajbLSMepnxWOJ2sHAslqOfyXwGHel6/sUwHg4tEKQDpK/xe9BbBX2pV886uMj1bGVLmKaQ1vguPreMxlS1Y0VHovESfpBuQlpwzIO3inaMibVmU9lyU+5YUg= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH0PR12MB5091.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(110136005)(5660300002)(8676002)(54906003)(53546011)(7696005)(26005)(2906002)(86362001)(316002)(83380400001)(508600001)(71200400001)(8936002)(33656002)(45080400002)(6506007)(52536014)(66556008)(66446008)(38100700002)(186003)(966005)(122000001)(6636002)(55016002)(76116006)(107886003)(64756008)(38070700005)(66476007)(4326008)(9686003)(66946007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?koi8-r?Q?d27sSRTpyDnxEDGgAU06rfL+LNqv/qzcdp0AvlrDrMOKslD2YYOVBCGFa9KaU+?=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i8-r?Q?OIQbKNAen3pztev3nGvo+HjagDbtOzuBmwN4+8yAO5jQmyFi1A7w8ANlhK2y9Q?= =?koi8-r?Q?Ih7/nD7o/D6hUzVBnOgAGJi8vJW18Cs1D1PI0RytSKLpQO9ig09q2zq/aAupp5?= =?koi8-r?Q?OC/JurV8dWUpCYtuNxHMmvdfbS6wcOcc8K8+M9Yf9kThptz0PsJAsuNoUbHjrP?= =?koi8-r?Q?ErKg7+bRSPwLbM2lqci+/JO5bfGV2ti5SsS6Up4thKxG7AH4qkSEpqqR8vtynM?= =?koi8-r?Q?9/pNytN21tlz6yGfSZMbEFd/jyrytin4OuomKfDrXWnzlhNmM1+7aNKpojaJMM?= =?koi8-r?Q?eZOQLEEQEwWlyIDz6hLNo3dk4CaDLZtvfzVqGEVVTiVyB8T3Bn5qkpm8+ftOl0?= =?koi8-r?Q?8tS8F/xbZeLgY+F6QssC0=3D?= Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH0PR12MB5091.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ce8b2e9-cdec-49f3-667d-08d98f1cf0d2 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2021 14:14:31.1095 (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: RldKxuU6QmKGLDjfc5ZW4PrFZVZZ5bw9UyR93qwWZptL4POvMMJNgtMlGsEz0Ke+eZVLSJBumujw+hLkpdN78w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5043 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" > -----Original Message----- > From: Dmitry Kozlyuk > Sent: 13 =CF=CB=D4=D1=C2=D2=D1 2021 =C7. 11:33 > To: dev@dpdk.org; Andrew Rybchenko ; Ori > Kam ; Raslan Darawsheh > Cc: NBU-Contact-Thomas Monjalon ; Ferruh Yigit > > Subject: RE: [PATCH 2/5] ethdev: add capability to keep shared objects on > restart >=20 > This thread continues discussions on previous versions to keep everything > in the thread with final patches: >=20 > [1]: http://inbox.dpdk.org/dev/d5673b58-5aa6-ca35-5b60- > d938e56cfee1@oktetlabs.ru/ > [2]: > http://inbox.dpdk.org/dev/DM8PR12MB5400997CCEC9169AC5AE0C89D6EA9@DM8PR12M= B > 5400.namprd12.prod.outlook.com/ >=20 > Please see below. >=20 > > -----Original Message----- > > From: Dmitry Kozlyuk > > Sent: 5 =CF=CB=D4=D1=C2=D2=D1 2021 =C7. 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 > > --- > > [...] >=20 > 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. >=20 > I support one of previous Ori's suggestions and want to clarify it [1]: >=20 > 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." >=20 > What Ori suggests (offline discussion summary): Suppose an application > wants to check whether a shared object (indirect action) or a flow rule o= f > 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, becaus= e > 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. >=20 > 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. Andrew, what do you think? If you agree, do we need to include transfer bit into "kind"? I'd like to conclude before RC1 and can update the docs quickly. I've seen the proposition to advertise capability to create flow rules before device start as a flag. I don't think it conflicts with Ori's suggestion because the flag doesn't imply that _any_ rule can be created, neither does it say about indirect actions. On the other hand, if PMD can create a flow object (rule, etc.) when the device is not started, it is logical to assume that after the device is stopped it can move existing flow objects to the same state as when the device was not started, then restore when it is started again.