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 2CB0BA00BE; Wed, 16 Feb 2022 23:49:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDEA940150; Wed, 16 Feb 2022 23:49:07 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2089.outbound.protection.outlook.com [40.107.93.89]) by mails.dpdk.org (Postfix) with ESMTP id 7356340042 for ; Wed, 16 Feb 2022 23:49:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dc34Hy1BmiUsLmVNM5+aHeqyXQtEc0j8JojNeHjFxQaGTvq/QarXb6d9c04hbe5+AGJjAduvSx/ToQyjQ6lXav361HBsqkqmTJx+08yoTvC9CQ2c19UQgPa3bvTKZiUFz03qpE45tr/GrehwiPsRXXdvT+3ebuz4XCmznweHDlw5W0dUIKBV0/b/1qfy4WqEkll8P0cwDmIYUGUzr0ibF20GUSvUbjGa3BPOu4/UcsKtbjzaWEbMgXwMJbftjvKMHCREqcYOSB/U31gOljxFp/AUgfcbV/b9ofbQLzpuBfSasO2uslogbnQpRsHj7whaxwghIP8ybT8T1278/rXOfQ== 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=uFuizU9vcv1XdYeCSt09c+AIjbUitFb+Hi/t/1TYt7U=; b=lnjcJZP+nIRIKAyYOOvQ9q8wKMaMGySM5bjso2rx9KJKoodNlAHKoBDrrP+kEACKZVlkil9QfGg9oAjlrany7NNiR6QrIQjOuIzBTHSkNK4lysapkyckwFtyCTpwAR5wBDg447TalcBJIgwgSMz2DCV7fLzkzHh96qujHKf7NsGegwiTIIbybKg3E6jYftUcmHtcN+wretBQ0aq0SWJck3PKa8Pn3lrKgArf2upVU4bIhQPUTWRaAV/t+E1IV/9MX5DHPvuH5T+EReYPEh6OCpcKnA59hQYEsQstSVMox40SFL/KDXzAPLWFc0d+BGMGNEfaHevzgGZJ5CA2Lvczuw== 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=uFuizU9vcv1XdYeCSt09c+AIjbUitFb+Hi/t/1TYt7U=; b=kyvSVxNzRQTMWrXox8cSumR/a7SWpRXtljXTUKMHH4TORNSXMtmjOrfntpoVDv/rdMOY7OvPDtmlUleLQxzmscngbJ/u1T5Lq7+Kty7OjvS3C37Nw6RpaKq+qS2gYASkfukFlG+wUjfMtMJyLDKiEuIBZa/49POuzNNtVLYQWgGSnIgmhqsF55Mr77cRfI9Ff1G4RKLrIM6dH4QeWHq6LeJD7DdewftQgJoGNf8o46eFqqt5pYVAkpy+mgxdXPXlwpLR8e62OzULvLkbrn2BhgP9AUkwz943G/MDySCAzxu48LN/9jj0cGt2heSxWmfIhd3Cbmp6DHs8m6Pm6sPxKw== Received: from LV2PR12MB5773.namprd12.prod.outlook.com (2603:10b6:408:17b::14) by BN9PR12MB5050.namprd12.prod.outlook.com (2603:10b6:408:133::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Wed, 16 Feb 2022 22:49:05 +0000 Received: from DM5PR12MB2405.namprd12.prod.outlook.com (2603:10b6:4:b2::20) by LV2PR12MB5773.namprd12.prod.outlook.com (2603:10b6:408:17b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.18; Wed, 16 Feb 2022 22:49:04 +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.4995.016; Wed, 16 Feb 2022 22:49:04 +0000 From: Alexander Kozyrev To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Andrew Rybchenko , "dev@dpdk.org" CC: Ori Kam , "ivan.malov@oktetlabs.ru" , "ferruh.yigit@intel.com" , "mohammad.abdul.awal@intel.com" , "qi.z.zhang@intel.com" , "jerinj@marvell.com" , "ajit.khaparde@broadcom.com" , "bruce.richardson@intel.com" Subject: RE: [PATCH v5 03/10] ethdev: bring in async queue-based flow rules operations Thread-Topic: [PATCH v5 03/10] ethdev: bring in async queue-based flow rules operations Thread-Index: AQHYHu7y3FcGuAodz0iSGh6vZDywcayOS7WAgACxk+CAAKmxAIAHJqVg Date: Wed, 16 Feb 2022 22:49:04 +0000 Message-ID: References: <20220209213809.1208269-1-akozyrev@nvidia.com> <6eac9cbe-cebf-f33f-eabd-79a4375916b6@oktetlabs.ru> <3214274.KgjxqYA5nG@thomas> In-Reply-To: <3214274.KgjxqYA5nG@thomas> 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: eca4eae1-7ef3-41d5-05bb-08d9f19e8839 x-ms-traffictypediagnostic: LV2PR12MB5773:EE_|BN9PR12MB5050:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6108; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Y/CteQC7sPQTWcVvjtpAfa+WllJOkjmLY5v6TGWwAta2dNakFb+wHYG1BbMlewWRBj4B8SDnkFbMbvXAzrWjFoJsEhnjLMe3APTWxm2DyvLQt54hhv+RfSIVeE1NBsNc4vVCQvIW9FWjpIZG5GT3ZsjcSTS3LmITwdz9z6KPW+OOXZZ4aiFap2R7y6oEADNMtg4ycbSagrfu3oHnwV/rSd5pttcLjY174aheDap9PGXSV1BKO2/UwnfvtHf3zluOS42I6+OQRY/Cf3domQ+hJDTZUJ/OXsJagNld01eVrhgCgMZ/fYuZHohXPkQ+N6X8BjUCxcCCyYxnHlnqoqcuOsfnLiHrMl+pcFUo0hys9Y2ZNX6xBtnOo/5gBQRwnvTarmI4KqkOQKjuDfqSJhO8Kawm2DZEXaDeVQKH6Y0shAI2EhxBt+tCebn3KkkQvTlVjN+KeN8VNj4Ow1xrnAYgnPKCgbalw4y4kaFR6PRNdYJV1p1tE77QbJKuKMURuHhGc5iDQcaaVXOhlSHpLERl5m2gB6gqkt0Kg6Cj2Go2vZ1XJ8MIVNZdlGuuEyO8nzLstuhMY8ISFqUoogbj3GE0r+SmSqCfaTip/d6iR4xvG5EtkJvVHvkSIVdryzNxGgb75DZQJ+gHD7tdEK3uOg+UiQSgBR/1AGDZ66m0UowNHYQW46+Sjc51b/8cM8yR0rZ/49mZhBk28denqkiDGWoF2Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LV2PR12MB5773.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(186003)(2906002)(33656002)(38070700005)(52536014)(7416002)(38100700002)(55016003)(6506007)(8676002)(76116006)(83380400001)(66446008)(122000001)(8936002)(64756008)(66476007)(66946007)(53546011)(7696005)(86362001)(9686003)(66556008)(508600001)(110136005)(54906003)(316002)(71200400001)(5660300002)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 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Jj0nqLcJjzpN49sbORo19dTsHuDzF2bncwLujtd2BW5mjihYJ9omUS?= =?us-ascii?Q?N+GqHxlkZzyZ24tQFOQckQGo5M43HIahsas/eP4IuS6HjP5QOxG8w1uu1cvT?= =?us-ascii?Q?sShCPd4UQlI8u/I4jKyi4eeKdOVGjyK2PtILMoMsE2Hm4/OVyoTMHayRdTXC?= =?us-ascii?Q?k13O3AuDQ3bLFa4xF3hMeOdJoXOKRPrdA6vOFNLOzOUvPvhtxEm46cIoVAeN?= =?us-ascii?Q?1QgpVPnGFb3EB0M9QIJZz/kMYwbWLu2LHFYdjhu50qxcme9SFvBCDEqP6IbS?= =?us-ascii?Q?op6aPVaewDTvEQfUxv1dEfHHp4bh+KIRipn0iSU+hdFx+w8t9MF5A3PB4OA5?= =?us-ascii?Q?3EFDhh/OL/ONSkVZh6Up9mWkC33Igwhu9UACPAy0zFwB/Hxf9zXk64nDMOg2?= =?us-ascii?Q?1sXhO4wLchOKedyvIxe5eViCTOzeFYv/DywNEt5L4ZNVVr49d/eZ6Vrx46Nh?= =?us-ascii?Q?QjgGaGmcVOWiApKQZIUoIdiqT2rOIIHrRpblpdXoKJFHDr2VsH6TiCAhbxbJ?= =?us-ascii?Q?dWISql7qJZzxt6GMhd0cP1qKVyJVyfobui6y02MJrH4ENq5DHESx4JHARq4R?= =?us-ascii?Q?UQwWLhvIeQVnWmkFpvpeK9rN+2iQXRlejbvI8eE912l1sal4XZcxMRpsbFuL?= =?us-ascii?Q?agkg89Bz4/6vgJ24Jc+aa9p3qAMeaOs0Cq1PMR6iR4wLcq3tCzn8ce7SKr7R?= =?us-ascii?Q?GCLSmnguBl6vrskb/+ZnNgcYoxHFvJVrtAj2RfclDTzyRC/9rUGTBqen0h/j?= =?us-ascii?Q?OYycgCXztECddRRX76NoFQdo9ehdidojf+tF9kDprRMLrZDkgWKv972tgsaV?= =?us-ascii?Q?cDC7VjDEVqnZCW81/QkffzfuYYU=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: eca4eae1-7ef3-41d5-05bb-08d9f19e8839 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Feb 2022 22:49:04.1107 (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: zNEDOuEhuW5iZ3U4E5ZXSP/ggxCT4QjrFISH0iXNmilUkijgsoSpSZQjhQ/F5TwgpZwE8BMzasFi92J5BKEK/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5050 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 Sat, Feb 12, 2022 4:25 Thomas Monjalon wrote: > 12/02/2022 03:19, Alexander Kozyrev: > > On Fri, Feb 11, 2022 7:42 Andrew Rybchenko > : > > > On 2/11/22 05:26, Alexander Kozyrev wrote: > > > > +__rte_experimental > > > > +struct rte_flow * > > > > +rte_flow_q_flow_create(uint16_t port_id, > > > > > > flow_q_flow does not sound like a good nameing, consider: > > > rte_flow_q_rule_create() is > ___ > > > > More like: > > ___ > > ___ > > Which is pretty lengthy name as for me. >=20 > Naming :) > This one may be improved I think. > What is the problem with replacing "flow" with "rule"? > Is it the right meaning? I've got a better naming for all the functions. What do you think about thi= s? Asynchronous rte_flow_async_create and rte_flow_async_destroy functions as an extension of synchronous rte_flow_create/ rte_flow_destroy API. The same is true for asynchronous API for indirect actions: rte_flow_async_action_handle_create; rte_flow_async_action_handle_destroy; rte_flow_async_action_handle_update; And rte_flow_push/rte_flow_pull without "_q_" part to make them clearer. And yes, I'm still thinking pull is better than poll since we are actually = retrieving something, not just checking if it has something we can retrieve. Let me know if we can agree on this scheme? Look pretty close to existing o= ne. > > > > +__rte_experimental > > > > +struct rte_flow_action_handle * > > > > +rte_flow_q_action_handle_create(uint16_t port_id, > > > > + uint32_t queue_id, > > > > + const struct rte_flow_q_ops_attr *q_ops_attr, > > > > + const struct rte_flow_indir_action_conf *indir_action_conf, > > > > + const struct rte_flow_action *action, > > > > > > I don't understand why it differs so much from rule creation. > > > Why is action template not used? > > > IMHO indirect actions should be dropped from the patch > > > and added separately since it is a separate feature. > > > > I agree, they deserve a sperate patch since they are rather resource > creations. > > But, I'm afraid it is too late for RC1. >=20 > I think it could be done for RC2. No problem, I'll create a separate commit for indirect actions. >=20 > > > > +/** > > > > + * @warning > > > > + * @b EXPERIMENTAL: this API may change without prior notice. > > > > + * > > > > + * Pull a rte flow operation. > > > > + * The application must invoke this function in order to complete > > > > + * the flow rule offloading and to retrieve the flow rule operatio= n > status. > > > > + * > > > > + * @param port_id > > > > + * Port identifier of Ethernet device. > > > > + * @param queue_id > > > > + * Flow queue which is used to pull the operation. > > > > + * @param[out] res > > > > + * Array of results that will be set. > > > > + * @param[in] n_res > > > > + * Maximum number of results that can be returned. > > > > + * This value is equal to the size of the res array. > > > > + * @param[out] error > > > > + * Perform verbose error reporting if not NULL. > > > > + * PMDs initialize this structure in case of error only. > > > > + * > > > > + * @return > > > > + * Number of results that were pulled, > > > > + * a negative errno value otherwise and rte_errno is set. > > > > > > Don't we want to define negative error code meaning? > > > > They are all standard, don't think we need another copy-paste here. >=20 > That's an API, it needs to be all explicit. > I missed it before, we should add the error codes here. I'll add if you want to see them listed.