From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id B22C72C8 for ; Thu, 6 Jul 2017 15:24:02 +0200 (CEST) Received: by mail-wr0-f180.google.com with SMTP id c11so2849922wrc.3 for ; Thu, 06 Jul 2017 06:24:02 -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=wQ5RV8CaIUkK1qO+/L6n1YkBi5U+RWBh5/JG1zqTSDM=; b=cYIOSO7+Ia+od0X15v33qVTk6YfGszSJba/MW2mtMtMKWnDNNnWr6oFTDjag5t9l2a E2RRCj+PFRjoR2usH+TqI1dbLEBOBdXw5dI/treAykAlML52bPllAnjNDU5q0l9b/S5s 5qHRWmz8nBruKC+TQ9a1JIGGE9OJtVQ8Mm5VMEonO1zHJikObaT7D468NDVCZ8cvMyRF vy1FD9UTbXYlUV6g174T2kwi8PqHoxyD8pPvfNA8U1knzdYHuy3JRoLk9r8svTGUAw74 7XLj42mJ16qDfcZ1Sz2YgIy1DHS1qHe9+ldrMKTmu5J3j1XJKBTbnpVbG3l/t9dMdOEl iChA== 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=wQ5RV8CaIUkK1qO+/L6n1YkBi5U+RWBh5/JG1zqTSDM=; b=aEaSXJmKVWNP3TyO+yd2265StQOuUpuIJz3ikss6YrDV7yIY19YUIYxuG5q7CQpAkT +ThE6EKrKiUjy8weUMIHLXtbX5KBkFdbvezMYa82Id46SrYXjTElzwl2CJ5GebQD4ayp MrAFfTajg6XbX6/IsUGNhrsrFvJEW7p5b9C2tewHOnu4nxVtVfwWsCj4RB4zI+MN+nYw 0+scDdlvAFa6k2Sqyo9THcETzG3+qfmU5cTjiHtvXE8z7lXZZ576E2f5ZpoSl6ZPF150 avNDRuEqyijmFVHcf+esPby0qLF3ZdwbhtPUiUi8l0UMuPsRY0uF1XbmPTT6SCBj6Bbv VEtA== X-Gm-Message-State: AKS2vOy6y6Cf+FfkUWPBNM2gFYBE1/sVGZXUKHTe6RMJAHHTyplottqP QPbJxobTucaxxon6 X-Received: by 10.223.138.167 with SMTP id y36mr42924263wry.93.1499347442355; Thu, 06 Jul 2017 06:24:02 -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 b192sm400186wmf.25.2017.07.06.06.24.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Jul 2017 06:24:01 -0700 (PDT) Date: Thu, 6 Jul 2017 15:23:53 +0200 From: Adrien Mazarguil To: Qi Zhang Cc: ferruh.yigit@intel.com, dev@dpdk.org Message-ID: <20170706132353.GM19852@6wind.com> References: <1499312792-3963-1-git-send-email-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1499312792-3963-1-git-send-email-qi.z.zhang@intel.com> Subject: Re: [dpdk-dev] [PATCH] ethdev: fix document for fuzzy match 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, 06 Jul 2017 13:24:02 -0000 On Wed, Jul 05, 2017 at 11:46:32PM -0400, Qi Zhang wrote: > Fix couple document issues for fuzzy match. > > Fixes: a3a2e2c8f7de ("ethdev: add fuzzy match in flow API") > > Signed-off-by: Qi Zhang Thanks, just a couple of comments below (nit-picking again). > --- > doc/guides/prog_guide/rte_flow.rst | 13 ++++++++----- > lib/librte_ether/rte_flow.h | 5 ++++- > 2 files changed, 12 insertions(+), 6 deletions(-) > > diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst > index 1b44f50..5063d58 100644 > --- a/doc/guides/prog_guide/rte_flow.rst > +++ b/doc/guides/prog_guide/rte_flow.rst > @@ -898,7 +898,7 @@ Matches a MPLS header. > - Default ``mask`` matches label only. > > Item: ``GRE`` > -^^^^^^^^^^^^^^ > +^^^^^^^^^^^^^ This part should either be in a separate commit or you need a second Fixes line for: 7cd048321d1d ("ethdev: add MPLS and GRE flow API items") > > Matches a GRE header. > > @@ -907,7 +907,7 @@ Matches a GRE header. > - Default ``mask`` matches protocol only. > > Item: ``FUZZY`` > -^^^^^^^^^^^^^^^^^ > +^^^^^^^^^^^^^^^ > > Fuzzy pattern match, expect faster than default. > > @@ -918,19 +918,22 @@ value, but it is possible two different patterns have the same hash value. > Matching accuracy level can be configured by threshold. Driver can divide the > range of threshold and map to different accuracy levels that device support. > > +Threshold 0 means perfect match(no fuzziness), while threshold 0xffffffff > +means fuzziest match. > + Additional space necessary before "(no fuzziness)". > .. _table_rte_flow_item_fuzzy: > > .. table:: FUZZY > > +----------+---------------+--------------------------------------------------+ > | Field | Subfield | Value | > - +==========+===========+======================================================+ > + +==========+===============+==================================================+ > | ``spec`` | ``threshold`` | 0 as perfect match, 0xffffffff as fuzziest match | > +----------+---------------+--------------------------------------------------+ > | ``last`` | ``threshold`` | upper range value | > - +----------+-----------+------------------------------------------------------+ > + +----------+---------------+--------------------------------------------------+ > | ``mask`` | ``threshold`` | bit-mask apply to "spec" and "last" | > - +----------+-----------+------------------------------------------------------+ > + +----------+---------------+--------------------------------------------------+ > > Usage example, fuzzy match a TCPv4 packets: > > diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h > index cfbed30..f92f3c3 100644 > --- a/lib/librte_ether/rte_flow.h > +++ b/lib/librte_ether/rte_flow.h > @@ -719,9 +719,12 @@ static const struct rte_flow_item_gre rte_flow_item_gre_mask = { > * Matching accuracy level can be configure by threshold. > * Driver can divide the range of threshold and map to different > * accuracy levels that device support. > + * > + * Threshold 0 means perfect match(no fuzziness), while threshold > + * 0xffffffff means fuzziest match. Ditto here. > */ > struct rte_flow_item_fuzzy { > - uint32_t thresh; /**< Accuracy threshold*/ > + uint32_t thresh; /**< Accuracy threshold. */ > }; > > /** Default mask for RTE_FLOW_ITEM_TYPE_FUZZY. */ > -- > 2.7.4 > -- Adrien Mazarguil 6WIND