From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 46C73A0528; Sat, 11 Jul 2020 12:20:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D1FF51D982; Sat, 11 Jul 2020 12:20:26 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id EA35D1D964 for ; Sat, 11 Jul 2020 12:20:19 +0200 (CEST) Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id ACD4BCD9A652FB178811 for ; Sat, 11 Jul 2020 18:20:17 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Sat, 11 Jul 2020 18:20:11 +0800 From: "Wei Hu (Xavier)" To: CC: Date: Sat, 11 Jul 2020 18:18:23 +0800 Message-ID: <1594462703-21448-5-git-send-email-xavier.huwei@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594462703-21448-1-git-send-email-xavier.huwei@huawei.com> References: <1594462703-21448-1-git-send-email-xavier.huwei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 4/4] net/hns3: fix RSS configuration when empty RSS type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Lijun Ou According to the definition of RSS types of action attributes from testpmd, the driver will not disable RSS but instead requests the unspecified "best-effort" settings when upper application call rte_flow_create API function to create flow using empty RSS types. As a result, here use the default RSS types when RSS types is empty. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Cc: stable@dpdk.org Signed-off-by: Lijun Ou Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_flow.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 1e58ad7..7ec46ae 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1486,7 +1486,9 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, } /* Filter the unsupported flow types */ - flow_types = rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT; + flow_types = conf->conf.types ? + rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT : + hw->rss_info.conf.types; if (flow_types != rss_flow_conf.types) hns3_warn(hw, "modified RSS types based on hardware support, " "requested:%" PRIx64 " configured:%" PRIx64, @@ -1494,9 +1496,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, /* Update the useful flow types */ rss_flow_conf.types = flow_types; - if ((rss_flow_conf.types & ETH_RSS_PROTO_MASK) == 0) - return hns3_disable_rss(hw); - rss_info = &hw->rss_info; if (!add) { if (hns3_action_rss_same(&rss_info->conf, &rss_flow_conf)) { -- 2.7.4