[ovs-dev] flows in Flow Table?

Ben Pfaff blp at nicira.com
Fri Sep 9 14:19:40 UTC 2011


No.

A new OpenFlow flow goes into the classifier.

A packet with field values not yet seen goes into the datapath flow
table (e.g. dp_netdev or dpif-linux).

On Fri, Sep 09, 2011 at 10:04:46AM +0500, Bibrak Qamar wrote:
> So that means when a new flow comes its written in both classifier and
> netdev?
> 
> Thanks for the help!
> Bibrak
> 
> On Thu, Sep 8, 2011 at 7:55 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > The tables have different purposes.  A flow in the classifier is an
> > OpenFlow flow that may contain wildcards.  A flow in the datapath
> > (e.g. dp_netdev) is always exact-match (to allow hashing).
> >
> > On Thu, Sep 08, 2011 at 07:13:24PM +0500, Bibrak Qamar wrote:
> > > But when dpif-netdev is used does it store flows in both of the tables? I
> > > mean why are we maintaining two tables?
> > >
> > >
> > >
> > > struct classifier {
> > >     int n_rules;                /* Total number of rules. */
> > >     struct hmap tables;         */* Contains "struct cls_table"s.  */*
> > > };
> > >
> > > struct dp_netdev {
> > > ..
> > > ..
> > >  struct hmap flow_table;   *  /* Flow table. */*
> > > ..
> > > }
> > >
> > > When a new flow (packet) is received does it look_up in classifier's
> > table
> > > or  netdev's flow_table for match?
> > >
> > > Thanks for your help
> > > Bibrak
> > >
> > > On Thu, Sep 8, 2011 at 7:04 PM, Ben Pfaff <blp at nicira.com> wrote:
> > >
> > > > On Thu, Sep 08, 2011 at 06:10:45PM +0500, Bibrak Qamar wrote:
> > > > > Ok now I have got some idea. In the classifier there is a data
> > structure
> > > > > which stores the rules, i.e
> > > > >
> > > > > struct classifier {
> > > > >     int n_rules;                /* Total number of rules. */
> > > > >     struct hmap tables;         /* Contains "struct cls_table"s.  */
> > > > > };
> > > > >
> > > > > And in the netdev there is also a data structure which stores the
> > flows,
> > > > i.e
> > > > >
> > > > >
> > > > >
> > > > > dp_netdev_lookup_flow
> > > >
> > > > That's the userspace implementation of the datapath.  If you're using
> > > > the Linux kernel module, nothing in dpif-netdev.c is used; the code in
> > > > dpif-linux.c is used instead.
> > > >
> >



More information about the dev mailing list