From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 54DE8A04B7; Tue, 13 Oct 2020 15:35:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 89A1A1DB8F; Tue, 13 Oct 2020 15:34:11 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 8864E1DB74 for ; Tue, 13 Oct 2020 15:34:03 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@nvidia.com) with SMTP; 13 Oct 2020 16:33:58 +0300 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.228.134.250]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 09DDXkMf022551; Tue, 13 Oct 2020 16:33:58 +0300 From: Dekel Peled To: orika@nvidia.com, thomas@monjalon.net, ferruh.yigit@intel.com, arybchenko@solarflare.com, konstantin.ananyev@intel.com, olivier.matz@6wind.com, wenzhuo.lu@intel.com, beilei.xing@intel.com, bernard.iremonger@intel.com, matan@nvidia.com, shahafs@nvidia.com, viacheslavo@nvidia.com Cc: dev@dpdk.org Date: Tue, 13 Oct 2020 16:32:44 +0300 Message-Id: <1847c02a861fe14131c3bd9b86938ef54e50efef.1602595426.git.dekelp@nvidia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v6 5/5] app/testpmd: support IPv6 fragment extension item X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_flow update, following RFC [1], added to ethdev the rte_flow item ipv6_frag_ext. This patch updates testpmd CLI to support the new item and its fields. To match on fragmented IPv6 packets, this item is added to pattern: ... ipv6 / ipv6_frag_ext ... [1] http://mails.dpdk.org/archives/dev/2020-March/160255.html Signed-off-by: Dekel Peled Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index d311b85..75d2b56 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -196,6 +196,9 @@ enum index { ITEM_ARP_ETH_IPV4_TPA, ITEM_IPV6_EXT, ITEM_IPV6_EXT_NEXT_HDR, + ITEM_IPV6_FRAG_EXT, + ITEM_IPV6_FRAG_EXT_NEXT_HDR, + ITEM_IPV6_FRAG_EXT_FRAG_DATA, ITEM_ICMP6, ITEM_ICMP6_TYPE, ITEM_ICMP6_CODE, @@ -787,6 +790,7 @@ struct parse_action_priv { ITEM_VXLAN_GPE, ITEM_ARP_ETH_IPV4, ITEM_IPV6_EXT, + ITEM_IPV6_FRAG_EXT, ITEM_ICMP6, ITEM_ICMP6_ND_NS, ITEM_ICMP6_ND_NA, @@ -1008,6 +1012,13 @@ struct parse_action_priv { ZERO, }; +static const enum index item_ipv6_frag_ext[] = { + ITEM_IPV6_FRAG_EXT_NEXT_HDR, + ITEM_IPV6_FRAG_EXT_FRAG_DATA, + ITEM_NEXT, + ZERO, +}; + static const enum index item_icmp6[] = { ITEM_ICMP6_TYPE, ITEM_ICMP6_CODE, @@ -2579,6 +2590,30 @@ static int comp_set_raw_index(struct context *, const struct token *, .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext, next_hdr)), }, + [ITEM_IPV6_FRAG_EXT] = { + .name = "ipv6_frag_ext", + .help = "match presence of IPv6 fragment extension header", + .priv = PRIV_ITEM(IPV6_FRAG_EXT, + sizeof(struct rte_flow_item_ipv6_frag_ext)), + .next = NEXT(item_ipv6_frag_ext), + .call = parse_vc, + }, + [ITEM_IPV6_FRAG_EXT_NEXT_HDR] = { + .name = "next_hdr", + .help = "next header", + .next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext, + hdr.next_header)), + }, + [ITEM_IPV6_FRAG_EXT_FRAG_DATA] = { + .name = "frag_data", + .help = "Fragment flags and offset", + .next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext, + hdr.frag_data)), + }, [ITEM_ICMP6] = { .name = "icmp6", .help = "match any ICMPv6 header", -- 1.8.3.1