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 2CCA2A0C3F; Wed, 28 Apr 2021 04:14:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FE4D40147; Wed, 28 Apr 2021 04:14:16 +0200 (CEST) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 4ADFA40041 for ; Wed, 28 Apr 2021 04:14:14 +0200 (CEST) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FVMYf5LMVzPtqS for ; Wed, 28 Apr 2021 10:11:02 +0800 (CST) Received: from [10.66.74.184] (10.66.74.184) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Wed, 28 Apr 2021 10:14:09 +0800 To: "Li, Xiaoyun" , "dev@dpdk.org" CC: "Yigit, Ferruh" References: <1614939741-63927-1-git-send-email-oulijun@huawei.com> <1618909266-17584-1-git-send-email-lihuisong@huawei.com> <1618909266-17584-7-git-send-email-lihuisong@huawei.com> From: Huisong Li Message-ID: Date: Wed, 28 Apr 2021 10:14:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.66.74.184] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH V3 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 在 2021/4/27 19:43, Li, Xiaoyun 写道: >> -----Original Message----- >> From: Huisong Li >> Sent: Tuesday, April 20, 2021 17:01 >> To: dev@dpdk.org >> Cc: Yigit, Ferruh ; Li, Xiaoyun ; >> linuxarm@openeuler.org; lihuisong@huawei.com >> Subject: [PATCH V3 6/7] app/testpmd: add forwarding config in start port >> >> 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. > I don't agree on this. > Fwd config should be only changed after the user change something like nb-cores, queue number, eth-peer in non-dcb mode. These are already done in those commands. > > You should do fwd_config_setup at the end of cmd_config_dcb_parsed(), I agree on this. > But doing it in start port seems to do redundant times of fwd_setup. It's not really needed. After moving the check of dcb test to fwd_config_setup() in this patch set, doing fwd_config_setup at the end of cmd_config_dcb_parsed() does make more sense. In this way, similar commands can maintain the same design.  And I tested it, and it was OK. I will fix it in next version, thanks. >> 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 >> Signed-off-by: Lijun Ou >> --- >> 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 > .