[v4,4/5] app/testpmd: add VXLAN-GPE to tunnel type
Checks
Commit Message
This patch added new item "vxlan-gpe" to tunnel_type to
support new VXLAN-GPE packet type, and its clasification.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
app/test-pmd/cmdline.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Comments
Hi Qiminq,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang
> Sent: Tuesday, March 19, 2019 4:37 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>
> Subject: [dpdk-dev] [PATCH v4 4/5] app/testpmd: add VXLAN-GPE to tunnel
> type
>
> This patch added new item "vxlan-gpe" to tunnel_type to support new
> VXLAN-GPE packet type, and its clasification.
>
> Signed-off-by: Qiming Yang <qiming.yang@intel.com>
> ---
> app/test-pmd/cmdline.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> db53cc0..08a554c 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -8710,6 +8710,8 @@ cmd_tunnel_filter_parsed(void *parsed_result,
>
> if (!strcmp(res->tunnel_type, "vxlan"))
> tunnel_filter_conf.tunnel_type =
> RTE_TUNNEL_TYPE_VXLAN;
> + else if (!strcmp(res->tunnel_type, "vxlan-gpe"))
> + tunnel_filter_conf.tunnel_type =
> RTE_TUNNEL_TYPE_VXLAN_GPE;
> else if (!strcmp(res->tunnel_type, "nvgre"))
> tunnel_filter_conf.tunnel_type =
> RTE_TUNNEL_TYPE_NVGRE;
> else if (!strcmp(res->tunnel_type, "ipingre")) @@ -8759,7 +8761,7
> @@ cmdline_parse_token_ipaddr_t cmd_tunnel_filter_ip_value =
> ip_value);
> cmdline_parse_token_string_t cmd_tunnel_filter_tunnel_type =
> TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result,
> - tunnel_type, "vxlan#nvgre#ipingre");
> + tunnel_type, "vxlan#nvgre#ipingre#vxlan-gpe");
>
> cmdline_parse_token_string_t cmd_tunnel_filter_filter_type =
> TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result, @@ -
> 8883,6 +8885,8 @@ cmd_cfg_tunnel_udp_port_parsed(void *parsed_result,
> tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
> } else if (!strcmp(res->tunnel_type, "geneve")) {
> 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 {
> printf("Invalid tunnel type\n");
> return;
> @@ -8917,7 +8921,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#geneve#vxlan-gpe");
> cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
> TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port,
> udp_port,
> UINT16);
> @@ -8925,7 +8929,7 @@ 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 <udp_port>",
> + .help_str = "port config <port_id> udp_tunnel_port add|rm
> +vxlan|geneve|vxlan-gpe <udp_port>",
> .tokens = {
> (void *)&cmd_config_tunnel_udp_port_port,
> (void *)&cmd_config_tunnel_udp_port_config,
> --
> 2.9.5
Should the help strings at lines 374, 378 , 861 in cmdline.c be updated for vxlan-gpe?
Should the help string at lines 2188, 8779 in cmdline.c be updated for vxlan-gpe?
The function flowtype_to_str() at line 11922 should be updated for for vxlan-gpe.
There should also be an update in doc/guides/tesptpmd_app_ug/*.rst for vxlan-gpe.
Regards,
Bernard.
Hi Qiming,
<snip>
> > Subject: [dpdk-dev] [PATCH v4 4/5] app/testpmd: add VXLAN-GPE to
> > tunnel type
> >
> > This patch added new item "vxlan-gpe" to tunnel_type to support new
> > VXLAN-GPE packet type, and its clasification.
> >
> > Signed-off-by: Qiming Yang <qiming.yang@intel.com>
> > ---
> > app/test-pmd/cmdline.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > db53cc0..08a554c 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -8710,6 +8710,8 @@ cmd_tunnel_filter_parsed(void *parsed_result,
> >
> > if (!strcmp(res->tunnel_type, "vxlan"))
> > tunnel_filter_conf.tunnel_type =
> > RTE_TUNNEL_TYPE_VXLAN;
> > + else if (!strcmp(res->tunnel_type, "vxlan-gpe"))
> > + tunnel_filter_conf.tunnel_type =
> > RTE_TUNNEL_TYPE_VXLAN_GPE;
> > else if (!strcmp(res->tunnel_type, "nvgre"))
> > tunnel_filter_conf.tunnel_type =
> > RTE_TUNNEL_TYPE_NVGRE;
> > else if (!strcmp(res->tunnel_type, "ipingre")) @@ -8759,7 +8761,7
> @@
> > cmdline_parse_token_ipaddr_t cmd_tunnel_filter_ip_value =
> > ip_value);
> > cmdline_parse_token_string_t cmd_tunnel_filter_tunnel_type =
> > TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result,
> > - tunnel_type, "vxlan#nvgre#ipingre");
> > + tunnel_type, "vxlan#nvgre#ipingre#vxlan-gpe");
> >
> > cmdline_parse_token_string_t cmd_tunnel_filter_filter_type =
> > TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result, @@ -
> > 8883,6 +8885,8 @@ cmd_cfg_tunnel_udp_port_parsed(void
> *parsed_result,
> > tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
> > } else if (!strcmp(res->tunnel_type, "geneve")) {
> > 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 {
> > printf("Invalid tunnel type\n");
> > return;
> > @@ -8917,7 +8921,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#geneve#vxlan-gpe");
> > cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
> > TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port,
> udp_port,
> > UINT16);
> > @@ -8925,7 +8929,7 @@ 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 <udp_port>",
> > + .help_str = "port config <port_id> udp_tunnel_port add|rm
> > +vxlan|geneve|vxlan-gpe <udp_port>",
> > .tokens = {
> > (void *)&cmd_config_tunnel_udp_port_port,
> > (void *)&cmd_config_tunnel_udp_port_config,
> > --
> > 2.9.5
>
> Should the help strings at lines 374, 378 , 861 in cmdline.c be updated for
> vxlan-gpe?
> Should the help string at lines 2188, 8779 in cmdline.c be updated for vxlan-
> gpe?
>
> The function flowtype_to_str() at line 11922 should be updated for for
> vxlan-gpe.
>
> There should also be an update in doc/guides/tesptpmd_app_ug/*.rst for
> vxlan-gpe.
>
> Regards,
>
> Bernard.
>
Could you also check that the usage() function is updated in dpdk/app/test-pmd/parameters.c
Regards,
Bernard.
Thanks for your reminder, I'll add doc update later.
Qiming
> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Wednesday, March 27, 2019 7:04 PM
> To: Yang, Qiming <qiming.yang@intel.com>; dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming
> <qiming.yang@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v4 4/5] app/testpmd: add VXLAN-GPE to
> tunnel type
>
> Hi Qiminq,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang
> > Sent: Tuesday, March 19, 2019 4:37 PM
> > To: dev@dpdk.org
> > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming
> > <qiming.yang@intel.com>
> > Subject: [dpdk-dev] [PATCH v4 4/5] app/testpmd: add VXLAN-GPE to
> > tunnel type
> >
> > This patch added new item "vxlan-gpe" to tunnel_type to support new
> > VXLAN-GPE packet type, and its clasification.
> >
> > Signed-off-by: Qiming Yang <qiming.yang@intel.com>
> > ---
> > app/test-pmd/cmdline.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > db53cc0..08a554c 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -8710,6 +8710,8 @@ cmd_tunnel_filter_parsed(void *parsed_result,
> >
> > if (!strcmp(res->tunnel_type, "vxlan"))
> > tunnel_filter_conf.tunnel_type =
> > RTE_TUNNEL_TYPE_VXLAN;
> > + else if (!strcmp(res->tunnel_type, "vxlan-gpe"))
> > + tunnel_filter_conf.tunnel_type =
> > RTE_TUNNEL_TYPE_VXLAN_GPE;
> > else if (!strcmp(res->tunnel_type, "nvgre"))
> > tunnel_filter_conf.tunnel_type =
> > RTE_TUNNEL_TYPE_NVGRE;
> > else if (!strcmp(res->tunnel_type, "ipingre")) @@ -8759,7 +8761,7
> @@
> > cmdline_parse_token_ipaddr_t cmd_tunnel_filter_ip_value =
> > ip_value);
> > cmdline_parse_token_string_t cmd_tunnel_filter_tunnel_type =
> > TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result,
> > - tunnel_type, "vxlan#nvgre#ipingre");
> > + tunnel_type, "vxlan#nvgre#ipingre#vxlan-gpe");
> >
> > cmdline_parse_token_string_t cmd_tunnel_filter_filter_type =
> > TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result, @@ -
> > 8883,6 +8885,8 @@ cmd_cfg_tunnel_udp_port_parsed(void
> *parsed_result,
> > tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
> > } else if (!strcmp(res->tunnel_type, "geneve")) {
> > 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 {
> > printf("Invalid tunnel type\n");
> > return;
> > @@ -8917,7 +8921,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#geneve#vxlan-gpe");
> > cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
> > TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port,
> udp_port,
> > UINT16);
> > @@ -8925,7 +8929,7 @@ 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 <udp_port>",
> > + .help_str = "port config <port_id> udp_tunnel_port add|rm
> > +vxlan|geneve|vxlan-gpe <udp_port>",
> > .tokens = {
> > (void *)&cmd_config_tunnel_udp_port_port,
> > (void *)&cmd_config_tunnel_udp_port_config,
> > --
> > 2.9.5
>
> Should the help strings at lines 374, 378 , 861 in cmdline.c be updated for
> vxlan-gpe?
> Should the help string at lines 2188, 8779 in cmdline.c be updated for vxlan-
> gpe?
>
> The function flowtype_to_str() at line 11922 should be updated for for
> vxlan-gpe.
>
> There should also be an update in doc/guides/tesptpmd_app_ug/*.rst for
> vxlan-gpe.
>
> Regards,
>
> Bernard.
>
@@ -8710,6 +8710,8 @@ cmd_tunnel_filter_parsed(void *parsed_result,
if (!strcmp(res->tunnel_type, "vxlan"))
tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_VXLAN;
+ else if (!strcmp(res->tunnel_type, "vxlan-gpe"))
+ tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_VXLAN_GPE;
else if (!strcmp(res->tunnel_type, "nvgre"))
tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_NVGRE;
else if (!strcmp(res->tunnel_type, "ipingre"))
@@ -8759,7 +8761,7 @@ cmdline_parse_token_ipaddr_t cmd_tunnel_filter_ip_value =
ip_value);
cmdline_parse_token_string_t cmd_tunnel_filter_tunnel_type =
TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result,
- tunnel_type, "vxlan#nvgre#ipingre");
+ tunnel_type, "vxlan#nvgre#ipingre#vxlan-gpe");
cmdline_parse_token_string_t cmd_tunnel_filter_filter_type =
TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result,
@@ -8883,6 +8885,8 @@ cmd_cfg_tunnel_udp_port_parsed(void *parsed_result,
tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
} else if (!strcmp(res->tunnel_type, "geneve")) {
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 {
printf("Invalid tunnel type\n");
return;
@@ -8917,7 +8921,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#geneve#vxlan-gpe");
cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value =
TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port, udp_port,
UINT16);
@@ -8925,7 +8929,7 @@ 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 <udp_port>",
+ .help_str = "port config <port_id> udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe <udp_port>",
.tokens = {
(void *)&cmd_config_tunnel_udp_port_port,
(void *)&cmd_config_tunnel_udp_port_config,