We implement what OpenFlow says.

You can implement LPM in terms of an OpenFlow flow table by encoding
the "length" of the match in the priority.

On Mon, Mar 12, 2012 at 11:04:22PM +0100, [email protected] wrote:
> Thanks Ben. So my assumption was wrong that flow matching is similar
> to LPM. Any specific reason why its not implemented similar to LPM?
> 
> Thanks
> Ravi
> 
> -----Original Message-----
> From: Ben Pfaff [mailto:[email protected]] 
> Sent: Monday, March 12, 2012 2:55 PM
> To: Kerur, Ravi
> Cc: [email protected]
> Subject: Re: [ovs-dev] Q on flow matching
> 
> On Mon, Mar 12, 2012 at 10:28:15PM +0100, [email protected] wrote:
> > Hi,
> > 
> > I have programmed 2 vlan flows via
> > 
> > ovs-ofctl add-flow br0 
> > priority=65535,idle_timeout=50000,dl_vlan_pcp=2,actions=strip_vlan,1
> > 
> > ovs-ofctl add-flow br0 
> > priority=65535,idle_timeout=50000,dl_vlan=2,dl_vlan_pcp=2,actions=1
> > 
> > When I send vlan packets with vid=2 and vlan_pcp=2, I see packets
> > always match 1st flow and not 2nd flow. I thought flow matching is
> > similar to longest prefix match expect that flow matching looks for
> > more matching fields than bits and was expecting 2nd flow to be
> > matched. Only way I get to match 2nd flow is by decreasing the
> > priority of the 1st flow. Is this a bug or that's the way it is
> > supposed to work? Inputs appreciated.
> 
> If more than one flow matches at a given priority, the one that
> actually gets chosen is unpredictable.  In other words, you have to
> use priority to indicate what flows you prefer.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to