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 B32B1A0C4D; Wed, 13 Oct 2021 10:32:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 511E14116C; Wed, 13 Oct 2021 10:32:41 +0200 (CEST) Received: from AZHDRRW-EX01.nvidia.com (azhdrrw-ex01.nvidia.com [20.51.104.162]) by mails.dpdk.org (Postfix) with ESMTP id D37AD41162 for ; Wed, 13 Oct 2021 10:32:39 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.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; Wed, 13 Oct 2021 01:32:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KJQGSU5vDKIX85ejVgw06gNQ+oH1h7tvbhsp4EOpRUwhqMUs708xV0LxRPKmIL8/zqGwAVTiH/C8CW1w1fZCKZt8IxPBuawlhtVnS9sQ65XNY44lQRewOMaQ+4/bFHlrsTYcPG3dqdTLDr0PrLH4w6BWE7RDyIzSIYg+mDWxB7+Hl6+5t7+NxpepdgmKCwNdzkcrv1kSiaoac1TmHc4DPvofjyUwMSnU4ajujHEK1n9ED4kGi5WiZUP20KeA1Hs9ByJj6e2PlpsCMmw85xSC2N14DdpwvSSs69ElTCmpclASFJ1tnKhoqRnIPazco+/i49E1uW8TPyyzAqnTYNJtGw== 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=or+zMRPf5xlT73adi/ghOJmCOD9Gsnvuk5+gQfFhtJM=; b=W6KiRUPXMFVEQqcmo7DAN2JhN0RryWQA4bPqS/7+EesQFTd71iovl0an5NNx3bg1u9KaSFv1XNSxkT99Q6NtscOl3NbvHbtJ4Hysgn/AaQJrIycKcKGRYrMADk1jiVNWTaWk6LWCs08I6exWwfpdn5BezLMSGyXWrkykXpODfU2cm2G7ro/b3YWmV/vnfRvAA+0hyoKOEoKLtj0s8WBsW1YjUvXGW/Bqy0/9QiWKE/Pp+1pGZKjWbPSXDZJJ6CZFm9TIHDFDxeFL9sfGoH2KZ/UwvtVFKT5Prr9GAg4xD0vWKNBzZ5A+4Qi+ZHcH1bzuBvAkTcqwFVxFyhvUYPLZVw== 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=or+zMRPf5xlT73adi/ghOJmCOD9Gsnvuk5+gQfFhtJM=; b=cywqhoU/Qw9F8oYQM7h8sdleg0Oe27mpL6iB3roPPKmGEsdpfjfnYXTHmlrqVl2ppQcwaUGoicFgUBTdRlLecBTOc+OVrrsIaNIuF359++2lBMoIuruBKXnPIW9zKRxnmWvOMMtEGeYS+zVUeTi4QGcT33UGuyCiYKmWHuEi6avuyxZmOfd7krB1TRHqxVvGkuupez2gwtIWTitBjFaV7hUs4CilpJ8QN0o5IGr2xcbWFgdC+RVszrs1iE/JABoWg0dNZi2yDMBkwnkkDY6ywIvPqAFFjc0kWW3H40MkuHCz6k4pvJteFd+XAcENeOCpubnUf4aqmLP5oA46+912eQ== Received: from CH0PR12MB5091.namprd12.prod.outlook.com (2603:10b6:610:be::10) by CH0PR12MB5297.namprd12.prod.outlook.com (2603:10b6:610:d4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Wed, 13 Oct 2021 08:32:38 +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.026; Wed, 13 Oct 2021 08:32:37 +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: AQHXuYNQK50xrto6MEmDHPXWdlMdYavQnioA Date: Wed, 13 Oct 2021 08:32:37 +0000 Message-ID: References: <20211005005216.2427489-1-dkozlyuk@nvidia.com> <20211005005216.2427489-3-dkozlyuk@nvidia.com> In-Reply-To: <20211005005216.2427489-3-dkozlyuk@nvidia.com> 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: 133826ad-459f-4522-7cce-08d98e240395 x-ms-traffictypediagnostic: CH0PR12MB5297: 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:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5gRljEMZAVoZT3cMBHxLwhtkRbTI7J+ddVA5aG7YgUV2kAFL972PHgk8g1wI6baCj72oV0MbtdlHKtTdu/D8xwhtKeKpytQ7IaJ4zdVoJo96xpguyPzQ23kWaiKBVDRt93VCHx8T6GSO9AOMSA/okQzBn2rQS3HUxjzS12xyDfbui27ww14RTubMAn9GwP/hPqbqKskLSH6kjzuOdsEyj1b6PjlitJaLmLeeBYdxABaZMPu2kQgnSE79oixZNZxxuDdnZvrkwaxFrNGEBYn0qunakzXnyNz9HB2AGGLKMhdjafrk0KrhMX5Ybyk1wlLTR1+sMQbZ+5ctUR9hG3L8ybJycdL7/n2izez6i9LZ1zwgwEVMqcskNR67hlHuRxYDLE1nvJ8LnpclfoCTJ8Rz1yAzQi28X7p/qU4AN3S/trH6cNxJRRyKCwj18eC/H7RAp8Lql0Vb2fmXSWhBn2oHcMF1YrBHjE6YCkszpcrs+/AEANT/G5X5Sz98IZVGM2WsTIlikRPWUKfFptmZmbQf+MaBmE6VrG9L0gV/QVjdx892ZUpi72dZgLIN0P8UEi/Cyf/7Pndt04z9/tkZrRbAgLv+tgUxmr4PW0Wc7zeaxyMv83bZPYYSojTYczNboV7tw6B+jVaLiyh4lhIWSJ0Zn4Q/txkkUChNw04tvBJojP2Oy5LZJNa7Tzrsmqji3TYtWGD8vbr9Rn+t2c7uOmnDA/nlX9tLmi1bEPnJyIcnF9HEidcLBLI1146CTPf/GA2G5by0QP+j9N8YE3Dp9qoEWH2IZEYeiFPa4S3QrsTbeNE= 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)(54906003)(316002)(83380400001)(4326008)(45080400002)(508600001)(2906002)(33656002)(5660300002)(966005)(38070700005)(107886003)(86362001)(6506007)(53546011)(71200400001)(66946007)(64756008)(55016002)(186003)(76116006)(52536014)(8936002)(38100700002)(66556008)(26005)(6636002)(110136005)(66476007)(66446008)(122000001)(8676002)(9686003)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?koi8-r?Q?/vGo//rlUPMVgsfeRCHZ/qes6RF3SZn0G9YvMv1+cwm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mA9tnKd1/x5?= =?koi8-r?Q?8NumiSzyRuyGISx59KXFZpbCN/5UL0CTlhYZQlGfPdHrJIFKZRqQPnQEDd7mL2?= =?koi8-r?Q?+5LKaT6QbmAPDNdS+K0qiUwnNV/UyiRSH3QwInizanXL8EO3NuZuqJr1l2IPhe?= =?koi8-r?Q?dkNS0P/i/YHv+/4NAtEF+CvUe0Oy7sxDfbh691uHQD9VbZkAuY5BUD0gKU69P/?= =?koi8-r?Q?VixSGQyGTzCuijKKY5TXxWnm/olVdRbahoWuYkh7N9/B4dpEFaPdhgBurCoh69?= =?koi8-r?Q?sEtVvQkXooeatIl/8f3S1UBzgJFcEtKDs5OXe73+wltkuHDvT0czGOpDoP8m/i?= =?koi8-r?Q?98vqkOJcMrnN+ukM43Vduon6aMKByY14PoorqfJVYG1gY/MkKyJfGRsuMk+52m?= =?koi8-r?Q?z0hVqNS9Pa7OGI1T5gkpU=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: 133826ad-459f-4522-7cce-08d98e240395 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2021 08:32:37.9093 (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: yLK2ZpRURp4L5pBRez0OsdwUEWV/+/jWlTOQxaOQrkcVQcD5j45W+gzxZ47d2uwmbeYyb65anH0sPkgmI6Z6Ng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5297 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" 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@oktetla= bs.ru/ [2]: http://inbox.dpdk.org/dev/DM8PR12MB5400997CCEC9169AC5AE0C89D6EA9@DM8PR= 12MB5400.namprd12.prod.outlook.com/ Please see below. > -----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 >=20 > From: Dmitry Kozlyuk >=20 > 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. >=20 > In the future, indirect actions may not be the only type of objects share= d > between flow rules. The capability bit intends to cover all possible type= s > of such objects, hence its name. >=20 > 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. >=20 > 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 updat= e > the action before removing the queues or remove the action and all flow > rules that were using it. >=20 > 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 s= tart 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 want= s to check whether a shared object (indirect action) or a flow rule of a pa= rticular 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 t= ype can be kept across restart, 2) it's a normal object created that will w= ork 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 "o= bject kind" means only "type" or "type + transfer bit" combination; for mlx= 5 PMD it doesn't matter. One minor drawback is that applications can only d= o the test when the port is stopped, but it seems likely that the test real= ly 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 any= way. 3. PMD patches will need update that can be done by RC2.