From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 9AA661B16A for ; Thu, 19 Apr 2018 15:03:47 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id f14-v6so13846388wre.4 for ; Thu, 19 Apr 2018 06:03:47 -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=w0uUQcWUGHqOMensPQOlSmGdp0Q0yZPFqBp9F3cwog8=; b=zbdVLP7y4zg5xPJIh0Z0hR5M4EfjsWGbPK1YM9WVKIyUhdTQ03rur7KXdlVTTIph9+ vlNqcNangiuKMHzRk44iufJyxb18TF0CNN7xqvrVWjQr//hDG1jOM+bm7ELJEgYQJl4N gCmgmLETHmMopeyrYxH9X2ZEraEqWFbyHHkupb4OPlk4d+KylifULwPsLzCjqU4TV+B2 CqBS4OUcu1mkDWY40MvVote8SvQKt30sOozQkLvhpBphMsw7XEnrd89GxkTI5FW/iaFg fkzdcRhbDfGayMV+zBfAP51+wA5JACizY3Zhkpr41CZhKinQPrfN7HEvyHXiNj2NMuXN Fn/w== 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=w0uUQcWUGHqOMensPQOlSmGdp0Q0yZPFqBp9F3cwog8=; b=lHYcGbhbOgb3ywP8BbouKPhlOTGFozOYFXvt/+hClJpQXvdJLMxqRA21D3EqkEVUDF 1+Ovv+U2yJJomk4S1jcHNjdzbQ/6A/enZeYz3P+lRmV2EsXceHi83vQ1lROzWRzFqPNa axReSocaSe12qiOPJFvlmlww6kE+X/3kKjq5/q9IOk9zGFcoGtORSNVQ/XmNIOFtBpCB n8xQuu2nRV6Am9nu18OUGpRSDF84k+7My89naRcyoFbdioK+ixxWBfTCgolQmEsWAnvE Wzz+hTXSdvQf12/GU4XmlSy64dZEBeleYJsva8NcO7tRuWfqfEmose+i7w1IlDghYfOD 24vw== X-Gm-Message-State: ALQs6tBo+6h8/8Kyan8OCtMsJgrQq/PtTVXMTpnpjPBSoUEs7NG12Ggv E4jwrWbXWbZAQhJXwgl/zKrTDQ== X-Google-Smtp-Source: AIpwx49ezw4yMftAqxEln7mXcC1BUIaA9SLC93N4ThP6/cl5aUevHRxQf1tWi+p7NmKaLhEwGEx9oA== X-Received: by 2002:adf:b64d:: with SMTP id i13-v6mr4748431wre.262.1524143027364; Thu, 19 Apr 2018 06:03:47 -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 t201sm4205429wmd.33.2018.04.19.06.03.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:03:46 -0700 (PDT) Date: Thu, 19 Apr 2018 15:03:33 +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: <20180419130333.GB4957@6wind.com> References: <1523017443-12414-1-git-send-email-declan.doherty@intel.com> <20180418210423.13847-1-declan.doherty@intel.com> <20180418210423.13847-5-declan.doherty@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418210423.13847-5-declan.doherty@intel.com> Subject: Re: [dpdk-dev] [PATCH v4 4/6] ethdev: add mark flow item to flow item types 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:47 -0000 On Wed, Apr 18, 2018 at 10:04:21PM +0100, Declan Doherty wrote: > Introduces a new action type RTE_FLOW_ITEM_TYPE_MARK which enables > flow patterns to specify arbitrary integer values to match aginst Typo on "aginst". > which are set by the RTE_FLOW_ACTION_TYPE_MARK action in a > previously matched flow from a higher prioriry group. prioriry => priority, however this last addition is unnecessary, it could be any prior flow rule that happens to use PASSTHRU. > > Signed-off-by: Declan Doherty > --- > doc/guides/prog_guide/rte_flow.rst | 28 ++++++++++++++++++++++++++++ > lib/librte_ether/rte_flow.h | 24 ++++++++++++++++++++++++ > 2 files changed, 52 insertions(+) > > diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst > index 325010544..6f23ad909 100644 > --- a/doc/guides/prog_guide/rte_flow.rst > +++ b/doc/guides/prog_guide/rte_flow.rst > @@ -598,6 +598,34 @@ associated with a port_id should be retrieved by other means. > | ``mask`` | ``index`` | zeroed to match any port index | > +----------+-----------+--------------------------------+ > > +Item: ``MARK`` > +^^^^^^^^^^^^^^ > + > +Matches packets coming from a previously matched flow in a higher priority group See above re "higher priority group". > +with an arbitrary integer value which was set using the ``MARK`` action in the > +previously matched rule. > + > +This item can only specified once as a match criteria as the ``MARK`` action can > +only be specified once in a flow action. > + > +Note the value of MARK field is arbitrary and application defined. > + > +- Default ``mask`` matches any integer value. > + > +.. _table_rte_flow_item_mark: > + > +.. table:: MARK > + > + +----------+----------+---------------------------+ > + | Field | Subfield | Value | > + +==========+==========+===========================+ > + | ``spec`` | ``id`` | integer value | > + +----------+--------------------------------------+ > + | ``last`` | ``id`` | upper range value | > + +----------+----------+---------------------------+ > + | ``mask`` | ``id`` | zeroed to match any value | > + +----------+------- --+---------------------------+ > + > Data matching item types > ~~~~~~~~~~~~~~~~~~~~~~~~ > > diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h > index 91544f62b..56e262a23 100644 > --- a/lib/librte_ether/rte_flow.h > +++ b/lib/librte_ether/rte_flow.h > @@ -323,6 +323,13 @@ enum rte_flow_item_type { > * See struct rte_flow_item_geneve. > */ > RTE_FLOW_ITEM_TYPE_GENEVE, > + > + /** > + * Matches specified mark field. > + * > + * See struct rte_flow_item_mark. > + */ > + RTE_FLOW_ITEM_TYPE_MARK Remember to add a trailing comma. > }; > > /** > @@ -814,6 +821,23 @@ static const struct rte_flow_item_geneve rte_flow_item_geneve_mask = { > }; > #endif > > +/** > + * RTE_FLOW_ITEM_TYPE_MARK > + * > + * Allow arbitrary integer value set using MARK action in a flow rule in a > + * higher priority group to be matched against in flow rule in a lower > + * priority group. > + * > + * This value is arbitrary and application-defined. Maximum allowed value > + * depends on the underlying implementation. > + * > + * Depending on the underlying implementation the MARK item may be supported in > + * the physical device, virtually in logical groups in the PMD or not at all. See above regarding groups. Also please synchronize this with the contents of rte_flow.rst. They should be the same. > + */ > +struct rte_flow_item_mark { > + uint32_t id; /**< Integer value to match against. */ > +}; > + > /** > * Matching pattern item definition. > * > -- > 2.14.3 > Otherwise this patch looks good. -- Adrien Mazarguil 6WIND