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>