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 412D5A04C3; Fri, 22 Nov 2019 15:16:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C44442BF2; Fri, 22 Nov 2019 15:15:57 +0100 (CET) Received: from smtp.tom.com (smtprz14.163.net [106.3.154.247]) by dpdk.org (Postfix) with ESMTP id CAF8C1DBC for ; Fri, 22 Nov 2019 13:06:35 +0100 (CET) Received: from my-app01.tom.com (my-app01.tom.com [127.0.0.1]) by freemail01.tom.com (Postfix) with ESMTP id 140751C81A64 for ; Fri, 22 Nov 2019 20:06:38 +0800 (CST) Received: from my-app01.tom.com (HELO smtp.tom.com) ([127.0.0.1]) by my-app01 (TOM SMTP Server) with SMTP ID 863127031 for ; Fri, 22 Nov 2019 20:06:38 +0800 (CST) Received: from antispam1.tom.com (unknown [172.25.16.55]) by freemail01.tom.com (Postfix) with ESMTP id 037381C81A43 for ; Fri, 22 Nov 2019 20:06:38 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tom.com; s=201807; t=1574424398; bh=WtrCasxu6FDls7wvntLMYSPC3VxSbSpVosMjg5VSjSc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jpcVSndV+c4wgHdCTExTkkvK9C4jTNPreyJti71fvKwSoAhvl/qWBkpXUxbS1yhqn c4djTVDd7ab/lzkP+ni3SzGRcCz5/B6CNgRcBPQZSYxD77INzlgIZ8mC7o7Hf7ZhmI 80hLsuE1rXkyMur0D/+x39oo8XKdi2LL2eEsln8c= Received: from antispam1.tom.com (antispam1.tom.com [127.0.0.1]) by antispam1.tom.com (Postfix) with ESMTP id 0633C1001887 for ; Fri, 22 Nov 2019 20:06:09 +0800 (CST) X-Virus-Scanned: Debian amavisd-new at antispam1.tom.com Received: from antispam1.tom.com ([127.0.0.1]) by antispam1.tom.com (antispam1.tom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LrUWtv_kEkiB for ; Fri, 22 Nov 2019 20:06:07 +0800 (CST) Received: from localhost.localdomain (unknown [203.160.91.226]) by antispam1.tom.com (Postfix) with ESMTPA id D65F11001515; Fri, 22 Nov 2019 20:06:06 +0800 (CST) From: "Wei Hu (Xavier)" To: dev@dpdk.org, stable@dpdk.org Cc: xavier_huwei@163.com, xavier.huwei@tom.com, huwei87@hisilicon.com Date: Fri, 22 Nov 2019 20:06:19 +0800 Message-Id: <20191122120624.4963-2-xavier.huwei@tom.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191122120624.4963-1-xavier.huwei@tom.com> References: <20191122120624.4963-1-xavier.huwei@tom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 22 Nov 2019 15:15:52 +0100 Subject: [dpdk-dev] [PATCH 1/6] net/hns3: fix RSS hardware configuration restore failure 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: Hao Chen This patch fixes the bug that hardware configuration called tc_size doesn't restore to the initial value when starting the app, configuring PFC and then restarting the app, because of the tc_mode didn't initial when rss is disabled. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Cc: stable@dpdk.org Signed-off-by: Hao Chen Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_rss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index 6a5d63398..b8c20e6d9 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -525,10 +525,8 @@ hns3_config_rss(struct hns3_adapter *hns) enum rte_eth_rx_mq_mode mq_mode = hw->data->dev_conf.rxmode.mq_mode; /* When there is no open RSS, redirect the packet queue 0 */ - if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) == 0) { + if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) == 0) hns3_rss_uninit(hns); - return 0; - } /* Configure RSS hash algorithm and hash key offset */ ret = hns3_set_rss_algo_key(hw, hash_algo, hash_key); -- 2.23.0