[ovs-discuss] Finding a rule

Ben Pfaff blp at ovn.org
Fri Aug 12 20:17:04 UTC 2016


find_match_wc() is the same as find_match() except that it also updates
a 'wc' parameter to reflect the fields that had to be examined to find
the match (or find no match).

On Thu, Aug 11, 2016 at 10:53:25PM +0200, Amrane Ait Zeouay wrote:
> Sorry for not explaining, I added the field and it's works really fine, but
> just I did some modification on classifier_lookup__() especially the
> function "find_match_wc()" and i just want to know how the OvS find the
> rules ? so if you could explain to me about the function "find_match_wc()"
> because I need to explaining to them everything about the process of
> finding a rule.
> Thank you and have a nice day.
> 
> 2016-08-11 22:44 GMT+02:00 Ben Pfaff <blp at ovn.org>:
> 
> > Now I'm confused.  First, you said that you're adding a new field and
> > found a problem.  Now, you said that you're trying to explain how
> > classifier_lookup__() works for a presentation.  Which of these is
> > really true?
> >
> > On Thu, Aug 11, 2016 at 08:27:43PM +0200, Amrane Ait Zeouay wrote:
> > > I want just to understand how the function classifier_lookup__() works.
> > > Because i have the presentation and i need to explain to them about it,
> > and
> > > i read your documents but there is nothing how this function works. I
> > found
> > > that if there is no wildcard then it will go from the first condition in
> > > the function find_match_wc() and the other i didn't understand them.
> > > So can you please explain to me briefly about it.
> > > Thank you and have a nice day.
> > > On 11 Aug 2016 18:20, "Ben Pfaff" <blp at ovn.org> wrote:
> > >
> > > > You're doing something wrong.  The classifier finds a matching rule.
> > > > There's no need to "check" anything afterward.
> > > >
> > > > The classifier doesn't have any provision for finding a "different"
> > > > rule.
> > > >
> > > > On Thu, Aug 11, 2016 at 05:51:40PM +0200, Amrane Ait Zeouay wrote:
> > > > > No, I'm working with classifier to find the rule. So when the
> > classifier
> > > > > found the rule I need to check that rule. But the problem is when i
> > want
> > > > > the classifier to give me another rule different from the highest
> > rule
> > > > that
> > > > > matches the flow.
> > > > > Thank you.
> > > > > On 11 Aug 2016 5:45 pm, "Ben Pfaff" <blp at ovn.org> wrote:
> > > > >
> > > > > > On Thu, Aug 11, 2016 at 01:14:38PM +0200, Amrane Ait Zeouay wrote:
> > > > > > > I'm working on Openvswitch version 2.5.0 for adding new fields,
> > And I
> > > > > > found
> > > > > > > a problem with my implemntation in the function "find_match_wc()"
> > > > file
> > > > > > > lib/classifier.c, I want to know when the condition
> > > > "OVS_UNLIKELY(!wc)"
> > > > > > is
> > > > > > > used, and this condition too "!cmap_node_next(inode)" and the
> > last
> > > > one
> > > > > > for
> > > > > > > looking for a rule using find_match(), because one time it was
> > going
> > > > from
> > > > > > > "OVS_UNLIKELY(!wc)" and another time it went from
> > > > > > "!cmap_node_next(inode)"
> > > > > > > and this time is skipping everything and going for that
> > > > "finding_match()"
> > > > > >
> > > > > > You don't need to modify the classifier code to add a new field.
> > > > > >
> > > >
> >
> 
> 
> 
> -- 
> 
> Amrane Ait Zeouay
> 
> Engineer Student in The Development of Software and Systems
> 
> University of Western Brittany
> 
> Tel:  +33 7 62 25 56 03 <+33+7+62+25+56+03>



More information about the discuss mailing list