[2/2] net/i40e: support VXLAN-GPE classification

Message ID 20190102143829.7624-2-qiming.yang@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: Qi Zhang
Headers
Series [1/2] net/i40e: add support for VXLAN-GPE |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Qiming Yang Jan. 2, 2019, 2:38 p.m. UTC
  Added VXLAN-GPE tunnel filter, supported filter to queue.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
 app/test-pmd/cmdline.c         | 4 +++-
 drivers/net/i40e/i40e_ethdev.c | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 51c7fac..7b7cb12 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8704,6 +8704,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"))
@@ -8753,7 +8755,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,
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 1dd04e6..8eb2a02 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -7690,6 +7690,9 @@  i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
 	case RTE_TUNNEL_TYPE_IP_IN_GRE:
 		tun_type = I40E_AQC_ADD_CLOUD_TNL_TYPE_IP;
 		break;
+	case RTE_TUNNEL_TYPE_VXLAN_GPE:
+		tun_type = I40E_AQC_ADD_CLOUD_TNL_TYPE_VXLAN_GPE;
+		break;
 	default:
 		/* Other tunnel types is not supported. */
 		PMD_DRV_LOG(ERR, "tunnel type is not supported.");