DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@cavium.com>
To: dev@dpdk.org
Cc: Shahed Shaikh <shahed.shaikh@cavium.com>, Dept-EngDPDKDev@cavium.com
Subject: [dpdk-dev] [PATCH 4/5] app/testpmd: add configuration for udp port tunnel type
Date: Fri, 24 Nov 2017 12:35:44 -0800	[thread overview]
Message-ID: <1511555745-13793-5-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1511555745-13793-1-git-send-email-rasesh.mody@cavium.com>

From: Shahed Shaikh <shahed.shaikh@cavium.com>

Replace rx_vxlan_port command with rx_tunnel_udp_port to support both VXLAN
and GENEVE udp ports.

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 app/test-pmd/cmdline.c |   28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f71d963..4b5a8cd 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -402,11 +402,11 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"imac-tenid|imac|omac-imac-tenid|oip|iip) (tenant_id) (queue_id)\n"
 			"   remove a tunnel filter of a port.\n\n"
 
-			"rx_vxlan_port add (udp_port) (port_id)\n"
-			"    Add an UDP port for VXLAN packet filter on a port\n\n"
+			"rx_tunnel_udp_port add vxlan|geneve (udp_port) (port_id)\n"
+			"    Add an UDP port for VXLAN/GENEVE packet filter on a port\n\n"
 
-			"rx_vxlan_port rm (udp_port) (port_id)\n"
-			"    Remove an UDP port for VXLAN packet filter on a port\n\n"
+			"rx_tunnel_udp_port rm vxlan|geneve (udp_port) (port_id)\n"
+			"    Remove an UDP port for VXLAN/GENEVE packet filter on a port\n\n"
 
 			"tx_vlan set (port_id) vlan_id[, vlan_id_outer]\n"
 			"    Set hardware insertion of VLAN IDs (single or double VLAN "
@@ -7984,6 +7984,8 @@ struct cmd_tunnel_filter_result {
 		tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_NVGRE;
 	else if (!strcmp(res->tunnel_type, "ipingre"))
 		tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_IP_IN_GRE;
+	else if (!strcmp(res->tunnel_type, "geneve"))
+		tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_GENEVE;
 	else {
 		printf("The tunnel type %s not supported.\n", res->tunnel_type);
 		return;
@@ -8029,7 +8031,7 @@ struct cmd_tunnel_filter_result {
 	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#geneve");
 
 cmdline_parse_token_string_t cmd_tunnel_filter_filter_type =
 	TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result,
@@ -8046,7 +8048,7 @@ struct cmd_tunnel_filter_result {
 	.f = cmd_tunnel_filter_parsed,
 	.data = (void *)0,
 	.help_str = "tunnel_filter add|rm <port_id> <outer_mac> <inner_mac> "
-		"<ip> <inner_vlan> vxlan|nvgre|ipingre oip|iip|imac-ivlan|"
+		"<ip> <inner_vlan> vxlan|nvgre|ipingre|geneve oip|iip|imac-ivlan|"
 		"imac-ivlan-tenid|imac-tenid|imac|omac-imac-tenid <tenant_id> "
 		"<queue_id>: Add/Rm tunnel filter of a port",
 	.tokens = {
@@ -8069,6 +8071,7 @@ struct cmd_tunnel_filter_result {
 struct cmd_tunnel_udp_config {
 	cmdline_fixed_string_t cmd;
 	cmdline_fixed_string_t what;
+	cmdline_fixed_string_t tunnel_type;
 	uint16_t udp_port;
 	portid_t port_id;
 };
@@ -8084,9 +8087,12 @@ struct cmd_tunnel_udp_config {
 
 	tunnel_udp.udp_port = res->udp_port;
 
-	if (!strcmp(res->cmd, "rx_vxlan_port"))
+	if (!strcmp(res->tunnel_type, "vxlan"))
 		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
 
+	if (!strcmp(res->tunnel_type, "geneve"))
+		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_GENEVE;
+
 	if (!strcmp(res->what, "add"))
 		ret = rte_eth_dev_udp_tunnel_port_add(res->port_id,
 						      &tunnel_udp);
@@ -8100,10 +8106,13 @@ struct cmd_tunnel_udp_config {
 
 cmdline_parse_token_string_t cmd_tunnel_udp_config_cmd =
 	TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,
-				cmd, "rx_vxlan_port");
+				cmd, "rx_tunnel_udp_port");
 cmdline_parse_token_string_t cmd_tunnel_udp_config_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,
 				what, "add#rm");
+cmdline_parse_token_string_t cmd_tunnel_udp_config_tunnel_type =
+	TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,
+				tunnel_type, "vxlan#geneve");
 cmdline_parse_token_num_t cmd_tunnel_udp_config_udp_port =
 	TOKEN_NUM_INITIALIZER(struct cmd_tunnel_udp_config,
 				udp_port, UINT16);
@@ -8114,11 +8123,12 @@ struct cmd_tunnel_udp_config {
 cmdline_parse_inst_t cmd_tunnel_udp_config = {
 	.f = cmd_tunnel_udp_config_parsed,
 	.data = (void *)0,
-	.help_str = "rx_vxlan_port add|rm <udp_port> <port_id>: "
+	.help_str = "rx_tunnel_udp_port add|rm vxlan|geneve <udp_port> <port_id>: "
 		"Add/Remove a tunneling UDP port filter",
 	.tokens = {
 		(void *)&cmd_tunnel_udp_config_cmd,
 		(void *)&cmd_tunnel_udp_config_what,
+		(void *)&cmd_tunnel_udp_config_tunnel_type,
 		(void *)&cmd_tunnel_udp_config_udp_port,
 		(void *)&cmd_tunnel_udp_config_port_id,
 		NULL,
-- 
1.7.10.3

  parent reply	other threads:[~2017-11-24 20:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24 20:35 [dpdk-dev] [PATCH 0/5] net/qede: add enhancements and fixes Rasesh Mody
2017-11-24 20:35 ` [dpdk-dev] [PATCH 1/5] net/qede: fix to enable LRO over tunnels Rasesh Mody
2017-11-24 20:35 ` [dpdk-dev] [PATCH 2/5] examples/kni: add optional parameter to enable LRO Rasesh Mody
2017-12-04 23:25   ` Ferruh Yigit
2017-12-05  6:05     ` Shahaf Shuler
2017-12-05 19:43       ` Patil, Harish
2017-12-05 19:42     ` Patil, Harish
2017-11-24 20:35 ` [dpdk-dev] [PATCH 3/5] net/qede: fix to reject config with no Rx queue Rasesh Mody
2017-11-24 20:35 ` Rasesh Mody [this message]
2017-12-07  0:38   ` [dpdk-dev] [PATCH 4/5] app/testpmd: add configuration for udp port tunnel type Ferruh Yigit
2017-12-07 18:18     ` Shaikh, Shahed
2017-11-24 20:35 ` [dpdk-dev] [PATCH 5/5] net/qede: add support for GENEVE tunneling offload Rasesh Mody
2017-12-14  6:36 ` [dpdk-dev] [PATCH v2 0/3] net/qede: add enhancements and fixes Rasesh Mody
2017-12-15 21:05   ` Ferruh Yigit
2017-12-14  6:36 ` [dpdk-dev] [PATCH v2 1/3] net/qede: fix to enable LRO over tunnels Rasesh Mody
2017-12-14  6:36 ` [dpdk-dev] [PATCH v2 2/3] net/qede: fix to reject config with no Rx queue Rasesh Mody
2017-12-14  6:36 ` [dpdk-dev] [PATCH v2 3/3] net/qede: add support for GENEVE tunneling offload Rasesh Mody
2017-12-15 21:01   ` Ferruh Yigit
2017-12-15 21:12     ` Mody, Rasesh
2017-12-16  0:19       ` Ferruh Yigit
2017-12-16  0:42         ` Mody, Rasesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1511555745-13793-5-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=dev@dpdk.org \
    --cc=shahed.shaikh@cavium.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).