[ovs-dev] [RFC PATCH 2/2] ofproto: Index flows by cookie.

Ben Pfaff blp at nicira.com
Tue Jun 18 16:58:12 UTC 2013


On Tue, Jun 18, 2013 at 04:52:20PM +0000, Rajahalme, Jarno (NSN - FI/Espoo) wrote:
> 
> On Jun 18, 2013, at 0:18 , ext Ben Pfaff wrote:
> 
> > On Mon, Jun 17, 2013 at 11:45:49AM +0000, Rajahalme, Jarno (NSN - FI/Espoo) wrote:
> >> On Jun 17, 2013, at 3:55 , Jarno Rajahalme wrote:
> >> 
> >>> The simplest way for an OpenFlow controller to refer to a (set of) flows
> >>> is by a controller-issued flow cookie.  Make this fast by inserting
> >>> flows with non-zero cookies to a hmap, and use that when flows are
> >>> queried with a full cookie mask.
> >>> 
> >> 
> >> Here are some measurements on this, using a flow table with
> >> 138260 different flow like below, each flow with a different IP prefix,
> >> a priority corresponding to the prefix length, and a unique cookie:
> > 
> > The measurements are pretty awesome, but I don't like abusing an hmap
> > to store data that might have duplicates (the fact that you had to
> > exclude elements with a zero cookie value shows that you likely
> > thought about this too).
> 
> I did not even stop to think about possibly abusing the hmap, sorry ;-)

I've wanted a multimap structure for a long time now, and your patch
gave me an excuse to design and build one, so I'm happy ;-)

> > So I built another data structure that doesn't have this problem.
> > Will you review it?
> >        http://openvswitch.org/pipermail/dev/2013-June/028556.html
> 
> I changed to use the new hindex instead, and run the measurements on
> full-masked cookies again. Unsurprisingly the results were the same :-)

I'm not surprised either, but it gives some confidence that the hindex
code is correct.

Are you happy with the hindex patch?



More information about the dev mailing list