DPDK patches and discussions
 help / color / mirror / Atom feed
From: "lihuisong (C)" <lihuisong@huawei.com>
To: "Ferruh Yigit" <ferruh.yigit@amd.com>,
	"Ajit Khaparde" <ajit.khaparde@broadcom.com>,
	"Somnath Kotur" <somnath.kotur@broadcom.com>,
	"Rahul Lakkireddy" <rahul.lakkireddy@chelsio.com>,
	"Simei Su" <simei.su@intel.com>,
	"Wenjun Wu" <wenjun1.wu@intel.com>,
	"Marcin Wojtas" <mw@semihalf.com>,
	"Michal Krawczyk" <mk@semihalf.com>,
	"Shai Brandes" <shaibran@amazon.com>,
	"Evgeny Schemeilin" <evgenys@amazon.com>,
	"Igor Chauskin" <igorch@amazon.com>,
	"John Daley" <johndale@cisco.com>,
	"Hyong Youb Kim" <hyonkim@cisco.com>,
	"Qi Zhang" <qi.z.zhang@intel.com>,
	"Xiao Wang" <xiao.w.wang@intel.com>,
	"Junfeng Guo" <junfeng.guo@intel.com>,
	"Ziyang Xuan" <xuanziyang2@huawei.com>,
	"Xiaoyun Wang" <cloud.wangxiaoyun@huawei.com>,
	"Guoyang Zhou" <zhouguoyang@huawei.com>,
	"Dongdong Liu" <liudongdong3@huawei.com>,
	"Yisen Zhuang" <yisen.zhuang@huawei.com>,
	"Yuying Zhang" <Yuying.Zhang@intel.com>,
	"Beilei Xing" <beilei.xing@intel.com>,
	"Jingjing Wu" <jingjing.wu@intel.com>,
	"Qiming Yang" <qiming.yang@intel.com>,
	"Shijith Thotton" <sthotton@marvell.com>,
	"Srisivasubramanian Srinivasan" <srinivasan@marvell.com>,
	"Long Li" <longli@microsoft.com>,
	"Chaoyong He" <chaoyong.he@corigine.com>,
	"Niklas Söderlund" <niklas.soderlund@corigine.com>,
	"Jiawen Wu" <jiawenwu@trustnetic.com>,
	"Rasesh Mody" <rmody@marvell.com>,
	"Devendra Singh Rawat" <dsinghrawat@marvell.com>,
	"Jerin Jacob" <jerinj@marvell.com>,
	"Maciej Czekaj" <mczekaj@marvell.com>,
	"Jian Wang" <jianwang@trustnetic.com>,
	"Jochen Behrens" <jbehrens@vmware.com>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	"Ferruh Yigit" <ferruh.yigit@intel.com>
Cc: Thomas Monjalon <thomas@monjalon.net>, <dev@dpdk.org>, <stable@dpdk.org>
Subject: Re: [RFC PATCH] drivers/net: fix RSS multi-queue mode check
Date: Mon, 27 Feb 2023 09:34:55 +0800	[thread overview]
Message-ID: <9bdb3559-c7e6-f82d-0154-1eba823d080d@huawei.com> (raw)
In-Reply-To: <20230223160437.3200160-1-ferruh.yigit@amd.com>


在 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?

/Huisong
>
> Fixes: 73fb89dd6a00 ("drivers/net: fix RSS hash offload flag if no RSS")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
>
> ---
>
> 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)) {

  reply	other threads:[~2023-02-27  1:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23 16:04 Ferruh Yigit
2023-02-27  1:34 ` lihuisong (C) [this message]
2023-02-27  9:57   ` Ferruh Yigit
2023-02-28  1:24     ` lihuisong (C)
2023-02-28  8:23       ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9bdb3559-c7e6-f82d-0154-1eba823d080d@huawei.com \
    --to=lihuisong@huawei.com \
    --cc=Yuying.Zhang@intel.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=beilei.xing@intel.com \
    --cc=chaoyong.he@corigine.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=dev@dpdk.org \
    --cc=dsinghrawat@marvell.com \
    --cc=evgenys@amazon.com \
    --cc=ferruh.yigit@amd.com \
    --cc=ferruh.yigit@intel.com \
    --cc=hyonkim@cisco.com \
    --cc=igorch@amazon.com \
    --cc=jbehrens@vmware.com \
    --cc=jerinj@marvell.com \
    --cc=jianwang@trustnetic.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=jingjing.wu@intel.com \
    --cc=johndale@cisco.com \
    --cc=junfeng.guo@intel.com \
    --cc=liudongdong3@huawei.com \
    --cc=longli@microsoft.com \
    --cc=mczekaj@marvell.com \
    --cc=mk@semihalf.com \
    --cc=mw@semihalf.com \
    --cc=niklas.soderlund@corigine.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=rmody@marvell.com \
    --cc=shaibran@amazon.com \
    --cc=simei.su@intel.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=srinivasan@marvell.com \
    --cc=stable@dpdk.org \
    --cc=sthotton@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=wenjun1.wu@intel.com \
    --cc=xiao.w.wang@intel.com \
    --cc=xuanziyang2@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=zhouguoyang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).