From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 441EBA0547;
	Tue, 20 Apr 2021 09:32:52 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 2E47441601;
	Tue, 20 Apr 2021 09:32:22 +0200 (CEST)
Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191])
 by mails.dpdk.org (Postfix) with ESMTP id 4898F415D1
 for <dev@dpdk.org>; Tue, 20 Apr 2021 09:32:13 +0200 (CEST)
Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59])
 by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FPb1616kZzrfkL;
 Tue, 20 Apr 2021 15:29:46 +0800 (CST)
Received: from localhost.localdomain (10.69.192.56) by
 DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id
 14.3.498.0; Tue, 20 Apr 2021 15:32:00 +0800
From: Huisong Li <lihuisong@huawei.com>
To: <dev@dpdk.org>
CC: <ferruh.yigit@intel.com>, <xiaoyun.li@intel.com>,
 <linuxarm@openeuler.org>, <lihuisong@huawei.com>
Date: Tue, 20 Apr 2021 15:32:05 +0800
Message-ID: <1618903926-29099-7-git-send-email-lihuisong@huawei.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1618903926-29099-1-git-send-email-lihuisong@huawei.com>
References: <1614939741-63927-1-git-send-email-oulijun@huawei.com>
 <1618903926-29099-1-git-send-email-lihuisong@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 6/7] app/testpmd: add forwarding config in
 start port
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Most operations in testpmd that need to update the forwarding streams
in testpmd call fwd_config_setup(). In some scenarios, eg, dev_configure
is called again, the forwarding streams may not be updated. As a result,
the actual forwarding streams cannot be queried by "show config fwd" cmd.

The procedure is as follows:
set nbcore 4
port stop all
port config 0 dcb vt off 4 pfc on
port start all
show config fwd

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 app/test-pmd/testpmd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index abcbdaa..f8052b6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2678,6 +2678,12 @@ start_port(portid_t pid)
 			}
 		}
 	}
+	/*
+	 * In some scenarios, eg, dev_configure is called again, the forwarding
+	 * streams may not be updated. As a result, the actual forwarding
+	 * streams cannot be queried by "show config fwd" command.
+	 */
+	fwd_config_setup();
 
 	printf("Done\n");
 	return 0;
-- 
2.7.4