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 ECA3342925; Wed, 12 Apr 2023 11:52:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7CD440FAE; Wed, 12 Apr 2023 11:52:49 +0200 (CEST) Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by mails.dpdk.org (Postfix) with ESMTP id B9E024067B for ; Wed, 12 Apr 2023 11:52:47 +0200 (CEST) Received: from loongson.cn (unknown [10.2.5.185]) by gateway (Coremail) with SMTP id _____8BxedltfzZkOCsbAA--.42107S3; Wed, 12 Apr 2023 17:52:46 +0800 (CST) Received: from localhost.localdomain (unknown [10.2.5.185]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxSL1nfzZkUdggAA--.34284S2; Wed, 12 Apr 2023 17:52:44 +0800 (CST) From: Min Zhou To: aman.deep.singh@intel.com, yuying.zhang@intel.com, zhoumin@loongson.cn Cc: dev@dpdk.org, maobibo@loongson.cn Subject: [RFC] app/testpmd: use RSS conf from software when configuring DCB Date: Wed, 12 Apr 2023 17:52:39 +0800 Message-Id: <20230412095239.1709477-1-zhoumin@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8DxSL1nfzZkUdggAA--.34284S2 X-CM-SenderInfo: 52kr3ztlq6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7WryxWF1DGF45CFy7XFWUJwb_yoW8uF47pF srC3ZYyF48JFsxXa1kCaykuFs7Ar1xJFWUAFZ3A34rC3Z0yr1S9r1jqr18ZFW8WrWkJr1r Za93tasrXF1DCaUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b0kFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4 AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF 7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x 0267AKxVWxJr0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE 44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E74AGY7Cv6cx26rWlOx8S6xCaFVCjc4 AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxAIw28IcVCjz48v1sIE Y20_WwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E74 80Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0 I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04 k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7Cj xVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7xRE6wZ7UUUUU== 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 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; } -- 2.31.1