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 16EEAA04B5; Tue, 22 Sep 2020 17:38:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 838C61D5E6; Tue, 22 Sep 2020 17:38:23 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id C25DF1D5AA for ; Tue, 22 Sep 2020 17:38:21 +0200 (CEST) IronPort-SDR: 9DRIa1kDGz9i8JOJvplHqtQbnxko71DbcKrOJJu+vcf5XIqr9CbwQstUKtWUD/rUXSOTpcL2fp mESJp74ncFJw== X-IronPort-AV: E=McAfee;i="6000,8403,9752"; a="224778131" X-IronPort-AV: E=Sophos;i="5.77,291,1596524400"; d="scan'208";a="224778131" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 08:38:20 -0700 IronPort-SDR: kVNslay0+0hGCgfqcQGy/FkO2e89TgtNpGP404VvY11VtwK6XcR/VKrZ/lhjQGqWAAeTtVpEYI QqIW8awz0zXg== X-IronPort-AV: E=Sophos;i="5.77,291,1596524400"; d="scan'208";a="454532179" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.227.201]) ([10.213.227.201]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2020 08:38:17 -0700 To: Li Zhang , dekelp@nvidia.com, orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com Cc: dev@dpdk.org, thomas@monjalon.net, rasland@nvidia.com References: <20200908100636.4575-1-lizh@nvidia.com> <20200909033434.31059-1-lizh@nvidia.com> From: Ferruh Yigit Message-ID: <3def4458-0cb1-835e-1006-463ce4878361@intel.com> Date: Tue, 22 Sep 2020 16:38:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200909033434.31059-1-lizh@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [RFC v2 1/1] app/testpmd: distinguish ICMP identifier fields in packet 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" On 9/9/2020 4:34 AM, Li Zhang wrote: > From: lizh > > Ability to distinguish ICMP identifier fields in packets. > Dstinguish ICMP sequence number field too. > Already supports ICMP code and type fields in current version. > Existing fields in ICMP header contain the required information. > ICMP header already is supported and no code change in RTE FLOW. > Extend testpmd CLI to include the fields of ident and sequence number. > One example: > flow create 0 ingress pattern eth / ipv4 / > icmp code is 1 ident is 5 seq is 6 / > end actions count / queue index 0 / end > The ICMP packet with code 1, identifier 5 and > sequence number 6 will be matched. > It will implement action counter and forward to queue 0. > Overall looks good. @Ori, any objection? @Li, is there any PMD implementation planned to use these icmp fields? > Signed-off-by: Li Zhang > --- > app/test-pmd/cmdline_flow.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 6263d307ed..6e04d538ea 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -143,6 +143,8 @@ enum index { > ITEM_ICMP, > ITEM_ICMP_TYPE, > ITEM_ICMP_CODE, > + ITEM_ICMP_IDENT, > + ITEM_ICMP_SEQ, > ITEM_UDP, > ITEM_UDP_SRC, > ITEM_UDP_DST, > @@ -893,6 +895,8 @@ static const enum index item_ipv6[] = { > static const enum index item_icmp[] = { > ITEM_ICMP_TYPE, > ITEM_ICMP_CODE, > + ITEM_ICMP_IDENT, > + ITEM_ICMP_SEQ, > ITEM_NEXT, > ZERO, > }; > @@ -2193,6 +2197,20 @@ static const struct token token_list[] = { > .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp, > hdr.icmp_code)), > }, > + [ITEM_ICMP_IDENT] = { > + .name = "ident", > + .help = "ICMP packet identifier", > + .next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param), > + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp, > + hdr.icmp_ident)), > + }, > + [ITEM_ICMP_SEQ] = { > + .name = "seq", > + .help = "ICMP packet sequence number", > + .next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param), > + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp, > + hdr.icmp_seq_nb)), > + }, > [ITEM_UDP] = { > .name = "udp", > .help = "match UDP header", >