From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id A21157CC6 for ; Wed, 6 Sep 2017 18:03:30 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id u26so32865843wma.0 for ; Wed, 06 Sep 2017 09:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OIhEsxpXvG74ALTZhMHTkByyzDcbUUhRTsj5tVFA+Lw=; b=NwXlrsrw7xsbVVa0LP8UH4zk2PFGmHOC+Voi7Ns4MQF87xn766C6fq5egPa91hQz16 CAYoEY579aZbcATuceN2WulzHices60K/p/TcLxSD5z690eSLGroWNst3J6rje4iM3w2 RDAkdEQ7tRZG/xOOGWn7K4r82gzRmsSQ+Yqo+knSYgPNVe4P3Z/XO+mOW7FeHLLg8HFQ 7GqUIjvdo6h6jQqJGytMfDvzjSMzUkbcBccabdemePLdCGT4QeuRZeeV0r+J4OqSjRum zruW5JLIQFRam4uFcagi3/41ocJ/qFHi0WSSClwOFcVHtv2bUaZIprAE0mdbqh78/gjs Ejqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OIhEsxpXvG74ALTZhMHTkByyzDcbUUhRTsj5tVFA+Lw=; b=JzfMfy+XSfVkB/k/DVkBeFEx2OvlhIR09f/egjOaSAeEXSQWIfaikxMA3pU4mnuPSj pcjqvUcb0eqzySuKP7AuwzCp1C1W4SSRNJ0Gyd1rZy2O3WUV51J7XpEmvgRno8ddUHAN LtgXsSwiOdbsuJx3hP23ecZdUJa0Gxt4MuMUnlkofvdz6oD049RRzPwqmDSVEHlOZzhI xQhHKgOT584YWEs1Qqa2/piFaWjHF4jtdP5UYQksGAigpJ920/+GYVAP/hkLcHEu+ydf h60l7A3xz3qIgs0P2GqszPpA7dOOfAuiiqbKkKZSqJ+b5HY3oCRYQ85DxK8szB70vj7L KGmA== X-Gm-Message-State: AHPjjUjBpOJp6DETCOIXueZprb7mTSsi2JsQwC0uCvQ9Q9afFs8TVPM4 jXO1fm/5bZVs4go9494= X-Google-Smtp-Source: ADKCNb6F17Fs+whL0T2p8DxBZ0SlW1XUIj0x0e3ulRgepS9yk2Pra5hqo85hylcP3K+xuu7MbB2kuQ== X-Received: by 10.28.107.76 with SMTP id g73mr171628wmc.66.1504713810298; Wed, 06 Sep 2017 09:03:30 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id f188sm2949395wme.21.2017.09.06.09.03.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Sep 2017 09:03:28 -0700 (PDT) Date: Wed, 6 Sep 2017 18:03:19 +0200 From: Adrien Mazarguil To: Beilei Xing Cc: jingjing.wu@intel.com, dev@dpdk.org Message-ID: <20170906160319.GC4301@6wind.com> References: <1503647430-93905-1-git-send-email-beilei.xing@intel.com> <1503647430-93905-4-git-send-email-beilei.xing@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1503647430-93905-4-git-send-email-beilei.xing@intel.com> Subject: Re: [dpdk-dev] [PATCH 3/7] app/testpmd: add GTP fields to flow command 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: , X-List-Received-Date: Wed, 06 Sep 2017 16:03:30 -0000 On Fri, Aug 25, 2017 at 03:50:26PM +0800, Beilei Xing wrote: > This patch exposes the following item fields through the flow command: > > - GTP TEID > > Signed-off-by: Beilei Xing Minor nits, see below. > --- > app/test-pmd/cmdline_flow.c | 22 ++++++++++++++++++++++ > app/test-pmd/config.c | 1 + > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++++ > 3 files changed, 27 insertions(+) > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index a17a004..4ab5bcc 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -171,6 +171,8 @@ enum index { > ITEM_GRE_PROTO, > ITEM_FUZZY, > ITEM_FUZZY_THRESH, > + ITEM_GTP, > + ITEM_GTP_TEID, > > /* Validate/create actions. */ > ACTIONS, > @@ -451,6 +453,7 @@ static const enum index next_item[] = { > ITEM_MPLS, > ITEM_GRE, > ITEM_FUZZY, > + ITEM_GTP, > ZERO, > }; > > @@ -588,6 +591,12 @@ static const enum index item_gre[] = { > ZERO, > }; > > +static const enum index item_gtp[] = { > + ITEM_GTP_TEID, > + ITEM_NEXT, > + ZERO, > +}; > + > static const enum index next_action[] = { > ACTION_END, > ACTION_VOID, > @@ -1421,6 +1430,19 @@ static const struct token token_list[] = { > .args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy, > thresh)), > }, > + [ITEM_GTP] = { > + .name = "gtp", > + .help = "match GTP header", > + .priv = PRIV_ITEM(GTP, sizeof(struct rte_flow_item_gtp)), > + .next = NEXT(item_gtp), > + .call = parse_vc, > + }, > + [ITEM_GTP_TEID] = { > + .name = "teid", > + .help = "GTP TEID", No need to repeat "GTP". You may also expand the TEID acronym. > + .next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param), > + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)), > + }, > > /* Validate/create actions. */ > [ACTIONS] = { > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 3ae3e1c..1f320a0 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -947,6 +947,7 @@ static const struct { > MK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)), > MK_FLOW_ITEM(GRE, sizeof(struct rte_flow_item_gre)), > MK_FLOW_ITEM(FUZZY, sizeof(struct rte_flow_item_fuzzy)), > + MK_FLOW_ITEM(GTP, sizeof(struct rte_flow_item_gtp)), > }; > > /** Compute storage space needed by item specification. */ > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 2ed62f5..6ec463e 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -2696,6 +2696,10 @@ This section lists supported pattern items and their attributes, if any. > > - ``thresh {unsigned}``: accuracy threshold. > > +- ``gtp``: match GTP header. > + > + - ``teid {unsigned}``: GTP TEID. > + Same comment here. Indentation is also wrong. Thanks. -- Adrien Mazarguil 6WIND