[ovs-dev] [PATCH ovn 0/2] Caching logical flow expr tree for each lflow

numans at ovn.org numans at ovn.org
Thu Jan 9 17:36:29 UTC 2020

From: Numan Siddique <numans at ovn.org>

This patch series tries to improve the time taken to proceess logical
flows by caching the expr tree. For large scale deployments with lots
of logical flows, the logical flow processing to OpenFlow rules
takes a lot of time as it is CPU intensive.

This patch series tries to improve this by caching the expr tree
generated for each logical flow so that we don't have to generate the
expr tree for each lflow_run().

Below are the details of the OVN resource in my setup
No of logical switches - 49
No of logical ports    - 1191
No of logical routers  - 7
No of logical ports    - 51
No of ACLs             - 1221
No of Logical flows    - 664736
On a chassis hosting 7 distributed router ports and around 1090
port bindings, the no of OVS rules was 921162.
Without this patch, the function add_logical_flows() took ~15 seconds.
And with this patch it took ~10 seconds. There is a good 34% improvement
in logical flow processing.

Numan Siddique (2):
  expr: Evaluate the condition expression in a separate step.
  ovn-controller: Cache logical flow expr tree for each lflow.

 controller/lflow.c          | 181 +++++++++++++++++++++++++++---------
 controller/lflow.h          |   9 +-
 controller/ovn-controller.c |  17 +++-
 include/ovn/expr.h          |  10 +-
 lib/expr.c                  |  55 ++++++++---
 tests/test-ovn.c            |  10 +-
 utilities/ovn-trace.c       |   5 +-
 7 files changed, 212 insertions(+), 75 deletions(-)


More information about the dev mailing list