[dpdk-dev,RFC,v1,4/5] app/testpmd: support l3vxlan tunnel type

Message ID 20171203060812.74932-5-xuemingl@mellanox.com (mailing list archive)
State RFC, archived
Delegated to: Ferruh Yigit
Headers

Checks

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

Commit Message

Xueming Li Dec. 3, 2017, 6:08 a.m. UTC
  Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
 app/test-pmd/cmdline_flow.c | 9 +++++++++
 app/test-pmd/config.c       | 3 +++
 2 files changed, 12 insertions(+)
  

Patch

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 1d1835ad6..a2ca03c07 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -160,6 +160,7 @@  enum index {
 	ITEM_SCTP_TAG,
 	ITEM_SCTP_CKSUM,
 	ITEM_VXLAN,
+	ITEM_L3VXLAN,
 	ITEM_VXLAN_VNI,
 	ITEM_E_TAG,
 	ITEM_E_TAG_GRP_ECID_B,
@@ -453,6 +454,7 @@  static const enum index next_item[] = {
 	ITEM_TCP,
 	ITEM_SCTP,
 	ITEM_VXLAN,
+	ITEM_L3VXLAN,
 	ITEM_E_TAG,
 	ITEM_NVGRE,
 	ITEM_MPLS,
@@ -1367,6 +1369,13 @@  static const struct token token_list[] = {
 		.next = NEXT(item_vxlan),
 		.call = parse_vc,
 	},
+	[ITEM_L3VXLAN] = {
+		.name = "l3vxlan",
+		.help = "match L3VXLAN header",
+		.priv = PRIV_ITEM(L3VXLAN, sizeof(struct rte_flow_item_vxlan)),
+		.next = NEXT(item_vxlan),
+		.call = parse_vc,
+	},
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cd2ac1164..2e2143ce8 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -125,6 +125,7 @@  static const struct rss_type_info rss_type_table[] = {
 	{ "ipv6-udp-ex", ETH_RSS_IPV6_UDP_EX },
 	{ "port", ETH_RSS_PORT },
 	{ "vxlan", ETH_RSS_VXLAN },
+	{ "l3vxlan", ETH_RSS_L3VXLAN },
 	{ "geneve", ETH_RSS_GENEVE },
 	{ "nvgre", ETH_RSS_NVGRE },
 
@@ -965,6 +966,7 @@  static const struct {
 	MK_FLOW_ITEM(TCP, sizeof(struct rte_flow_item_tcp)),
 	MK_FLOW_ITEM(SCTP, sizeof(struct rte_flow_item_sctp)),
 	MK_FLOW_ITEM(VXLAN, sizeof(struct rte_flow_item_vxlan)),
+	MK_FLOW_ITEM(L3VXLAN, sizeof(struct rte_flow_item_vxlan)),
 	MK_FLOW_ITEM(E_TAG, sizeof(struct rte_flow_item_e_tag)),
 	MK_FLOW_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)),
 	MK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)),
@@ -2960,6 +2962,7 @@  flowtype_to_str(uint16_t flow_type)
 		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
 		{"port", RTE_ETH_FLOW_PORT},
 		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"l3vxlan", RTE_ETH_FLOW_L3VXLAN},
 		{"geneve", RTE_ETH_FLOW_GENEVE},
 		{"nvgre", RTE_ETH_FLOW_NVGRE},
 	};