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 8F655A034E; Wed, 9 Feb 2022 06:40:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60553410FD; Wed, 9 Feb 2022 06:40:04 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2076.outbound.protection.outlook.com [40.107.243.76]) by mails.dpdk.org (Postfix) with ESMTP id 9EEF0410F3 for ; Wed, 9 Feb 2022 06:40:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LrvjOdsQ2GLtHIcmsAJp1/ooHgGkAGk/KuB+o1Z6uXu0UkZ7HD0tyxiTKYHQYakZaCkHYvnpnfCX3gA/Odc03Y2V5KZRavhAPNheiuxynnoCi94sD9WgiycYTNPPqC0afkVakQlgeBvl9Z7NJcWiwXcjMzg/SAGyzCnncMBOlVaX1JNB1ld8qRrsKS+97RCDYSQZjl5GDlFEdNusG6NOpuZZspN7XiskR+C95nAIE18acSUA+z0x2kQgdIEuzF8Vx6uN7r5HoGhJWQO7K6lpEdShdOT6gWLn+kh4esgxU8NKLi8OMcmWjLm7h51Nd91M6PEpHHmq3BclpW1jUb1/qQ== 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=VcXAveDIreJQlUE5kGriJWETSJNaEPwJjQ1xTzET6bk=; b=Dh7B5/FZe9O2qQeQFurcrtZI8A/OiosyWMVZzkvrN6FsMc2DRlb+uoJ7Qz8SWec3mlZtlWLVNtDbgTnPgiSYb+IATdmA8nFOVZvJmSiOYkK5eQpkaIR1/6qjc7epO8KK+6VngZSu9sGEH2Wg7DJ+qbtiE4tmL4qJyp47tv+AcEgSramb8GJM8qNAI/dWXAKPF+RLci7Mq6GqCePJ1mnglB/0+1KlcutLZiuk4zUoSpxrJEjYoYCgRHYgESTmysiQrBhdZhYmTDGjBZi6SodfLO9z/HdCHXB/RlKYPpVFE07VhVmHE8Dqu/arfI/RQLr8FyWfpRjPRjKYKQJoNRNtdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=VcXAveDIreJQlUE5kGriJWETSJNaEPwJjQ1xTzET6bk=; b=grFqtlwNC49OwEEGbBIMIBeKb3l3JEKmNVYI59fpfVdX31M+81SNrDUKdZKNMGAHJW90ZiRNoN4YFwHe668v/fd7HDtAZnPNc5XzGUubz6jVPI4XasEINjPtoCiFopLRbnplSuku13OK+sjXjiJ7hPWVzWdGITdPdZQF7Phfa4q/eShuj1anRL90HAlV9gUO5s0bNyYMHa/Qalktf9kGufpBAbny8ClzLMPgpdZTQydtMQd0uCKgJLWinq20S27pYwjxViEK3ekJHhd4so/I0/nIuOjr9R/Cp7wp2efjLRLmcfc9UbqNVly8YcV6wnTb/7JDoQXeHCyJWVQV6qJedg== Received: from MN0PR12MB5764.namprd12.prod.outlook.com (2603:10b6:208:377::8) by BYAPR12MB3109.namprd12.prod.outlook.com (2603:10b6:a03:db::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.14; Wed, 9 Feb 2022 05:40:01 +0000 Received: from DM5PR12MB2405.namprd12.prod.outlook.com (2603:10b6:4:b2::20) by MN0PR12MB5764.namprd12.prod.outlook.com (2603:10b6:208:377::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18; Wed, 9 Feb 2022 05:40:00 +0000 Received: from DM5PR12MB2405.namprd12.prod.outlook.com ([fe80::cd5b:cd8d:cd38:8c31]) by DM5PR12MB2405.namprd12.prod.outlook.com ([fe80::cd5b:cd8d:cd38:8c31%6]) with mapi id 15.20.4975.011; Wed, 9 Feb 2022 05:40:00 +0000 From: Alexander Kozyrev To: Ivan Malov CC: Jerin Jacob , dpdk-dev , Ori Kam , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Andrew Rybchenko , Ferruh Yigit , "mohammad.abdul.awal@intel.com" , Qi Zhang , Jerin Jacob , Ajit Khaparde Subject: RE: [PATCH v3 03/10] ethdev: bring in async queue-based flow rules operations Thread-Topic: [PATCH v3 03/10] ethdev: bring in async queue-based flow rules operations Thread-Index: AQHYGwlnDmLMwesmoUSfsU5L65HKrKyJfvsAgAAsWwCAAB5egIAAxjig Date: Wed, 9 Feb 2022 05:40:00 +0000 Message-ID: References: <20220118153027.3947448-1-akozyrev@nvidia.com> <20220206032526.816079-1-akozyrev@nvidia.com> <20220206032526.816079-4-akozyrev@nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 77a6a6a6-e5ef-4827-973f-08d9eb8e9d10 x-ms-traffictypediagnostic: MN0PR12MB5764:EE_|BYAPR12MB3109:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr,ExtAddr 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: OazrC5ivgHR/bzOsEzjjDyszeurcwEuNAWlLo7Etkr3NWjsWtTzA0bi6tKsCFPWYGPtyFiOnxccOjtPZkVjZoqqS5ZKuwZuO2j962fIZoAuDz3TfTptpUyKNKsA6V1o+aKL6JVhWWDms2DNgF5aSsLHm5MVwOx19gQKzq2w+HHeoLRPldPTx3sQKTNKkkQBQrMu/Q5RiKKgj+rZZiSChNZxXeDxK8R5eXNWE4B9T88c/bLYA4cmsKmYNcgF+s9Yiq5/A6W8llM89iVIQMmQ/MrX+4T08PmTYD2L7qxacHEGVyoQMJ9bLPY6GQP63/tbTdmEeSoHBxUnNVng9dU45/0QuGAIJ5J9lff55FwqLozWvNISUL39c4UJAdnS0PPZsx2n2+K3PexJJBA63nBmmKAyNPSlH67pAm2pkyHykhj8zsF2C4o05a4guu2/KvXmARNGDaE5NOW6EC4rtV+tC4aH/pUVFY9PAd6M1M1o8Wtk7fQoDfWnXda1XKeUeg5rWEy9wjDwT6C4VuMOgH+8aXae8zAdA8tffrgl/US0knAm+0cnCgoOu0eL0t5Sj9XhFgTXLCWmWrPdpYmAsH8RhzTNgoAXE8PO98EPRMvPh5nAR9c0VOqeQKvZ+gTkTvzdbTgd0IG5h8k1Jj9rTo9TfTkzgiNA1r2mBW91TXhU29K4T3EnZFF9uvL6WhXy1Nmm6JtZdoYgzIOGVFXEtoyL9dw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN0PR12MB5764.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(7416002)(9686003)(122000001)(38070700005)(55016003)(52536014)(5660300002)(54906003)(316002)(186003)(83380400001)(26005)(71200400001)(64756008)(66556008)(8676002)(66446008)(76116006)(66476007)(8936002)(2906002)(53546011)(66946007)(6506007)(508600001)(7696005)(4326008)(33656002)(38100700002)(86362001)(6916009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RXCMq4FWgRSOWqGoPiNH1RaN/oaaWh45bWJFg/Uo7gX997+As3OS9fTWd2bv?= =?us-ascii?Q?fYpy/NOMi1XiA7NveUO8KPbEqbObkiwmyVjysGAmPp1mL16l2tR8Wq6I9d5M?= =?us-ascii?Q?vnH1HJsLdYQWnE8y77TTUS2yX3UjhJb43TiLzs1c5XblkB8MThMgcfIYuxDT?= =?us-ascii?Q?3j/dlRggTtuwp8cqj12ZMngz4H9LNGrUWs+Glq/oDKC1XV2tbjbAm0rh93Ib?= =?us-ascii?Q?Crp7nMROiqLWs69RnwD/e8qCDz2jLdMxVxcqZk30nxuA+6cDdEesQkHXljDC?= =?us-ascii?Q?BGsBImWSnHAIQQMTpCmdKJptoKLhUSEdOmsRLo6LfgRkwG0NDowoajBW5cVC?= =?us-ascii?Q?tB/8a21yXQlR3LYC/ckcP5Je6XeS2AZz+DC0I6YZpKZWK028ALCQ3g0hl90q?= =?us-ascii?Q?4AX3lnGs6SPcsbohABbN1c/+2JN1NnlUflGxcxTG4S1nZs73Q3scBlvDbWxK?= =?us-ascii?Q?JKH/XT5C/4lQ+gseTM+xZtgbl73JQlYvXcIIlyudctuUdoUjvMWULZAkfc4+?= =?us-ascii?Q?4NzJhszn6eEf9rcEmMhruE96JUOsUcz4aXPH18NVan+WRkfan2YG6//NP3WT?= =?us-ascii?Q?Fh9PZMRjdR2GUGzRhhMuu+2bo6bJs2gBmSg7JyBZe7ARz4++UAgFbh3WJmGm?= =?us-ascii?Q?j+S2ikJZ3HHqbMZIRh02zRzgmlQpZ3Wqlm2scq6UicbMiMjVoyIo18BWmZ1d?= =?us-ascii?Q?nudwThHAJrECkBcz46Lgu0mIRC59zpP3baaBHMZLj9CqZS8gNZE3pTObzci8?= =?us-ascii?Q?7dzSfznbYI42PKL+/XgTiBztoRlylH0GpPFVWVOG+QOeHm4pLqY1uIVAX+0X?= =?us-ascii?Q?tjm8clE5+dXVNP98qmYVwl5+nPMBTvys644PqxYPO12fltPgxEHfXm7FTGD6?= =?us-ascii?Q?ydRBuvmVMEjDJlAki2jCnMRVSv5r5I14/mmAcW8bci6j8H/7mNAnPpRtVjOP?= =?us-ascii?Q?yWxxQHhRCjG4SvKAHDbCL+LDvp7CH0kMWLf5pyEK2Zjby2VJrxUZ/rO6XgS4?= =?us-ascii?Q?5UUcFsWPxAmzpXV9ysJWMM94j4jG+jkcyTkomvf+Y1lG2OFLN6qbUfkgKTHC?= =?us-ascii?Q?Nz7P01xJP5TYFL0ulcQmm8UGYtVe14XINY08BJVjcLs0nCW/Y7U/Zy8/WB0M?= =?us-ascii?Q?tuO5nSFv70NJjlZwsTRYvwp6xtDpInBg8EA1KTrktPYen152nTRs0t2LCErK?= =?us-ascii?Q?2f8cypC/W34EnJ6Z7ckLQyCudZNVZKDY2TShZnIIxseyCz51+W+BmRk1ZZ1Z?= =?us-ascii?Q?zaFxY+EXVDe3DUTmFaQ0JZYPRUU3MHvnLusw16NCY9dBRyD7jCTw0H5e1YVh?= =?us-ascii?Q?ISee/phZlvn9s1sf9EVu9rezDn9nofgEhFFTBFexATeHM6HHVr4AcsLfHfpj?= =?us-ascii?Q?K8ddkq/pO9/WeipfVifbGRezz9JYHLMIjShtiXQB4wkGRrn1QmbZw02lSPQG?= =?us-ascii?Q?26EfuMwNxKLylUBHdsnvqVQRAsMNKc1FxD+mefJEx3WZhQMnZRWOdLzQA0R8?= =?us-ascii?Q?SkBvVRHR4mpPgJEKbK8qxnB9SsU8gb56ZgmRaZfDcYrpnmlufB8XeEB2M+st?= =?us-ascii?Q?7OXo6TRVuDN8YHQKH5+ueRIIwUxnCvlrI5SUbI8IZaasKXZydHo7IiMLzUx4?= =?us-ascii?Q?gg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB2405.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77a6a6a6-e5ef-4827-973f-08d9eb8e9d10 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2022 05:40:00.1379 (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: K6an+AgLlN/AKi1P6S1nOtBrpqf29CXM7Pck+qUDZaUyl3ChKz96y93YbJZcJU7Uc6yShovCnRuGVva2az+m8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3109 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 On Tuesday, February 8, 2022 10:24 Ivan Malov wro= te: > On Tue, 8 Feb 2022, Alexander Kozyrev wrote: > >> > >>> + > >>> +Enqueue creation operation > >>> +~~~~~~~~~~~~~~~~~~~~~~~~~~ > >>> + > >>> +Enqueueing a flow rule creation operation is similar to simple creat= ion. > >> > >> If it is enqueue operation, why not call it ad rte_flow_q_flow_enqueue= () > >> > >>> + > >>> +.. code-block:: c > >>> + > >>> + struct rte_flow * > >>> + rte_flow_q_flow_create(uint16_t port_id, > >>> + uint32_t queue_id, > >>> + const struct rte_flow_q_ops_attr *q_o= ps_attr, > >>> + struct rte_flow_table *table, > >>> + const struct rte_flow_item pattern[], > >>> + uint8_t pattern_template_index, > >>> + const struct rte_flow_action actions[= ], > >> > >> If I understand correctly, table is the pre-configured object that has > >> N number of patterns and N number of actions. > >> Why giving items[] and actions[] again? > > > > Table only contains templates for pattern and actions. >=20 > Then why not reflect it in the argument name? Perhaps, "template_table"? > Or even in the struct name: "struct rte_flow_template_table". > Chances are that readers will misread "rte_flow_table" > as "flow entry table" in the OpenFlow sense. > > We still need to provide the values for those templates when we create = a > flow. > > Thus we specify patterns and action here. >=20 > All of that is clear in terms of this review cycle, but please > consider improving the argument names to help future readers. Agree, it is a good idea to rename it to template_table, thanks. > > > >>> + uint8_t actions_template_index, > >>> + struct rte_flow_error *error); > >>> + > >>> +A valid handle in case of success is returned. It must be destroyed = later > >>> +by calling ``rte_flow_q_flow_destroy()`` even if the rule is rejecte= d by > >> HW. > >>> + > >>> +Enqueue destruction operation > >>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > >> > >> Queue destruction operation. > > > > We are not destroying queue, we are enqueuing the flow destruction > operation. 7