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 48956A0C45; Tue, 19 Oct 2021 00:51:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 162DF40683; Tue, 19 Oct 2021 00:51:14 +0200 (CEST) Received: from AZHDRRW-EX01.nvidia.com (azhdrrw-ex01.nvidia.com [20.51.104.162]) by mails.dpdk.org (Postfix) with ESMTP id 19E8E40142 for ; Tue, 19 Oct 2021 00:51:12 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) 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; Mon, 18 Oct 2021 15:51:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IYnIUMjDPGj9MKnxWpqa7TXKZg5amGqknST/c/J+5Y6Qi6fv/XO6qSmRSlAjkGWzLFKO3el0ZEUVCzDGBLkGnrsTOOowc9RQ5/zQmxBQlrTaHhutdw8hhEFM5ATnMEpV01BWACX1avvUpqcMp0EhS2DAf+o2yj0nCCjHhYXGHuvHh0lyMF6iQEHd4wbLAywJGVd8OHw1nnpHuZMMfcyBq32x/mzfxyde/a5Krl6Wabtj8wd8Mbi/MR42bnCQ++L6MPeaz55J/xo/tH4ZKsHxMXMdA1qiWliHrIDX8FNnn7ZKuszLPhuPusnmjUajJdms6x/hi15axo/SDPJkIhqchA== 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=F/NtdZfnmpO6Uusp5dunt8KRUghHyAhEaQ3+2pjd9s0=; b=ZWG6Ezbb3ZWuW4s7mqYmP6KAFfMdIldo5Miqk2qlJviNazKc+g7IbzMrexDTmaZWvTgsAAXIYiEFraMCQwfNT3WvJv61s9aOieG0EhMsl9pBNy4mDwhl1NtnoufI6wal66TCYqLJzScXE+gqN0qjEcggqxREmhlRm4C/oaX18RspUtjqMXll5U4+2xZKvssHMe7MS+5ipbCdRf+5iq+MDUMQvaBIA4Rap0H+OyFu9cf8VAUNXQ/1/huu2bttlKL3C5Rhwa6ehkEOyMete337sepNlIN+bxs0EGRPcuIpm0OtbvL9el/nM4iEDoxxJ/VIn09MWFdwVmsDNh8FLHkGUQ== 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=F/NtdZfnmpO6Uusp5dunt8KRUghHyAhEaQ3+2pjd9s0=; b=Z7MTTn5ABJ4/jWaiMn5uR4P1G1cRj+Ve3Ay+/YogtLcAlAjERY5Azu2i9J/JR3F0XWX5HcDvk37/U8RXvQn8HFAPfnEwUhGPb2ZZh9N4RRd730KALg90E0eAAElqdWc0MXCutkt8bW7iHHlrEzTnrmfW/Yv2e1kUsoK02a36SPsaJlm8yLIHL6OmkpBA/F9UuSMWgDn9FaIpAfYQ61B9x1DgQ/Ffmm9p1CmIwqpEXnUBKtmDTT9rvhcPKqsme1rd/rC5WOTxjObV+T+NIP1s2PDBXmRYZtPkWpXQv4Dp7y45OQHW5FpSJ+YzxGhxNeWYexYWAHE/FWRhyXZsOn32EQ== Received: from CH0PR12MB5091.namprd12.prod.outlook.com (2603:10b6:610:be::10) by CH0PR12MB5185.namprd12.prod.outlook.com (2603:10b6:610:b8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Mon, 18 Oct 2021 22:51:09 +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.4608.018; Mon, 18 Oct 2021 22:51:09 +0000 From: Dmitry Kozlyuk To: "Zhang, Qi Z" , "dev@dpdk.org" CC: Ori Kam , NBU-Contact-Thomas Monjalon , "Yigit, Ferruh" , "Andrew Rybchenko" Thread-Topic: [dpdk-dev] [PATCH v2 1/5] ethdev: add capability to keep flow rules on restart Thread-Index: AQHXweBdVPm/GIYaO0OEF36AsQXRQ6vYvgoAgAAfF1A= Date: Mon, 18 Oct 2021 22:51:09 +0000 Message-ID: References: <20211005005216.2427489-1-dkozlyuk@nvidia.com> <20211015161822.3099818-1-dkozlyuk@nvidia.com> <20211015161822.3099818-2-dkozlyuk@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0df33d2e-6252-4f07-2345-08d99289c706 x-ms-traffictypediagnostic: CH0PR12MB5185: 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:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: H6mZZSnJLzdcVUxpNglPTK5IFPCQMvaCkNY0LYp/HnxMArWQRZaLcoZau6KMJn3YpAhxaX37lMqlsIqPhQsoIQB1knzx2444pq/imzqaJaxufHTOtyHrbwRMDb/St6vVt8+lRLynJku5qjkXo4jIfmousOzFjG/4SaQq3wNw/hDo4uzY1IRdNgnMXR1Uya7kZSIh7LGEMLPQO6FFG2eHkNflvFC7wNkavWBv1TI1H9HWYUziIYTETAnszPr9TWWe6pNYn+QIfgcBlg4CXJ2jnLUbZBBqllDEdKpPrCVTdOpQtBhjpi2L6B6MH9Kzu3iaMiLwf7SExL1wiF3sGVP+qX90WXtjMlZ9EsNp0csRAo3V+/L95C7ZAdaG4XWKfT4kbahut2BQjCBDqM4k9rhGkroi0h0MEjLtdemrBmo1pE+EdpTP9ByihfmEmGcBVLYmhuLDedV/pbxRqpiEhIOTdQPtzdUyL1nl8zybDIkT/vfqEhqYsL+nYNp1f9LszD6welAm/O6rLq7D59sbJQ69UklDUGGny4uPRcek/dGJSA/3qdiuJHBPXR4b5tBs+pPMGV+kkW6q2Gj7E5xJWbbwdU6itE5jc8ZBRIW79bnC+4GC3wsnbPvenlBefDBvQC5G+TVI+fKlXqf3/i2xUSDvTchc50llF7noaLlQkyn7tQmAuaQ5VVB1qnLklX2Ht/XtBG26g/kwW004aWm7uOL9rw== 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)(5660300002)(66946007)(186003)(64756008)(8676002)(110136005)(26005)(8936002)(4326008)(2906002)(38070700005)(38100700002)(508600001)(107886003)(71200400001)(86362001)(66556008)(66476007)(66446008)(122000001)(54906003)(55016002)(6506007)(33656002)(83380400001)(52536014)(53546011)(76116006)(7696005)(316002)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?koi8-r?Q?B+4hcF+vrhhCc+3Fj+n9iwW1kkPjCqyLPSGNdc+crqhsvbGv4R7xab0fRjrLm4?= =?koi8-r?Q?GEMivP8sN1tjZAknfhn8f8YOuhguqnUjVjy7w+uZcqmNf8kbB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HzWhlWtosHoIbnKjCVVZkxjykoKvr03EdyYnrwywSnx4UMK5JB5K68bH0kp?= =?koi8-r?Q?6J2cENtOHk/uljxrfu8glrrBWsfWekTmaCOxEgftMcBCI6K2ng+27Z+jcLR0Bp?= =?koi8-r?Q?NjgI7TUKNL0hDpA1eNoDLzkMRo6bgmMZyrV92c71HHtREyhuepngMxKFCl2Lol?= =?koi8-r?Q?G4o7Jtk9oSTnpmRouHwpBhdOcQuSWgO5AntqpLhyNW96PvE0tXSwjLfccsAQ2y?= =?koi8-r?Q?D7/5c4cEgbX4d9mIKfiFWFshhkWS+aP0PH27vmussGyuvuIn81TXzWTQlBMlw1?= =?koi8-r?Q?Y9KIveihdnapXUVTp5+yU=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: 0df33d2e-6252-4f07-2345-08d99289c706 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2021 22:51:09.5375 (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: dkozlyuk@nvidia.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5185 Subject: Re: [dpdk-dev] [PATCH v2 1/5] ethdev: add capability to keep flow rules 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: Zhang, Qi Z > Sent: 18 =CF=CB=D4=D1=C2=D2=D1 2021 =C7. 16:06 > To: Dmitry Kozlyuk ; dev@dpdk.org > Cc: Ori Kam ; NBU-Contact-Thomas Monjalon > ; Yigit, Ferruh ; Andrew > Rybchenko > Subject: RE: [dpdk-dev] [PATCH v2 1/5] ethdev: add capability to keep flo= w > rules on restart >=20 > External email: Use caution opening links or attachments >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Dmitry Kozlyuk > > Sent: Saturday, October 16, 2021 12:18 AM > > To: dev@dpdk.org > > Cc: Ori Kam ; Thomas Monjalon > > ; Yigit, Ferruh ; Andrew > > Rybchenko > > Subject: [dpdk-dev] [PATCH v2 1/5] ethdev: add capability to keep flow > rules > > on restart > > > > Currently, it is not specified what happens to the flow rules when the > device is > > stopped, possibly reconfigured, then started. > > If flow rules were kept, it could be convenient for application > developers, > > because they wouldn't need to save and restore them. > > However, due to the number of flows and possible creation rate it is > > impractical to save all flow rules in DPDK layer. This means that flow > rules > > persistence really depends on whether PMD and HW can implement it > > efficiently. It can also be limited by the rule item and action types, > and its > > attributes transfer bit, which together comprise the rule kind. > > > > Add a device capability bit for PMDs that can keep at least some of the > flow > > rules across restart. Without this capability behavior is still > unspecified, which > > is now explicitly stated. > > Declare that the application can test for persitence of flow rules of a > particular > > kind by attempting to create a rule of that kind when the device is > stopped > > and checking for the specific error. > > This is logical because if the PMD can to create the flow rule when the > device > > is not started and use it after the start happens, it is natural that i= t > can move > > its internal flow rule object to the same state when the device is > stopped and > > restore the state when the device is started. > > > > If the device is being reconfigured in a way that is incompatible with > existing > > flow rules, 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. >=20 > What if a PMD does not flush rules during start /stop cycle, but just wan= t > to simply flush rules during dev_config? > Is it reasonable to take above as an typical implementation to avoid all > the complexity for handling the conflicts? >=20 > 1. queues are destroyed and re-created with a different number which may > impact "to queue" action. > 2. hash key may be overwritten which impact RSS result. > 3. offload flags changes may impact data path selection which cause mark > action does not work. > .... Hello Qi, Yes, it sounds reasonable that rules do need not to persist across reconfig= uration. Unlike indirect actions, they are too numerous for PMD to track and check. I'm not sure rte_eth_dev_configure() should be specified to implicitly flus= h them. Some PMDs may wish to preserve the rules even then in the future, so we don't want applications to rely on configure flushing the rules. It can be specified that applications should flush the rules themselves bef= ore.