net/hns3: fix DCB mode check
authorHuisong Li <lihuisong@huawei.com>
Sat, 17 Apr 2021 09:54:56 +0000 (17:54 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 20 Apr 2021 00:40:43 +0000 (02:40 +0200)
Currently, "ONLY DCB" and "DCB+RSS" mode are both supported by HNS3
PF driver. But the driver verifies only the "DCB+RSS" multiple queues
mode.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_ethdev.c

index eb9a340..f5dfa47 100644 (file)
@@ -2239,7 +2239,7 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)
                return -EINVAL;
        }
 
-       if (rx_mq_mode == ETH_MQ_RX_DCB_RSS) {
+       if (rx_mq_mode & ETH_MQ_RX_DCB_FLAG) {
                if (dcb_rx_conf->nb_tcs > pf->tc_max) {
                        hns3_err(hw, "nb_tcs(%u) > max_tc(%u) driver supported.",
                                 dcb_rx_conf->nb_tcs, pf->tc_max);