[ovs-dev] [RFC 2/2] datapath: Cache netlink flow key, mask on flow_put.

Flavio Leitner fbl at redhat.com
Thu Jul 10 16:53:24 UTC 2014


On Thu, Jul 10, 2014 at 11:13:33AM +0200, Thomas Graf wrote:
> On 07/10/14 at 05:29pm, Joe Stringer wrote:
> > Converting the flow key and mask back into netlink format during flow
> > dump is fairly expensive. By caching the netlink versions of these
> > during flow setup, and copying the memory directly during flow dump, we
> > are able to support up to 33% more flows in the datapath. Flow setup
> > rate decreases by around 10%.
> 
> First of all, I love this idea a lot. We could make use of it in
> various other non-OVS Netlink users as well where the objects are largely
> static.
> 
> If I understand the code correctly the gain is only visible on
> consecutive dumps of the same flow. How about constructing the cache
> when you require it for the first time? That avoids the cost on flow
> setup.

Can we push the cache construction to later that it doesn't impact
either flow setup or flow dump? I.e. like a workqueue? I don't know
if we have such facility.

fbl




More information about the dev mailing list