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 93E5C42A0F; Thu, 27 Apr 2023 10:33:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 580C242D2D; Thu, 27 Apr 2023 10:33:59 +0200 (CEST) Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id DD60642B8C for ; Thu, 27 Apr 2023 10:33:56 +0200 (CEST) Received: from loongson.cn (unknown [10.20.42.90]) by gateway (Coremail) with SMTP id _____8Cx_epvM0pkFoEBAA--.2601S3; Thu, 27 Apr 2023 16:33:53 +0800 (CST) Received: from [10.20.42.90] (unknown [10.20.42.90]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxoORsM0pkS2U+AA--.18775S3; Thu, 27 Apr 2023 16:33:49 +0800 (CST) Subject: Re: [RFC] app/testpmd: use RSS conf from software when configuring DCB To: aman.deep.singh@intel.com, yuying.zhang@intel.com Cc: dev@dpdk.org, maobibo@loongson.cn References: <20230412095239.1709477-1-zhoumin@loongson.cn> From: zhoumin Message-ID: <70e19912-ab95-ea91-b77f-028d2bbf4ef3@loongson.cn> Date: Thu, 27 Apr 2023 16:33:48 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20230412095239.1709477-1-zhoumin@loongson.cn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID: AQAAf8BxoORsM0pkS2U+AA--.18775S3 X-CM-SenderInfo: 52kr3ztlq6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7ZF4fGFWkAF15WF4ruFW3ZFb_yoW8Kr13pF WDCas5AF48JFZIqa17CayvgFZ7Cr4xGFWUAr93A345Ca1jyr1Sgr1jkw1UZFW8WrWkJr1r Za93tF98XF1DCaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bxkYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4 x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr1j6rxdM2AI xVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I8CrVACY4xI64 kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm 72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzVAYIcxG8wCF04 k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18 MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr4 1lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1l IxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4 A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU1EksDUUUUU== 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 Kindly ping. Any comments or suggestions will be appreciated. Best regards Min On 2023/4/12 下午5:52, Min Zhou wrote: > In the testpmd command, we have to stop the port firstly before configuring > the DCB. However, some PMDs may execute a hardware reset during the port > stop, such as ixgbe. Some kind of reset operations of PMD could clear the > configurations of RSS in the hardware register. This would cause the loss > of RSS configurations that were set during the testpmd initialization. As > a result, I find that I cannot enable RSS and DCB at the same time in the > testpmd command when using Intel 82599 NIC. > > Although this patch can solve the problem I encountered, is there any risk > of using rss conf from software instead of reading from the hardware > register when configuring DCB? > > Signed-off-by: Min Zhou > --- > app/test-pmd/testpmd.c | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 5cb6f92523..3c382267b8 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -4247,14 +4247,12 @@ const uint16_t vlan_tags[] = { > }; > > static int > -get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, > +get_eth_dcb_conf(portid_t pid __rte_unused, struct rte_eth_conf *eth_conf, > enum dcb_mode_enable dcb_mode, > enum rte_eth_nb_tcs num_tcs, > uint8_t pfc_en) > { > uint8_t i; > - int32_t rc; > - struct rte_eth_rss_conf rss_conf; > > /* > * Builds up the correct configuration for dcb+vt based on the vlan tags array > @@ -4296,12 +4294,6 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, > struct rte_eth_dcb_tx_conf *tx_conf = > ð_conf->tx_adv_conf.dcb_tx_conf; > > - memset(&rss_conf, 0, sizeof(struct rte_eth_rss_conf)); > - > - rc = rte_eth_dev_rss_hash_conf_get(pid, &rss_conf); > - if (rc != 0) > - return rc; > - > rx_conf->nb_tcs = num_tcs; > tx_conf->nb_tcs = num_tcs; > > @@ -4313,7 +4305,6 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, > eth_conf->rxmode.mq_mode = > (enum rte_eth_rx_mq_mode) > (rx_mq_mode & RTE_ETH_MQ_RX_DCB_RSS); > - eth_conf->rx_adv_conf.rss_conf = rss_conf; > eth_conf->txmode.mq_mode = RTE_ETH_MQ_TX_DCB; > } >