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 292D04327C; Fri, 3 Nov 2023 16:53:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDCAC40263; Fri, 3 Nov 2023 16:53:06 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2065.outbound.protection.outlook.com [40.107.93.65]) by mails.dpdk.org (Postfix) with ESMTP id 9D9574014F for ; Fri, 3 Nov 2023 16:53:05 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IyEwoXoTl+ib2ruL5pcPl2HodmOq8T2WIJCD4j7RJM42ugm3DgXSQ/9l2PjzakIHDEkBvAuwct+lPKhiSSA5vYRGOZuxBL2SuKVzp9WorDvAB8XaZ2o+rEbx/Wmq+zPPSVTfhPrnrsG0cF0PgBnf+Sr8dXkmterqqbIYK7j8VfiLvR3YR88zPCPf8OTx0V67V/ER21Fu93xue5AIgh8chCflF1GDR0jAuMBeQVqMJyjzv4zrHzi0q21V9OKDrGyrYFycfyMtUe3OCOuUOC6we1bVqeFFuqpcYj0z8CQX3vXf0VJ+mmtoAQhRm44DBgZ+JUUE+l20j9dosqBkJQGZeg== 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=SmvatNCUcAHAvxJK8humnetg3Pj7vVEUu6yw7SXSeXM=; b=fZS5cZxiBpZnYmorgaqXzd9YQJlbw9TzL4mjvnahxgdG7PnhHu6WfMKoKLztEK+XPz5RBQcpRDccVP8RescV8gCURK1AOIdc46DNvA+9fBBkZHv2ViNWJLAM3VQ85xuKPbmg37EcAOHyczVYug8GhqKG4L2m2ib+0DflxXVH4Cs9cSRrn0JpN1jTNhDogNBCq1NztpqpmxT0ybtVWe5WfyGjw9LM18XzJ9/DpGyOZZxwdSpB9Xzifpa7FX24sGgYfeS30dMNzF4FSS8L6XZZag4orzs4aJD/fUmZr1rUuBCseKbOxN84zIQlTCp4smbXR9zK2HJ8LnZG4SQWqCPGYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SmvatNCUcAHAvxJK8humnetg3Pj7vVEUu6yw7SXSeXM=; b=gzWI2bDRp+jI1KdrBEiM/dNd8o9UkuPHsncUgya/cKRWfdsDsw/CC1YcZmFGch4UQM3MzF1lO0WuL/DabbBg2QXTNTGRKbax9KQZHYuMKZALx66Eqd74hxFtq7fSx3oNfkNEvM3vBIGB7rsWMfvQ0nxDnN2kBNKhdl+Ucm6Fet8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by CH3PR12MB7620.namprd12.prod.outlook.com (2603:10b6:610:150::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Fri, 3 Nov 2023 15:53:03 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::2569:edb2:670f:816f%6]) with mapi id 15.20.6954.019; Fri, 3 Nov 2023 15:53:03 +0000 Message-ID: Date: Fri, 3 Nov 2023 15:52:53 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 2/9] ethdev: support setting and querying RSS algorithm Content-Language: en-US To: Jie Hai , dev@dpdk.org, Thomas Monjalon , Andrew Rybchenko , Ori Kam Cc: lihuisong@huawei.com, fengchengwen@huawei.com, liudongdong3@huawei.com References: <20230315110033.30143-1-liudongdong3@huawei.com> <20231102082020.2588392-1-haijie1@huawei.com> <20231102082020.2588392-3-haijie1@huawei.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm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TzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20231102082020.2588392-3-haijie1@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FRYP281CA0018.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10::28) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH3PR12MB7620:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e397b46-7ff4-42b5-b64f-08dbdc84f671 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I6zRyYJMpG6dBIVfk0+qA5wmP0NjJvf40rN9Hhb1GpfctQnkTk2onBykOiai5Eg3RYSiD9Ki0e/Nb935DpMY43VFCsRlE79+LXeHIArVEoY/6a7Yd+IzKPDpIOZ06pl8MOgTcBWUdscJYktZQFLyylhn3O+GdnjHmXW9CnIM+0/4JY4EhInY6vMJ7QW1/9GXBAsOJ8AQUreuvIWSJhppPWNjUHWgc55HyxZXrTuPsA2BZe3fuQP5dv4Q43+2PJqoWSFvtTL+oRpswe9zH3Q9wvmK9l5IAA50HzllgC0GT39F3vJXwmE5Wiaul7xoPTxhgiQxZMNJ/5OSOmh0WnzLT74FDHQ30N0p8eCmtCMgpPsa7tZvEeKKtvzxqtwHZx+F4h0YcFnKTQABBYKNsvAbCiBj3b1ERCeOOipMLCGQqcRUZEjktxnf9S6ByZTy3W58GJ8WxHSZK2tMG8JuTvkfbidTqccAneArPSw13Hwhpl5wjGIZWVPd7GelOD03DigHM0dOaVQWNEa39K3kDaV/iewFFp57hfMsTQpQxmQaP9PXv/NxMbeeDafS0I+qFqsYZ/cmELf/xBW57J0eWgzoZc7wFaMt3s9RDZp5JBYlIenlEolm8YnlCDg3PxBPnmyI X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(346002)(396003)(376002)(366004)(136003)(230922051799003)(451199024)(1800799009)(186009)(64100799003)(2616005)(6506007)(53546011)(6666004)(83380400001)(8936002)(44832011)(41300700001)(8676002)(4326008)(5660300002)(2906002)(6486002)(966005)(478600001)(316002)(110136005)(66556008)(66946007)(66476007)(26005)(36756003)(31696002)(86362001)(38100700002)(6512007)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RmxQWVlZZ3dZemRrUWFWWXd1OU1vbVJMN3hhNTFKK0FjbEJEVzVEcG1sOUJK?= =?utf-8?B?eTVKbFh2UVd0MXY4ZDhtdDBmbnZibVVWRnREZURXeWYybUlCdEV5UlNwR202?= =?utf-8?B?VlN3djdpVk5RbjNscVh0OVREdlk2bjliTUMxeFlTSWFXblpDekRON3FTZWQ0?= =?utf-8?B?c1pFVTVpWGYrWmdkcmpFNEwyVWJTNFlWaWU0ZzdHSHJnVjlEUG9LYjVKZE95?= =?utf-8?B?cnk4VEZueE9YRDMrakJ1TUMrSWd1cmFjN3V6M0o2ZlJIS050bi9LVStTYVVl?= =?utf-8?B?M093YXlsc3dnS1FXVStPL0VSRmNvZkpEeGZNRHFRS3AySXdsL0RDOFpEVWZv?= =?utf-8?B?UzV1N25sWnNHOE5WaVhLaVNiQXRYY05Bb0U2eDJKR0o1azlRRUtSMzZiVHFN?= =?utf-8?B?RGY1Y0hHV0Y1c1p4MXZHVVRpU01VSGlocGdTaEYrTDRudWN6SlcvTCswdmdz?= =?utf-8?B?ZDNJdjlxbWtFTDg5LzhmWjcyYk5hU21WME9HK2Z3VjFBbTVn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hLaHBNekM3U1JpSDNhNEJKY1pG?= =?utf-8?B?d25UVUQrdEhjSFZwOE91L01LNkN6U05tRUp4RS9CSmM0U2x2c1d3SFVMS2JX?= =?utf-8?B?cUVHd2RMZWtaT0FuZDVlNkRUeTQ3eEp6aTVkNUVmTUpLZDZzQzJxUnNKUmta?= =?utf-8?B?ZmdnYjFneitDdlQvbGFBSE00QVd5TjZVcFhreHBMUE1xckN6Uy9rZjZwMm5k?= =?utf-8?B?NEVJS0dicDNuemVWYjhFcXEvU1NMN2NjSGVCSG02dXIyNm1Pa1R4MDlsSnFL?= =?utf-8?B?ZldCRm9mbUVXbVJhMUNneWt1WlhndmY3dDRxZ2NUUzhMbVUvRGJ0cUxTaExJ?= =?utf-8?B?cmJTTVJ4aUdhUjhYN0d6alhCak1ZZUFoV2kxNzE0aEFvVlgxTjNBakJQNWxx?= =?utf-8?B?UVdPZjRwcnkrT0RtS3R5YXBvcmhHdjZ1MVdtM1F1VC9PbVBqQWZJbU04OEdP?= =?utf-8?B?RVdqcER4KzJ5OVZ1clArM1JHWG1IWFVBMTZNNVpzVE4vakRhaHBKclFlckpK?= =?utf-8?B?NGIwQlZ4MytxYWNGcElqdGJXdDhaOGRBZU9heStZM1krQnRNa3lkVGl1UEZp?= =?utf-8?B?b3ZPRDR4Rkg1YmJBalEwZktxUTVUQnJNMnRSNFIveEhEaHNycngzN1J0dHdn?= =?utf-8?B?clFSZHZzRk5tbWRPV05Nd011Z3ZrTmpvcllZNTFreTd2NFZ0SVpYYk82ditR?= =?utf-8?Q?p+LSeRIjtiUoN9Oqk/W0Kwk4w?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e397b46-7ff4-42b5-b64f-08dbdc84f671 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 15:53:03.4798 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OZsen0xw7xSKilv2Nxvb5YL8q6ih6LLO76o+VLBnXhlBUqcH8eBi9FIRs30dIJVC X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7620 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 11/2/2023 8:20 AM, Jie Hai wrote: > Currently, rte_eth_rss_conf supports configuring and querying > RSS hash functions, rss key and it's length, but not RSS hash > algorithm. > > The structure ``rte_eth_dev_info`` is extended by adding a new > field "rss_algo_capa". Drivers are responsible for reporting this > capa and configurations of RSS hash algorithm can be verified based > on the capability. The default value of "rss_algo_capa" is > RTE_ETH_HASH_ALGO_CAPA_MASK(DEFAULT) if drivers do not report it. > > The structure ``rte_eth_rss_conf`` is extended by adding a new > field "algorithm". This represents the RSS algorithms to apply. > If the value of "algorithm" used for configuration is a gibberish > value, drivers should report the error. > > To check whether the drivers report valid "algorithm", it is set > to default value before querying in rte_eth_dev_rss_hash_conf_get(). > > Signed-off-by: Jie Hai > Signed-off-by: Dongdong Liu > Acked-by: Huisong Li > Acked-by: Chengwen Feng <...> > --- a/lib/ethdev/rte_ethdev.c > +++ b/lib/ethdev/rte_ethdev.c > @@ -1269,6 +1269,7 @@ int > rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, > const struct rte_eth_conf *dev_conf) > { > + enum rte_eth_hash_function algorithm; > struct rte_eth_dev *dev; > struct rte_eth_dev_info dev_info; > struct rte_eth_conf orig_conf; > @@ -1510,6 +1511,17 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, > goto rollback; > } > > + algorithm = dev_conf->rx_adv_conf.rss_conf.algorithm; > + if (algorithm >= CHAR_BIT * sizeof(dev_info.rss_algo_capa) || > This cause build error [1] on Windows Server 2019 [2], will fix in next-net [3]. [1] ../lib/ethdev/rte_ethdev.c:1526:16: error: comparison of integers of different signs: 'enum rte_eth_hash_function' and 'unsigned long long' [-Werror,-Wsign-compare] if (algorithm >= CHAR_BIT * sizeof(dev_info.rss_algo_capa) || ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../lib/ethdev/rte_ethdev.c:4743:26: error: comparison of integers of different signs: 'enum rte_eth_hash_function' and 'unsigned long long' [-Werror,-Wsign-compare] if (rss_conf->algorithm >= CHAR_BIT * sizeof(dev_info.rss_algo_capa) || ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [2] https://mails.dpdk.org/archives/test-report/2023-November/499757.html [3] @@ -1523,7 +1523,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, } algorithm = dev_conf->rx_adv_conf.rss_conf.algorithm; - if (algorithm >= CHAR_BIT * sizeof(dev_info.rss_algo_capa) || + if ((size_t)algorithm >= CHAR_BIT * sizeof(dev_info.rss_algo_capa) || (dev_info.rss_algo_capa & RTE_ETH_HASH_ALGO_TO_CAPA(algorithm)) == 0) { RTE_ETHDEV_LOG(ERR, "Ethdev port_id=%u configured RSS hash algorithm (%u)" @@ -4748,7 +4748,7 @@ rte_eth_dev_rss_hash_update(uint16_t port_id, return -EINVAL; } - if (rss_conf->algorithm >= CHAR_BIT * sizeof(dev_info.rss_algo_capa) || + if ((size_t)rss_conf->algorithm >= CHAR_BIT * sizeof(dev_info.rss_algo_capa) || (dev_info.rss_algo_capa & RTE_ETH_HASH_ALGO_TO_CAPA(rss_conf->algorithm)) == 0) { RTE_ETHDEV_LOG(ERR,