[dpdk-dev] [PATCH v2] ethdev: add fuzzy match pattern

Adrien Mazarguil adrien.mazarguil at 6wind.com
Mon Jun 12 17:38:41 CEST 2017


On Thu, Jun 08, 2017 at 09:19:24AM +0200, Thomas Monjalon wrote:
> Hi,
> 
> 08/06/2017 00:21, Qi Zhang:
> > Add new meta pattern item RTE_FLOW_TYPE_ITEM_FUZZY.
> 
> I disagree about fuzzy wording, because fuzzy is something different
> I think.

At least it's a generic term, unrelated PMDs could likewise implement
another kind of fuzzy matching for performance reasons (for applications
that really care more about performance than accuracy). The fact this
particular implementation is built on top of something that is internally
known as signature hash should not be relevant.

> > This is for device that support fuzzy  match option.
> > Usually a fuzzy match is fast but the cost is accuracy.
> > i.e. Signature Match only match pattern's hash value, but it is
> > possible two different patterns have the same hash value.
> 
> You have described it yourself here: it matches a hash of the signature.
> Why not using "hash" as wording?

While "hash" would be also correct, in my opinion it would restrict this
pattern item to Intel adapters (ixgbe) with the ability to actually perform
a hash on patterns and use the resulting value to imperfectly match
traffic. This excludes other implementations with similar unpredictable
results.

Also a threshold notion is necessary as far as I understand, the signature
mode has several levels. The higher, the fuzzier it gets. This behavior is
difficult to translate to something generic named "hash", as one would have
to describe how the hash is computed and packets matched according to that
value, which really is ixgbe-specific at the moment.

> > Matching accuracy level can be configure by subfield threshold.
> > Driver can divide the range of threshold and map to different
> > accuracy levels that device support.
> > 
> > Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>

Qi, many of my other comments about v1 still stand, please check my previous
reply in any case.

-- 
Adrien Mazarguil
6WIND


More information about the dev mailing list