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 EA02D41D52; Thu, 23 Feb 2023 17:05:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 988B540ED7; Thu, 23 Feb 2023 17:05:10 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2061.outbound.protection.outlook.com [40.107.94.61]) by mails.dpdk.org (Postfix) with ESMTP id 8F37540DFD; Thu, 23 Feb 2023 17:05:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DLCjILtE/0V/mbF9vn7gg1H5sxIF50SFmg2iIGUzmtIOFKVU6PRQRHA52EYqk1azwJhhC6IxmHXVE+h2YgRj+X15dKdyWjNIRYKLGfVmSUJs6Eb+iDpcYvhJK1+a9J7EuSt34HTkUOpk473ZcY6GvmvFEAsnWy5z5Vo5/o2+eh6RIxrFlIM3Hp3kI92MXDRc5B7wRKn7sdvEdfUjwcG7pYUc2wGRlxeNxpgnvcUfCjgJYkpFgzSSN5l49Rddu8Ctj5MC6cMxa8vBuKJTEHaQqNHPXK0dCVJG9eCI72hS9H02satu5Xtf4jPiYOePBj07G8itTkGkgHJ9OJEr2S2SYw== 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=ZDKpDgfX/wkJYpOMCRORqlagCEV7/D0gCUU/QhQ8F5U=; b=GZnN7v/tERT8N8p9HTfRqQ43KNJvo5odfxRHff0FMcr+NYJCtBeucr32n3Ull41QJYjugQejyB4TEs8zZ6gxrpjMqr7lK+aCrgIIYqAem2SV9sw6BJfK9hAMkGcb11Y9+4MV/zY5p4+qCyj9WYqdnczB3KEW7ixzrphOUC7BB/RCS4gY8sp82zAKOmWd5ru7uvGyvwHIpLCbyfV5qaM2BhBmH5WzSKF69reQzQ3KKSL4/xmK+p+eu9+r/FZF2pdulpbFACbSLz71JSAPqHY7ybZPlT+iPHxa5TFypGrSyZAODMWguVE7XE1Amzu6vJR66qqiDjaNrrl+eQlosm/1/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=broadcom.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=ZDKpDgfX/wkJYpOMCRORqlagCEV7/D0gCUU/QhQ8F5U=; b=zh9AUpKxLywZACZ/cuAnJaGC2DJAQcHN6bNrTjNR8J3PaveiaIMcHChoyCixPJ0LmlzVRIOJhQEPzNPrgYyJtGfGMMzBm+pfCZms1pDt2rI9h8zkm61A67zJn6+F5oMA3N5fKrGQ5tfIfGA4w8xf3LH7wXQKzMrralu7xU/kdCY= Received: from DS7PR03CA0078.namprd03.prod.outlook.com (2603:10b6:5:3bb::23) by CY8PR12MB7435.namprd12.prod.outlook.com (2603:10b6:930:51::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.21; Thu, 23 Feb 2023 16:05:06 +0000 Received: from DM6NAM11FT040.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3bb:cafe::8b) by DS7PR03CA0078.outlook.office365.com (2603:10b6:5:3bb::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.21 via Frontend Transport; Thu, 23 Feb 2023 16:05:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT040.mail.protection.outlook.com (10.13.173.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6134.21 via Frontend Transport; Thu, 23 Feb 2023 16:05:06 +0000 Received: from telcodpdk.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 23 Feb 2023 10:05:01 -0600 From: Ferruh Yigit To: Ajit Khaparde , Somnath Kotur , Rahul Lakkireddy , Simei Su , Wenjun Wu , Marcin Wojtas , Michal Krawczyk , Shai Brandes , Evgeny Schemeilin , Igor Chauskin , John Daley , Hyong Youb Kim , Qi Zhang , Xiao Wang , Junfeng Guo , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Dongdong Liu , Yisen Zhuang , Yuying Zhang , Beilei Xing , Jingjing Wu , Qiming Yang , Shijith Thotton , Srisivasubramanian Srinivasan , Long Li , Chaoyong He , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Jiawen Wu , Rasesh Mody , Devendra Singh Rawat , Jerin Jacob , Maciej Czekaj , Jian Wang , Jochen Behrens , Andrew Rybchenko , Ferruh Yigit CC: Thomas Monjalon , , Subject: [RFC PATCH] drivers/net: fix RSS multi-queue mode check Date: Thu, 23 Feb 2023 16:04:36 +0000 Message-ID: <20230223160437.3200160-1-ferruh.yigit@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT040:EE_|CY8PR12MB7435:EE_ X-MS-Office365-Filtering-Correlation-Id: e27177bd-00a7-4ee8-781c-08db15b7bb0e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: otMWDwdKdXdKzX9K+m78wReXleJSH1FvNc5fgMur1HnSbkqp/okGnVoIc6ouPuTeRQ/IetCSrfzEncRdWx0jbrQK7pe95dpz9Xd09vTt5Br66CTjCrJoPxzIYwL1aQMf4yTfeZTy2yEJPw1OApLpJ6rIWW9MTHddhacg1X3gpWXDo3tfp32nlD5q4Qedm1kom63W2VfrdmxCjZLlZ9fFR6ob/v0qhfXs2yotD2eroTS/s04uRKW37O7yxbIimunPwTlwZjer1eIE0TMAPzWsRhzoHYG59fJa9Lu1CAwn6WEf41pR8OFSukE98/7/FlIZ3jZcmUB7aYQx7/5lRgT8kgJ6CMy9oMhggUhFz44giAA5Ev5xlLkQ6rpBoX0zvuJKDP9MQutMZw9Rdfi3VDisew1VHojOlIBGMdlNox4xBf9a1LXKyHvzwxvjM1yvVbq+3Pr1L7jC2avzNzFG9VflRySACGiSvLcGc7b4rVzBIOS0AIu7UrTQ31WEPUGf24otJ5/mo7hn24OojHgki1MycWTyewhSTpBJNhchOIxI7DWmFNMrgdP1qbQLjlfprRfYLRjsoAVZqFb6p2IjS3G/znpuJLNN6ZKvXCN01lQhARUi8jzw4JSMwSuLSepR5eSXKHZJpGkxQdClk7Lebk3IC38Qg9fYgf5/z7/0BwivY8YYwidAxYMP7Q6ZvE8R1/Itb2pdDHGhlldRSEEP2b620EG82ajzBZZt8wj7f8GFHRlxYjlL8S/k+y7A2ziMOaU4 X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(376002)(346002)(396003)(136003)(451199018)(36840700001)(40470700004)(46966006)(478600001)(110136005)(1076003)(6666004)(66899018)(81166007)(26005)(7696005)(186003)(16526019)(426003)(47076005)(41300700001)(70206006)(316002)(4326008)(336012)(8676002)(83380400001)(8936002)(44832011)(5660300002)(30864003)(36860700001)(2906002)(7416002)(82740400003)(7406005)(2616005)(356005)(921005)(86362001)(82310400005)(54906003)(70586007)(40460700003)(36756003)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2023 16:05:06.3762 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e27177bd-00a7-4ee8-781c-08db15b7bb0e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT040.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7435 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 'rxmode.mq_mode' is an enum which should be an abstraction over values, instead of mask it with 'RTE_ETH_MQ_RX_RSS_FLAG' to detect if RSS is supported, directly compare with 'RTE_ETH_MQ_RX_RSS' enum element. Most of the time only 'RTE_ETH_MQ_RX_RSS' is requested by user, that is why output is almost same, but there may be cases driver doesn't support RSS combinations, like 'RTE_ETH_MQ_RX_VMDQ_DCB_RSS' but that is hidden by masking with 'RTE_ETH_MQ_RX_RSS_FLAG'. Fixes: 73fb89dd6a00 ("drivers/net: fix RSS hash offload flag if no RSS") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- There are more usage like "rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG" in drivers, not sure to fix all in this commit or not, feedback welcomed. --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 ++-- drivers/net/ena/ena_ethdev.c | 2 +- drivers/net/enic/enic_ethdev.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 2 +- drivers/net/gve/gve_ethdev.c | 2 +- drivers/net/hinic/hinic_pmd_ethdev.c | 2 +- drivers/net/hns3/hns3_ethdev.c | 2 +- drivers/net/hns3/hns3_ethdev_vf.c | 2 +- drivers/net/i40e/i40e_ethdev.c | 2 +- drivers/net/iavf/iavf_ethdev.c | 2 +- drivers/net/ice/ice_dcf_ethdev.c | 2 +- drivers/net/ice/ice_ethdev.c | 2 +- drivers/net/igc/igc_ethdev.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- drivers/net/liquidio/lio_ethdev.c | 2 +- drivers/net/mana/mana.c | 2 +- drivers/net/netvsc/hn_ethdev.c | 2 +- drivers/net/nfp/nfp_common.c | 2 +- drivers/net/ngbe/ngbe_ethdev.c | 2 +- drivers/net/qede/qede_ethdev.c | 2 +- drivers/net/thunderx/nicvf_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ethdev_vf.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 2 +- 26 files changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 753e86b4b2af..14c0d5f8c72b 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1143,7 +1143,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev) bp->rx_cp_nr_rings = bp->rx_nr_rings; bp->tx_cp_nr_rings = bp->tx_nr_rings; - if (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (eth_dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) rx_offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; eth_dev->data->dev_conf.rxmode.offloads = rx_offloads; diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 45bbeaef0ceb..0e9ccc0587ba 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -440,7 +440,7 @@ int cxgbe_dev_configure(struct rte_eth_dev *eth_dev) CXGBE_FUNC_TRACE(); - if (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (eth_dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) eth_dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 8858f975f8cc..8e6b43c2ff2d 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -1146,7 +1146,7 @@ eth_igb_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* multiple queue mode checking */ @@ -3255,7 +3255,7 @@ igbvf_dev_configure(struct rte_eth_dev *dev) PMD_INIT_LOG(DEBUG, "Configured Virtual Function port id: %d", dev->data->port_id); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index efcb163027c8..6929d7066fbd 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2307,7 +2307,7 @@ static int ena_dev_configure(struct rte_eth_dev *dev) adapter->state = ENA_ADAPTER_STATE_CONFIG; - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; dev->data->dev_conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_MULTI_SEGS; diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index cdf091559196..f3a7bc161408 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -323,7 +323,7 @@ static int enicpmd_dev_configure(struct rte_eth_dev *eth_dev) return ret; } - if (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (eth_dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) eth_dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 8b83063f0a2d..49d7849ba5ea 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -450,7 +450,7 @@ fm10k_dev_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* multiple queue mode checking */ diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c index cf28a4a3b710..f34755a369fb 100644 --- a/drivers/net/gve/gve_ethdev.c +++ b/drivers/net/gve/gve_ethdev.c @@ -92,7 +92,7 @@ gve_dev_configure(struct rte_eth_dev *dev) { struct gve_priv *priv = dev->data->dev_private; - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; if (dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_TCP_LRO) diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c index 7aa5e7d8e929..872ee97b1e97 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -311,7 +311,7 @@ static int hinic_dev_configure(struct rte_eth_dev *dev) return -EINVAL; } - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* mtu size is 256~9600 */ diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 6babf67fcec2..fd3e499a3d38 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2016,7 +2016,7 @@ hns3_dev_configure(struct rte_eth_dev *dev) goto cfg_err; } - if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) { + if (mq_mode == RTE_ETH_MQ_RX_RSS) { conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; rss_conf = conf->rx_adv_conf.rss_conf; ret = hns3_dev_rss_hash_update(dev, &rss_conf); diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index d051a1357b9f..00eb22d05558 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -494,7 +494,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) } /* When RSS is not configured, redirect the packet queue 0 */ - if ((uint32_t)mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) { + if (mq_mode == RTE_ETH_MQ_RX_RSS) { conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; rss_conf = conf->rx_adv_conf.rss_conf; ret = hns3_dev_rss_hash_update(dev, &rss_conf); diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 7726a89d99fb..3c3dbc285c96 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1884,7 +1884,7 @@ i40e_dev_configure(struct rte_eth_dev *dev) ad->tx_simple_allowed = true; ad->tx_vec_allowed = true; - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; ret = i40e_dev_init_vlan(dev); diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 3196210f2c1d..39860c08b606 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -638,7 +638,7 @@ iavf_dev_configure(struct rte_eth_dev *dev) ad->rx_vec_allowed = true; ad->tx_vec_allowed = true; - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* Large VF setting */ diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c index dcbf2af5b039..f61a30716e5e 100644 --- a/drivers/net/ice/ice_dcf_ethdev.c +++ b/drivers/net/ice/ice_dcf_ethdev.c @@ -711,7 +711,7 @@ ice_dcf_dev_configure(struct rte_eth_dev *dev) ad->rx_bulk_alloc_allowed = true; ad->tx_simple_allowed = true; - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; return 0; diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 0d011bbffa77..96595fd7afaf 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3403,7 +3403,7 @@ ice_dev_configure(struct rte_eth_dev *dev) ad->rx_bulk_alloc_allowed = true; ad->tx_simple_allowed = true; - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; if (dev->data->nb_rx_queues) { diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c index fab2ab6d1ce7..49f2b3738b84 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -375,7 +375,7 @@ eth_igc_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; ret = igc_check_mq_mode(dev); diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 88118bc30560..328ccf918e86 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2431,7 +2431,7 @@ ixgbe_dev_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* multiple queue mode checking */ @@ -5321,7 +5321,7 @@ ixgbevf_dev_configure(struct rte_eth_dev *dev) PMD_INIT_LOG(DEBUG, "Configured Virtual Function port id: %d", dev->data->port_id); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index ebcfbb1a5c0f..07fbaeda1ee6 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -1722,7 +1722,7 @@ lio_dev_configure(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); - if (eth_dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (eth_dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) eth_dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 43221e743e87..76de691a8252 100644 --- a/drivers/net/mana/mana.c +++ b/drivers/net/mana/mana.c @@ -78,7 +78,7 @@ mana_dev_configure(struct rte_eth_dev *dev) struct mana_priv *priv = dev->data->dev_private; struct rte_eth_conf *dev_conf = &dev->data->dev_conf; - if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev_conf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev_conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; if (dev->data->nb_rx_queues != dev->data->nb_tx_queues) { diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index d0bbc0a4c0c0..4950b061799c 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -721,7 +721,7 @@ static int hn_dev_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev_conf->rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev_conf->rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; unsupported = txmode->offloads & ~HN_TX_OFFLOAD_CAPS; diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c index 907777a9e44d..a774fad3fba2 100644 --- a/drivers/net/nfp/nfp_common.c +++ b/drivers/net/nfp/nfp_common.c @@ -161,7 +161,7 @@ nfp_net_configure(struct rte_eth_dev *dev) rxmode = &dev_conf->rxmode; txmode = &dev_conf->txmode; - if (rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (rxmode->mq_mode == RTE_ETH_MQ_RX_RSS) rxmode->offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* Checking TX mode */ diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c index c32d954769b0..5b53781c4aaf 100644 --- a/drivers/net/ngbe/ngbe_ethdev.c +++ b/drivers/net/ngbe/ngbe_ethdev.c @@ -918,7 +918,7 @@ ngbe_dev_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* set flag to update link status after init */ diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index a4923670d6ba..11ddd8abf16a 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -1272,7 +1272,7 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(edev); - if (rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (rxmode->mq_mode == RTE_ETH_MQ_RX_RSS) rxmode->offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* We need to have min 1 RX queue.There is no min check in diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index ab1e714d9767..b9cd09332510 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -1984,7 +1984,7 @@ nicvf_dev_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - if (rxmode->mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (rxmode->mq_mode == RTE_ETH_MQ_RX_RSS) rxmode->offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; if (!rte_eal_has_hugepages()) { diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index a502618bc5a2..08ad5a087e23 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -1508,7 +1508,7 @@ txgbe_dev_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* multiple queue mode checking */ diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c index 3b1f7c913b7b..02a59fc696e5 100644 --- a/drivers/net/txgbe/txgbe_ethdev_vf.c +++ b/drivers/net/txgbe/txgbe_ethdev_vf.c @@ -577,7 +577,7 @@ txgbevf_dev_configure(struct rte_eth_dev *dev) PMD_INIT_LOG(DEBUG, "Configured Virtual Function port id: %d", dev->data->port_id); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; /* diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index fd946dec5c80..8efde46ae0ad 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -531,7 +531,7 @@ vmxnet3_dev_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); - if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) + if (dev->data->dev_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_RSS) dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH; if (!VMXNET3_VERSION_GE_6(hw)) { -- 2.34.1