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

Rajahalme, Jarno (NSN - FI/Espoo) jarno.rajahalme at nsn.com
Tue Jun 18 16:52:20 UTC 2013


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 ;-)

> 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 :-)

  Jarno


More information about the dev mailing list