From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D008FA0524; Tue, 13 Apr 2021 10:16:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D40D160C59; Tue, 13 Apr 2021 10:16:07 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id DA6CA160C0C for ; Tue, 13 Apr 2021 10:16:04 +0200 (CEST) IronPort-SDR: 4ZDc5ewbOP4CZCmtiBOGe9tyzJl43gFF65vcz+xrztv//TXXVmy/mzBH7ImudXvyuqZqbvPwY3 H4tYAZ3+aAGg== X-IronPort-AV: E=McAfee;i="6200,9189,9952"; a="181492830" X-IronPort-AV: E=Sophos;i="5.82,218,1613462400"; d="scan'208";a="181492830" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2021 01:16:04 -0700 IronPort-SDR: oKgkMFPNLF7aDDk7todWl3M5cRahkgZkuVL44gX95FAiX95ie2XaHgAa/m90dmkacxuJRtvb9v ETdl3K6vkB0w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,218,1613462400"; d="scan'208";a="424152508" Received: from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128]) by orsmga008.jf.intel.com with ESMTP; 13 Apr 2021 01:16:02 -0700 From: Jeff Guo To: orika@nvidia.com, qi.z.zhang@intel.com, beilei.xing@intel.com, xiaoyun.li@intel.com, jingjing.wu@intel.com Cc: dev@dpdk.org, ting.xu@intel.com, jia.guo@intel.com Date: Tue, 13 Apr 2021 16:10:29 +0800 Message-Id: <20210413081032.60509-2-jia.guo@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210413081032.60509-1-jia.guo@intel.com> References: <20210324134844.60410-1-jia.guo@intel.com> <20210413081032.60509-1-jia.guo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 1/4] app/testpmd: add packet id for IP fragment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Add the new items to support the flow configuration for IP fragment packets. Signed-off-by: Ting Xu Signed-off-by: Jeff Guo --- app/test-pmd/cmdline_flow.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index fb7a3a8bd3..46ae342b85 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -166,6 +166,7 @@ enum index { ITEM_VLAN_HAS_MORE_VLAN, ITEM_IPV4, ITEM_IPV4_TOS, + ITEM_IPV4_ID, ITEM_IPV4_FRAGMENT_OFFSET, ITEM_IPV4_TTL, ITEM_IPV4_PROTO, @@ -236,6 +237,7 @@ enum index { ITEM_IPV6_FRAG_EXT, ITEM_IPV6_FRAG_EXT_NEXT_HDR, ITEM_IPV6_FRAG_EXT_FRAG_DATA, + ITEM_IPV6_FRAG_EXT_ID, ITEM_ICMP6, ITEM_ICMP6_TYPE, ITEM_ICMP6_CODE, @@ -1028,6 +1030,7 @@ static const enum index item_vlan[] = { static const enum index item_ipv4[] = { ITEM_IPV4_TOS, + ITEM_IPV4_ID, ITEM_IPV4_FRAGMENT_OFFSET, ITEM_IPV4_TTL, ITEM_IPV4_PROTO, @@ -1164,6 +1167,7 @@ static const enum index item_ipv6_ext[] = { static const enum index item_ipv6_frag_ext[] = { ITEM_IPV6_FRAG_EXT_NEXT_HDR, ITEM_IPV6_FRAG_EXT_FRAG_DATA, + ITEM_IPV6_FRAG_EXT_ID, ITEM_NEXT, ZERO, }; @@ -2466,6 +2470,13 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4, hdr.type_of_service)), }, + [ITEM_IPV4_ID] = { + .name = "packet_id", + .help = "fragment packet id", + .next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4, + hdr.packet_id)), + }, [ITEM_IPV4_FRAGMENT_OFFSET] = { .name = "fragment_offset", .help = "fragmentation flags and fragment offset", @@ -2969,12 +2980,20 @@ static const struct token token_list[] = { }, [ITEM_IPV6_FRAG_EXT_FRAG_DATA] = { .name = "frag_data", - .help = "Fragment flags and offset", + .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_IPV6_FRAG_EXT_ID] = { + .name = "packet_id", + .help = "fragment packet id", + .next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext, + hdr.id)), + }, [ITEM_ICMP6] = { .name = "icmp6", .help = "match any ICMPv6 header", -- 2.20.1