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 7107041D9B; Tue, 28 Feb 2023 09:23:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E6EB410D4; Tue, 28 Feb 2023 09:23:50 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2050.outbound.protection.outlook.com [40.107.243.50]) by mails.dpdk.org (Postfix) with ESMTP id 2912540EE4; Tue, 28 Feb 2023 09:23:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QKdOMUeBjLffTrF9qHekhDZ+8li/wpYcls/X5vL9p/4Df2BdXrwywkRegOEXMHIcDp59DZy7QimVsbtyEDTuqtsSGXpPzmDeW+6Ja0aPS2d29MJ1J6Ou8ItOdnMuyFHyRhFaBswYoU2NafthmHT1kmTLYrV4HkladcME82Wez8fHjtufp9OHFBHNCsYV0nbIbt1JvVtQP4H72xmsQmWz6TD4PQ4A8XWQUxKvHhepWWfZMlKrDlyTtbyaJhx3sRNoAt0PEpYlB3YDJCqX4sMrLM39eSyocJ4s0rsHK+p+BUBJTQefdh81a6Z2f81sS6flxK08tMeSeIQb7EHssojpEQ== 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=Iy0n5PnNTY8sUi7Dy0kfYMxTQuhvRtAGMLXRftP9GSk=; b=nQ0QcpAiTmN58mZeaRb0tVN6VJ7FGTyqYCGlz2XCLuUDOhbYWtxP/OwGpB2LOtisUNroT0QFQC+A6BUg4nL8X0BE55MmLSWGNGdIVYzPsprp0lld1SSiTgxcOsUWV6YXWij03GY/m5q1OGq2DJ4onzIDVyANzT9u86NFtz5dqwVlDS8HfC67nnsS8mfBnvtvvoRi1V1BOrBu91GTMPEBzWmHuJtLNcCWZe3y5S6OozLktV6gRr4aQJpSWViG4g7WywrQrXFV0qf6MX2EyHu2d464fWxg2l0Vof952ptzLTzw6r5++XdsxFmwpSgSmEQLEiRr1jWf3wu730dvvje5Uw== 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=Iy0n5PnNTY8sUi7Dy0kfYMxTQuhvRtAGMLXRftP9GSk=; b=Kez009NkLc/eoXS+sfTzZsCVMnrrzGeHi8Oez/cnNdTQm20nu7s+cEgiYVKr1aLLN9jOSMLdnxK7TDckGwPMqpUjVmRts56ni9KWuGizoC+4vxLIH/JuZ6uGfGJoYcCvsoKTG3YLXsHpJPVuM1m4hhyxeexTnQx4HcQcnRkgKIg= 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 PH7PR12MB6000.namprd12.prod.outlook.com (2603:10b6:510:1dc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.28; Tue, 28 Feb 2023 08:23:46 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48%7]) with mapi id 15.20.6134.030; Tue, 28 Feb 2023 08:23:45 +0000 Message-ID: Date: Tue, 28 Feb 2023 08:23:34 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: "lihuisong (C)" , 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_S=c3=b6derlund?= , Jiawen Wu , Rasesh Mody , Devendra Singh Rawat , Jerin Jacob , Maciej Czekaj , Jian Wang , Jochen Behrens , Andrew Rybchenko Cc: Thomas Monjalon , dev@dpdk.org, stable@dpdk.org References: <20230223160437.3200160-1-ferruh.yigit@amd.com> <9bdb3559-c7e6-f82d-0154-1eba823d080d@huawei.com> <2c47711f-55a5-a7e3-7643-9fb859fc3138@amd.com> From: Ferruh Yigit Subject: Re: [RFC PATCH] drivers/net: fix RSS multi-queue mode check In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PR3P191CA0042.EURP191.PROD.OUTLOOK.COM (2603:10a6:102:55::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB6000:EE_ X-MS-Office365-Filtering-Correlation-Id: c6d249fe-f4dc-49a9-585d-08db19651bc0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bDkP3ufy3IYbtnGsWVby2fcVf15CThpZxYxpAZtka1bXVdqc/aOv5xwc5Xost/CCRzHJ29dhh7t5vpgaobTrtu+u84iemgwUSveHP4G99KUl26IROWfdVmcqpBehx/rANc2o3TTfc0EkL4KWxbybuGxSzLs7e9hktSAQ55mzDR4QU6uq1+GnfWhypPV2Z7HmRErR5jhF08xLXqcxbvkDVXWkKR6EyAxM2+C2KU3nB0JLRQ1i4wueFgKyLH3kfmI6HuZ/xflLS5Aebi8PTU9N1BYQGeZTuFc4xd6pCOdu6/qgnV6jaa82Ry2/II6r2+nkY79jvpEyzaZwB2d/srbt7Wd+A/gAOkxD63xjn6d29Akh0LFTU0ZQlfJITAzgMGgY/9DNhJljIWz2WSDlvOpkd++8cs/AlZLcIMdh3Ts4vPOHzEjdPwlpoGq+Eb9lIsWRseQnHXp8pqlansfT3ctnlZ5FwwGTa+YB0Z032ypr+Xy9Z5QqcwP2PaQaL+yI8XuWb76/9nI3wGBCdw0q9HEKQOU+HqZiFhR5TxBvtUimzyZDjJYkS0xGtOL03zJWQpM1OqEvcY1eal1CQCyReVnRo2ub4/UrkGICTwMVBgFiKpvcnKXUvJqbSn2nRD1BvFnxaKUfDAmsCiDPXCfa6LKcGgLcqIVvsUsQGSKgpY58tiVeYF8XnF33sHo6NFm4bpbm2RzujmVAzYx7k+CGv0p9j/lFgu+U9xS1MEIz1uWxmah7PGsQxQ7x1NlLjyHRiv6pex1uh8fPzH91tWjOVHULzQ== 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:(13230025)(4636009)(396003)(39860400002)(346002)(366004)(136003)(376002)(451199018)(2616005)(921005)(66556008)(66946007)(6486002)(86362001)(316002)(66476007)(31696002)(6666004)(36756003)(110136005)(478600001)(26005)(186003)(41300700001)(6506007)(6512007)(53546011)(8676002)(4326008)(2906002)(31686004)(38100700002)(8936002)(66899018)(30864003)(83380400001)(7416002)(5660300002)(44832011)(7406005)(21314003)(43740500002)(45980500001); DIR:OUT; S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=?utf-8?B?cTNSSnBVVUxjMW9ldSs0aEFwVGI0cVJOcVo5VUxwNWdrTHg5QVBFR1FGSlVu?= =?utf-8?B?U3hjMWE1bUZEUXFDSkdtMkt5dllNM24rZjZ4RmNTR01BUkhtbk5pUy9LZUJL?= =?utf-8?B?SEZqYTJNeXVYVDhHUXlZakMxam5RK1l1am1LbXhPQ29pUTRaYlplSm5XZ0Rl?= =?utf-8?B?NUloajlMRTZMWGlCdHBLUGdtdTBFUXc2Rm14VXdUUzdBeVF1Z0ZaeDNPcVNR?= =?utf-8?B?SzZIS0YvS0l1Q1J3dG1Sek92TENuMVBJVlRjSHZGSFlRUFlFS1AzTTBxREl6?= =?utf-8?B?ZDBDTjdycVB1b25lNmVTQVZKWVRoWmVGZDRZbzl6S1lzWDg5aXdSNlZFdlhT?= =?utf-8?Q?eCpGre8SQxMzmdlNFv5EHDAm8?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6d249fe-f4dc-49a9-585d-08db19651bc0 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2023 08:23:45.4788 (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: OC0TgvvZ2VrPgmwn1ndMwlhwaZIJLPMfgOi6lfbFDDnxtPLFMkm8Q04wjJ7oK8VK X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6000 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 2/28/2023 1:24 AM, lihuisong (C) wrote: > > 在 2023/2/27 17:57, Ferruh Yigit 写道: >> On 2/27/2023 1:34 AM, lihuisong (C) wrote: >>> 在 2023/2/24 0:04, Ferruh Yigit 写道: >>>> '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'. >>> Hi Ferruh, >>> >>> It seems that this fully changes the usage of the mq_mode. >>> It will cause RSS, DCB and VMDQ function cannot work well. >>> >>> For example, >>> Both user and driver enable RSS and DCB functions based on xxx_DCB_FLAG >>> and xxx_RSS_FLAG in rxmode.mq_mode. >>> If we directly compare with 'RTE_ETH_MQ_RX_RSS' enum element now, how do >>> we enable RSS+DCB mode? >>> >> Hi Huisong, >> >> Technically 'RSS+DCB' mode can be set by user setting 'rxmode.mq_mode' >> to 'RTE_ETH_MQ_RX_DCB_RSS' and PMD checking the same. > This is not a good way to use. > Because this has a greate impact for user and PMDs and will add > cyclomatic complexity of PMD. >> >> Overall I think it is not good idea to use enum items as masked values, > I agree what you do. > It is better to change rxmode.mq_mode and txmode.mq_mode type from > 'enum' to 'u32'. > In this way, PMD code logic don't need to be modified and the impact on > PMDs and user is minimal. > What do you think? If bitmask feature of mq_mode is used and needed, I agree changing underlying data type cause less disturbance in logic. But chaning underlying data type has ABI impications, for now I will drop this patch, thanks for the feedback. >> but that seems done intentionally in the past: >> Commit 4bdefaade6d1 ("ethdev: VMDQ enhancements") > Seems it was. >> >> Since this can be in use already, following patch only changes where >> 'RTE_ETH_RX_OFFLOAD_RSS_HASH' is set, rest of the usage remaining same. >> >> And even for 'RTE_ETH_RX_OFFLOAD_RSS_HASH', I think intention was to >> override this offload config in PMD when explicitly RSS mode is enabled, >> but I made the set as RFC to get feedback on this. We may keep as it is >> if some other modes with 'RTE_ETH_MQ_RX_RSS_FLAG' uses this offload. >> >>>> 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)) { >> .