[v2,2/2] app/testpmd: add new UDP tunnel port for ecpri

Message ID 20201224065940.76857-3-jia.guo@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series add new UDP tunnel port for ecpri |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Guo, Jia Dec. 24, 2020, 6:59 a.m. UTC
  Add new UDP tunnel port params for ecpri configuration, the command
as below:

testpmd> port config 0 udp_tunnel_port add ecpri 6789
testpmd> port config 0 udp_tunnel_port rm ecpri 6789

Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
 app/test-pmd/cmdline.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
  

Comments

Ferruh Yigit Jan. 14, 2021, 2:33 p.m. UTC | #1
On 12/24/2020 6:59 AM, Jeff Guo wrote:
> Add new UDP tunnel port params for ecpri configuration, the command
> as below:
> 
> testpmd> port config 0 udp_tunnel_port add ecpri 6789
> testpmd> port config 0 udp_tunnel_port rm ecpri 6789
> 
> Signed-off-by: Jeff Guo <jia.guo@intel.com>
> ---
>   app/test-pmd/cmdline.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c

Can you please update the 'cmd_help_long_parsed()' for command update,
and update the testpmd documentation, 'testpmd_funcs.rst'?

> index 2ccbaa039e..af08e48e2e 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -9175,6 +9175,8 @@ cmd_cfg_tunnel_udp_port_parsed(void *parsed_result,
>   		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_GENEVE;
>   	} else if (!strcmp(res->tunnel_type, "vxlan-gpe")) {
>   		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN_GPE;
> +	} else if (!strcmp(res->tunnel_type, "ecpri")) {
> +		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_ECPRI;
>   	} else {
>   		printf("Invalid tunnel type\n");
>   		return;
> @@ -9209,7 +9211,7 @@ cmdline_parse_token_string_t cmd_config_tunnel_udp_port_action =
>   				 "add#rm");
>   cmdline_parse_token_string_t cmd_config_tunnel_udp_port_tunnel_type =
>   	TOKEN_STRING_INITIALIZER(struct cmd_config_tunnel_udp_port, tunnel_type,
> -				 "vxlan#geneve#vxlan-gpe");
> +				 "vxlan#geneve#vxlan-gpe#ecpri");
>   cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
>   	TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port, udp_port,
>   			      RTE_UINT16);
> @@ -9217,7 +9219,8 @@ cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
>   cmdline_parse_inst_t cmd_cfg_tunnel_udp_port = {
>   	.f = cmd_cfg_tunnel_udp_port_parsed,
>   	.data = NULL,
> -	.help_str = "port config <port_id> udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe <udp_port>",
> +	.help_str = "port config <port_id> udp_tunnel_port add|rm vxlan|"
> +		"geneve|vxlan-gpe|ecpri <udp_port>",
>   	.tokens = {
>   		(void *)&cmd_config_tunnel_udp_port_port,
>   		(void *)&cmd_config_tunnel_udp_port_config,
>
  
Guo, Jia Jan. 15, 2021, 2:13 a.m. UTC | #2
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Thursday, January 14, 2021 10:34 PM
> To: Guo, Jia <jia.guo@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Wu,
> Jingjing <jingjing.wu@intel.com>; Yang, Qiming <qiming.yang@intel.com>;
> Wang, Haiyue <haiyue.wang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [dpdk-dev v2 2/2] app/testpmd: add new UDP
> tunnel port for ecpri
> 
> On 12/24/2020 6:59 AM, Jeff Guo wrote:
> > Add new UDP tunnel port params for ecpri configuration, the command as
> > below:
> >
> > testpmd> port config 0 udp_tunnel_port add ecpri 6789 port config 0
> > testpmd> udp_tunnel_port rm ecpri 6789
> >
> > Signed-off-by: Jeff Guo <jia.guo@intel.com>
> > ---
> >   app/test-pmd/cmdline.c | 7 +++++--
> >   1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> 
> Can you please update the 'cmd_help_long_parsed()' for command update,
> and update the testpmd documentation, 'testpmd_funcs.rst'?
> 

Oh, sure, that is what I should do for this patch set. Please expect next version.

> > index 2ccbaa039e..af08e48e2e 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -9175,6 +9175,8 @@ cmd_cfg_tunnel_udp_port_parsed(void
> *parsed_result,
> >   		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_GENEVE;
> >   	} else if (!strcmp(res->tunnel_type, "vxlan-gpe")) {
> >   		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN_GPE;
> > +	} else if (!strcmp(res->tunnel_type, "ecpri")) {
> > +		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_ECPRI;
> >   	} else {
> >   		printf("Invalid tunnel type\n");
> >   		return;
> > @@ -9209,7 +9211,7 @@ cmdline_parse_token_string_t
> cmd_config_tunnel_udp_port_action =
> >   				 "add#rm");
> >   cmdline_parse_token_string_t
> cmd_config_tunnel_udp_port_tunnel_type =
> >   	TOKEN_STRING_INITIALIZER(struct cmd_config_tunnel_udp_port,
> tunnel_type,
> > -				 "vxlan#geneve#vxlan-gpe");
> > +				 "vxlan#geneve#vxlan-gpe#ecpri");
> >   cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
> >   	TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port,
> udp_port,
> >   			      RTE_UINT16);
> > @@ -9217,7 +9219,8 @@ cmdline_parse_token_num_t
> cmd_config_tunnel_udp_port_value =
> >   cmdline_parse_inst_t cmd_cfg_tunnel_udp_port = {
> >   	.f = cmd_cfg_tunnel_udp_port_parsed,
> >   	.data = NULL,
> > -	.help_str = "port config <port_id> udp_tunnel_port add|rm
> vxlan|geneve|vxlan-gpe <udp_port>",
> > +	.help_str = "port config <port_id> udp_tunnel_port add|rm vxlan|"
> > +		"geneve|vxlan-gpe|ecpri <udp_port>",
> >   	.tokens = {
> >   		(void *)&cmd_config_tunnel_udp_port_port,
> >   		(void *)&cmd_config_tunnel_udp_port_config,
> >
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2ccbaa039e..af08e48e2e 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -9175,6 +9175,8 @@  cmd_cfg_tunnel_udp_port_parsed(void *parsed_result,
 		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_GENEVE;
 	} else if (!strcmp(res->tunnel_type, "vxlan-gpe")) {
 		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN_GPE;
+	} else if (!strcmp(res->tunnel_type, "ecpri")) {
+		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_ECPRI;
 	} else {
 		printf("Invalid tunnel type\n");
 		return;
@@ -9209,7 +9211,7 @@  cmdline_parse_token_string_t cmd_config_tunnel_udp_port_action =
 				 "add#rm");
 cmdline_parse_token_string_t cmd_config_tunnel_udp_port_tunnel_type =
 	TOKEN_STRING_INITIALIZER(struct cmd_config_tunnel_udp_port, tunnel_type,
-				 "vxlan#geneve#vxlan-gpe");
+				 "vxlan#geneve#vxlan-gpe#ecpri");
 cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
 	TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port, udp_port,
 			      RTE_UINT16);
@@ -9217,7 +9219,8 @@  cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
 cmdline_parse_inst_t cmd_cfg_tunnel_udp_port = {
 	.f = cmd_cfg_tunnel_udp_port_parsed,
 	.data = NULL,
-	.help_str = "port config <port_id> udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe <udp_port>",
+	.help_str = "port config <port_id> udp_tunnel_port add|rm vxlan|"
+		"geneve|vxlan-gpe|ecpri <udp_port>",
 	.tokens = {
 		(void *)&cmd_config_tunnel_udp_port_port,
 		(void *)&cmd_config_tunnel_udp_port_config,