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 BC50342A8F; Mon, 8 May 2023 03:21:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8233A40A84; Mon, 8 May 2023 03:21:25 +0200 (CEST) Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id ED7B34014F for ; Mon, 8 May 2023 03:21:23 +0200 (CEST) Received: from loongson.cn (unknown [10.20.42.90]) by gateway (Coremail) with SMTP id _____8BxLuuQTlhkmmMGAA--.10615S3; Mon, 08 May 2023 09:21:20 +0800 (CST) Received: from [10.20.42.90] (unknown [10.20.42.90]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxRrWQTlhkUm1QAA--.14200S3; Mon, 08 May 2023 09:21:20 +0800 (CST) Subject: Re: [RFC] app/testpmd: use RSS conf from software when configuring DCB From: zhoumin To: aman.deep.singh@intel.com, yuying.zhang@intel.com Cc: dev@dpdk.org, maobibo@loongson.cn, ferruh.yigit@amd.com References: <20230412095239.1709477-1-zhoumin@loongson.cn> <70e19912-ab95-ea91-b77f-028d2bbf4ef3@loongson.cn> Message-ID: <84cee6de-3b42-11ac-202e-22ff24ee289e@loongson.cn> Date: Mon, 8 May 2023 09:21:20 +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: <70e19912-ab95-ea91-b77f-028d2bbf4ef3@loongson.cn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CM-TRANSID: AQAAf8BxRrWQTlhkUm1QAA--.14200S3 X-CM-SenderInfo: 52kr3ztlq6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBjvJXoWxWF45tr48GF1fKF4kKryDWrg_yoW5CFW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-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. Should we solve this problem by modifying PMDs? Is it suitable to maintain the RSS configurations for NIC by testpmd in order to set DCB? On Thur, Apr 27, 2023 at 4:33PM, zhoumin wrote: > 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; >>       } Best regards, Min