From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 11CCE1B170 for ; Thu, 19 Apr 2018 15:03:55 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id v60-v6so13835514wrc.7 for ; Thu, 19 Apr 2018 06:03:55 -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=C7rZuP6TFOfF6i5F4fVSPjGcXYUr8g1jbSmUTwEkKyQ=; b=RcAs9La+m7hgjz6Uf0AX1XMBGgzWwGnLQNOP9SxL+Q1oJn3xuHu438AUwRI8C/UaIs EQryxofKA3JWOHSgug0UlsLFSnZlcyt6j8NUUKGfgwVSh29XxsF451CqX++JubxB1maz R8ZtI3z8X1h/HGRljOEqhDKdpI6C+5H3q4Ri1jZpWeE3sWFKfYA9ZIqqd5kLSrQQhBYN BxMCG8YTAussXUwxwDGoSqDfxDhY6jLKtM/qzLWONyRnb3ISI5Ag7QMmD4LukmEDNSh7 xPcPTiUEhAuTFLMEUtzuhBBrlk1pN7+1U0mdGUKQReIn8o9oRpZfTl+feo3eiq1I7tUT +bPg== 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=C7rZuP6TFOfF6i5F4fVSPjGcXYUr8g1jbSmUTwEkKyQ=; b=JsZOk4hAOgXZFRrRO2IVlnNcSbKJlIGhCv3OQj6uUwI8OtCaLjoWmmmRkCOwlbyvEA dK2KJ+SHEOpKwa/eX1t8VJrtyjusuHLDs6ORAhJTBVaPnGwOviq3AuFBOAq+09WqQ4FZ JO8uG1FszuumLOsVUHR4lTms7RHGT4pjC7h9fgX9nzByYml6w52SNoAKPZ5gTbKNG0tp 1XdJ1YuLpRUomdyWGIy09WLQxzKL+wFKV1ApsXFyocUS3e60QRTzdOBjCnCJpUOz0yZE +bqDvEr6vDtB4kdYzrmgeE9IyOk2u3tgub0/lj2UTtRt6p1lly/wmwvfHLq514ePFs1h wYBg== X-Gm-Message-State: ALQs6tCJV3A9f4bWhXNICQ43YC+d0e7fvcyBeHijjqdsNsJSOrTXpR9h klkueZgPWdy1dkC8mrQ4tJjYIQ== X-Google-Smtp-Source: AIpwx4+G9DmYOBpNV93FJtozX3Ml30ykVitkTgzFIvWq3pvsxO4w6Iup6PfOwqG3hX7u380PBxi9jQ== X-Received: by 2002:adf:e4c8:: with SMTP id v8-v6mr1469752wrm.133.1524143034822; Thu, 19 Apr 2018 06:03:54 -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 m134sm5031693wmg.13.2018.04.19.06.03.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:03:54 -0700 (PDT) Date: Thu, 19 Apr 2018 15:03:40 +0200 From: Adrien Mazarguil To: Declan Doherty Cc: dev@dpdk.org, Alex Rosenbaum , Ferruh Yigit , Thomas Monjalon , Shahaf Shuler , Qi Zhang , Alejandro Lucero , Andrew Rybchenko , Mohammad Abdul Awal , Remy Horton , John McNamara , Rony Efraim , Jingjing Wu , Wenzhuo Lu , Vincent Jardin , Yuanhan Liu , Bruce Richardson , Konstantin Ananyev , Zhihong Wang Message-ID: <20180419130340.GC4957@6wind.com> References: <1523017443-12414-1-git-send-email-declan.doherty@intel.com> <20180418210423.13847-1-declan.doherty@intel.com> <20180418210423.13847-6-declan.doherty@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418210423.13847-6-declan.doherty@intel.com> Subject: Re: [dpdk-dev] [PATCH v4 5/6] testpmd: add support for MARK flow 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: , X-List-Received-Date: Thu, 19 Apr 2018 13:03:55 -0000 On Wed, Apr 18, 2018 at 10:04:22PM +0100, Declan Doherty wrote: > Add support for specificaiton of new MARK flow item in testpmd's cli, > and update testpmd documentation to describe new MARK flow item support. > > Signed-off-by: Declan Doherty specificaiton => specification, however you should merge this in the previous patch ("ethdev: add mark flow item to flow item types"), a few nits below. > --- > app/test-pmd/cmdline_flow.c | 22 ++++++++++++++++++++++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++++ > 2 files changed, 26 insertions(+) > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 93e9a240d..e6284ce11 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -87,6 +87,8 @@ enum index { > ITEM_VF_ID, > ITEM_PORT, > ITEM_PORT_INDEX, > + ITEM_MARK, > + ITEM_MARK_ID, > ITEM_RAW, > ITEM_RAW_RELATIVE, > ITEM_RAW_SEARCH, > @@ -419,6 +421,7 @@ static const enum index next_item[] = { > ITEM_PF, > ITEM_VF, > ITEM_PORT, > + ITEM_MARK, > ITEM_RAW, > ITEM_ETH, > ITEM_VLAN, > @@ -465,6 +468,12 @@ static const enum index item_port[] = { > ZERO, > }; > > +static const enum index item_mark[] = { > + ITEM_MARK_ID, > + ITEM_NEXT, > + ZERO, > +}; > + > static const enum index item_raw[] = { > ITEM_RAW_RELATIVE, > ITEM_RAW_SEARCH, > @@ -1041,6 +1050,19 @@ static const struct token token_list[] = { > .next = NEXT(item_port, NEXT_ENTRY(UNSIGNED), item_param), > .args = ARGS(ARGS_ENTRY(struct rte_flow_item_port, index)), > }, > + [ITEM_MARK] = { > + .name = "mark", > + .help = "match packets against value set in previous group", As previously discussed, you should drop the "previous group" part. > + .priv = PRIV_ITEM(MARK, sizeof(struct rte_flow_item_mark)), > + .next = NEXT(item_mark), > + .call = parse_vc, > + }, > + [ITEM_MARK_ID] = { > + .name = "id", > + .help = "Integer value to match against", > + .next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param), > + .args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)), > + }, > [ITEM_RAW] = { > .name = "raw", > .help = "match an arbitrary byte string", > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 7ecd602da..2b5ade4a8 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -3211,6 +3211,10 @@ This section lists supported pattern items and their attributes, if any. > > - ``index {unsigned}``: physical port index. > > +- ``mark``: match value set in previously matched flow in higher priority group. > + > + - ``id {unsigned}``: arbitrary integer value. > + Ditto. > - ``raw``: match an arbitrary byte string. > > - ``relative {boolean}``: look for pattern after the previous item. > -- > 2.14.3 > -- Adrien Mazarguil 6WIND