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 7AE8C43B3E; Wed, 14 Feb 2024 18:07:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5837942E1F; Wed, 14 Feb 2024 18:07:38 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id AF93B40697 for ; Wed, 14 Feb 2024 18:07:36 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LacvLRAo/uDqjIJnuw5s3dZJYiEZ0BCbQQB6oBuRCxsB122LGAra9eeLuvhcHtQkwQ+mJ2uVrp4Px7InbDzIUkUCQlqsWlDGfsRWUr5AtupUQp0KjZLPfa/Yj40HwDOdCTTM35YroDHoqUWPIGdPPrO1L0Xn/0EuB29fWcDLvS46oI84jxKwyjRim1kV53ZY+jEz72bXFDzTcqIXjmLRFbCVoyl6s6syWx2hAMqmfM/61pTVcUQguXlhpSCUDhXZbkE5ofWiqCtBJiMN8Z5yCLYc11XB3Kbe69M0IgE0yy0418kHyJmrQiiMaqSnqIH5HMmxyYK8qJa120A42oFTdQ== 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=8GEli0ZUGtdyz0tDGeth16d0u2peqxLvrWSfErvrzHk=; b=cXTZsxwfcEAHj0LSW49vQKwRN4zNAMSAGkHO/ZEGnT1s3aYwUrMHot3TEogKtDax44gyxJyAuRn+1e3dzLPPl8RI0skcliu084WOpZOCRczx7ypGLsp/8+ZzgXDwA4jiHKVeXzxGViQL1rUDtl+ecZUusMDp2ZprmlSboXKmqDKfSRS/pRjvc7kSeDkBYqT2bFwYP3+Kk+wvpK3TUDcHIUknaH5YSqxc+EU5RATPl7VJQUFeqpGXamYUxH4hVE4YBKHEvmpXnJm52A6k6xHqgeO+TNlaZr4G/H0A3VR558vb8xgYiwtjtT+82Aj8Yo2KVnmvDZdBVjxyWixQYbuqTA== 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=8GEli0ZUGtdyz0tDGeth16d0u2peqxLvrWSfErvrzHk=; b=lgxbx4Q5OngvVVDZxDYa3B8nqr2DhONqAqqbSEyVW7a1AtGAcS08IxZHFJQZaxfm3U/eiX1fBnE1A3jDDs7BchGRoQXdSNlnePy95d5j4y4bCeeB302MQhFZhaF1nCSPCuspT/sPwwAVolN4RGrLPY3qp2+hniUubWBvKQihV8sxU4+yPWKrmMbNjFoZB9wS8sbe6irOq4Pnzx+WTxU42IGtnEWNnI66z1HnjwTobudwx9GaMckvq28VUqqbALLS2b3sBm33LUnbmFIpCSjc1I30h97vY+NhFhybQeMOQKxQ1iSRUZlscRjEn6nKPmE1DUrt4VPKAMgDK4TSKSCVKg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from IA1PR12MB6332.namprd12.prod.outlook.com (2603:10b6:208:3e2::13) by PH7PR12MB6694.namprd12.prod.outlook.com (2603:10b6:510:1b1::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25; Wed, 14 Feb 2024 17:07:33 +0000 Received: from IA1PR12MB6332.namprd12.prod.outlook.com ([fe80::22fc:4326:d657:92ad]) by IA1PR12MB6332.namprd12.prod.outlook.com ([fe80::22fc:4326:d657:92ad%7]) with mapi id 15.20.7292.013; Wed, 14 Feb 2024 17:07:33 +0000 Date: Wed, 14 Feb 2024 19:07:28 +0200 (IST) From: "Etelson, Gregory" To: Ferruh Yigit cc: Gregory Etelson , dev@dpdk.org, mkashani@nvidia.com, Ori Kam , Aman Singh , Yuying Zhang , Thomas Monjalon , Andrew Rybchenko Subject: Re: [PATCH v7] ethdev: add template table resize API In-Reply-To: <8dda8697-8719-46cb-be65-eababae1ccf4@amd.com> Message-ID: <91415555-d916-b2a4-9fbf-0c98bb271543@nvidia.com> References: <20231217093205.321082-1-getelson@nvidia.com> <20240214143218.62630-1-getelson@nvidia.com> <8dda8697-8719-46cb-be65-eababae1ccf4@amd.com> Content-Type: text/plain; charset=US-ASCII; format=flowed X-ClientProxiedBy: TL2P290CA0007.ISRP290.PROD.OUTLOOK.COM (2603:1096:950:2::9) To IA1PR12MB6332.namprd12.prod.outlook.com (2603:10b6:208:3e2::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR12MB6332:EE_|PH7PR12MB6694:EE_ X-MS-Office365-Filtering-Correlation-Id: ffab4460-1a06-4f40-1ea5-08dc2d7f6f0f X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S7V6iH6NpfGisUB64hJczgn2gq4tx0/5ZTQFUVc19C0pND+B/cq+YRKzVA6kx0W7py6h7WboUr0A/bCQj558Tdr6ge33eDwucc6yeCp9Xcbtg8MvwNwBD2ONuo/SYVLPlI5b0qU7GZAQyPjT+Pv2ybN5ObrwIOZT6Q24F7rnySpBZy7jmnvDlWzPuXi55FUPZW/nzhTrkFxfcrxriljxjhqA8O7oJMmwvngFVQBN2em1Yyr44GLrLKwYoX35AxqUh9lbm744Wh8zBky00T8aRCvRzCg+x4XDnXmCeHAqfN1k3Kv67uT4B0OacKENOkDaYvsij86xpmNsbBh0EW72Efp8+AM4ol2vkzpCi8tvId59G3Ri4KkvsYqY3f+6GLQUYusTCEa0eKr6U/pXqcqFJ1zffL99ntwQvQn1m8/nsxIzN+T5jgU5BBAFFJsUk75mhCNieX0kYj0ik4Ux0Cbh6H0rdYLteqvgOVeMeT8+BaNaVhrkTlwC7uDDFBvS+BZ5i/ak7A7rFb8YPNePwkUQUExNJlVzHeLHhmNeU0OrwBTXgUhkAhpTV/FaryNjv3Zu X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR12MB6332.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(136003)(396003)(376002)(346002)(366004)(230273577357003)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(41300700001)(83380400001)(2616005)(38100700002)(478600001)(4326008)(8676002)(66556008)(6916009)(5660300002)(66476007)(8936002)(2906002)(6486002)(6506007)(6512007)(316002)(6666004)(36756003)(54906003)(66946007)(86362001)(31696002)(31686004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ilFITJQk1GzeIUkHWQQfrlEjLhEKJPo0LoIVqilN3N55WRtlO/ZMvFwf3Q1a?= =?us-ascii?Q?FfzJjqmmIcu4LBboCE1okSPyJmeTWOYrKwTI9N1RR+z+mqzpoFdMhH9H+IDV?= =?us-ascii?Q?WkRQNyAYMJcUZrYZZAkynoP7zHhB0HjwgikHrltLbNGy8rn5JKlyFf9ERwxe?= =?us-ascii?Q?hpTklACZ2yaDz2gh60HNm9mbW/ZRSwjk7RxreTFng4huzZgm35iI+mv6HQgk?= =?us-ascii?Q?PK8LgQxT++oJzbC7lUdQHrbCNeZCIM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SrijS34BVJxpHJUvpUDUhRCsXI0HGq8vamW7keiB11zWTSoabMQDH?= =?us-ascii?Q?6MVx1d3puwP+V12wwnt8ykZHD0fvQmIocFLr3RsJNch8sBcgi1zdrnrz42VT?= =?us-ascii?Q?vaMCG1tR5j2SgxXen7cP19ECuJ2V5vlgsv05wAUQn5YiyiBq72xdCo/43760?= =?us-ascii?Q?5nE0Tn0vzloU5v/EK0Zz8mziN9O9EanH6mC577VUZVd3IIHi3gfwxr0xVnF1?= =?us-ascii?Q?7JOuGs8rYuc5XE/pNiHimu11+MUSqmk6r57/us6i2YtxCvSMzLlKYKGDxBh/?= =?us-ascii?Q?HSgO8YjqBBdKq8/jSKOzOMUZh0kVEkfATBSWpbIj0szO6pEbNxKmTwTG2PD+?= =?us-ascii?Q?8FuAgH4J2Nd0TBYCDzsSLkVInEBGTyro43c9Iw/E4vX1+83n1pW6/ByIQRhq?= =?us-ascii?Q?BitDr7bRr1cu270FRXOOh5pwxMrU4GjLhYLk561Ra7JdLaUAc9PMu3ctILMe?= =?us-ascii?Q?DaNZmMsR6V/fuECSu3cBVRGN1cB3iaviE0BHeeYK1BgH?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffab4460-1a06-4f40-1ea5-08dc2d7f6f0f X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB6332.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2024 17:07:32.8992 (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: L/QUSGN519FIsryj9qbTc7Ovc5TYTM1sf2d/HPOOmXnaMJc99ayujjq2SPWprhPcA+tpaeCZ2+X0NB7QM5cXkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6694 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 Hello Ferruh, > > Having conflict while applying the patch, can you please rebase it on > latest 'next-net'? Will rebase and update the patch. > >> + Query wheather template table can be resized. >> > > s/wheather/whether/ > > <...> fix in updated patch > >> +__rte_experimental >> +bool >> +rte_flow_template_table_resizable >> + (__rte_unused uint16_t port_id, >> + const struct rte_flow_template_table_attr *tbl_attr); >> + > > Syntax above is odd, why not move parenthesis to first line. Agree that's odd style. DPDK prefers that way. Please check rte_flow_driver.h::rte_flow.ops. > > This is different than previous version, I just want to confirm if this > is intentional. That API version was discussed with Thomas. The alternative was to introduce additional function call to query whether a flow rule needs conversion after table resize. As the result, the application still needs to iterate on all table flow rules. > > Rules created *before* resize must be updated. That part remains. The application must update flow rules created before resize. > Rules created *after* resize not need to be updated, but if API accepts > them and just returns a quick success, Calling update for new rules will return success without flow update. >this helps user and even user may > prefer to not keep track of flows as before and after resize, The application now does not need to differentiate table flow rules. All table flow rules must be updated after table resize. > >> +/** >> + * @warning >> + * @b EXPERIMENTAL: this API may change without prior notice. >> + * >> + * Resume normal operational mode after table was resized and >> + * table rules were updated for the new table configuration. >> + * >> + * @param port_id >> + * Port identifier of Ethernet device. >> + * @param table >> + * Template table that undergoing resize operation. >> + * @param error >> + * Perform verbose error reporting if not NULL. >> + * PMDs initialize this structure in case of error only. >> + * >> + * @return >> + * - (0) if success. >> + * - (-ENODEV) if *port_id* invalid. >> + * - (-ENOTSUP) if underlying device does not support this functionality. >> + * - (-EINVAL) if there are rules that were not updated or >> + * *table* cannot complete table resize, >> + * unrecoverable error. >> + */ >> +__rte_experimental >> +int >> +rte_flow_template_table_resize_complete(uint16_t port_id, >> + struct rte_flow_template_table *table, >> + struct rte_flow_error *error); > > I think I asked this before but perhaps missed the response, > it is possible that user missed to update all flows and called this API, > it will return -EINVAL, in this case it is not clear for user if there > is a unrecoverable error or just need to update more flows. > > What do you think to send a different error for the case that there are > flows not updated, so user can action on this information. > > A different error is good. What about EBUSY ?