[dpdk-dev] [PATCH V3 6/7] app/testpmd: add forwarding config in start port

Huisong Li lihuisong at huawei.com
Wed Apr 28 04:14:09 CEST 2021


在 2021/4/27 19:43, Li, Xiaoyun 写道:
>> -----Original Message-----
>> From: Huisong Li <lihuisong at huawei.com>
>> Sent: Tuesday, April 20, 2021 17:01
>> To: dev at dpdk.org
>> Cc: Yigit, Ferruh <ferruh.yigit at intel.com>; Li, Xiaoyun <xiaoyun.li at intel.com>;
>> linuxarm at openeuler.org; lihuisong at 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 <lihuisong at huawei.com>
>> Signed-off-by: Lijun Ou <oulijun at 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
> .


More information about the dev mailing list