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

Li, Xiaoyun xiaoyun.li at intel.com
Tue Apr 27 13:43:44 CEST 2021


> -----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.

> 
> 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