DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Qi Zhang <qi.z.zhang@intel.com>
Cc: ferruh.yigit@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] ethdev: fix document for fuzzy match
Date: Thu, 6 Jul 2017 15:23:53 +0200	[thread overview]
Message-ID: <20170706132353.GM19852@6wind.com> (raw)
In-Reply-To: <1499312792-3963-1-git-send-email-qi.z.zhang@intel.com>

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 <qi.z.zhang@intel.com>

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

      reply	other threads:[~2017-07-06 13:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06  3:46 Qi Zhang
2017-07-06 13:23 ` Adrien Mazarguil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170706132353.GM19852@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=qi.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).