ovn-controller: Only process lflows for local datapaths.
authorRussell Bryant <russell@ovn.org>
Wed, 20 Jan 2016 18:29:25 +0000 (13:29 -0500)
committerRussell Bryant <russell@ovn.org>
Wed, 3 Feb 2016 15:26:46 +0000 (10:26 -0500)
commitb1e04512f7150aa9d98a121b32f820c316522372
treeff66a9a3f8c52f1b786e13a8c7c8789e03de895e
parent993225bd48296e79b95c5ea0237ee307ebd20a0c
ovn-controller: Only process lflows for local datapaths.

Previously, ovn-controller translated logical flows into OpenFlow flows
for *every* logical datapath.  This patch makes it so we skip doing so
for the egress pipeline if the datapath is a logical switch with no
logical ports bound locally.  In that case, the flows have no effect.

This was the code path taking the most time in a large scale OVN
environment and was an easy optimization to make based on the existing
local_datapaths info.

In this environment, while idling, ovn-controller was taking up about
20% CPU with this patch, while other nodes were in the 40-70% range.

Reported-at: https://bugs.launchpad.net/networking-ovn/+bug/1536003
Signed-off-by: Russell Bryant <russell@ovn.org>
Tested-by: Matt Mulsow <mamulsow@us.ibm.com>
Acked-by: Ben Pfaff <blp@ovn.org>
Acked-By: Kyle Mestery <mestery@mestery.com>
ovn/controller/lflow.c
ovn/controller/lflow.h
ovn/controller/ovn-controller.c