From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xueming Li Subject: [RFC v1 4/5] app/testpmd: support l3vxlan tunnel type Date: Sun, 3 Dec 2017 14:08:11 +0800 Message-ID: <20171203060812.74932-5-xuemingl@mellanox.com> References: <20171203060812.74932-1-xuemingl@mellanox.com> Cc: Xueming Li , dev@dpdk.org To: Nelio Laranjeiro , Adrien Mazarguil , Thomas Monjalon Return-path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 2AF967CE2 for ; Sun, 3 Dec 2017 07:36:49 +0100 (CET) In-Reply-To: <20171203060812.74932-1-xuemingl@mellanox.com> In-Reply-To: <20171129173106.120828-2-xuemingl@mellanox.com> References: <20171129173106.120828-2-xuemingl@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Xueming Li --- app/test-pmd/cmdline_flow.c | 9 +++++++++ app/test-pmd/config.c | 3 +++ 2 files changed, 12 insertions(+) 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}, }; -- 2.13.3