[ovs-git] [openvswitch/ovs] 12d8c6: ovn-controller: Incremental processing engine

Han Zhou noreply at github.com
Fri May 24 19:48:55 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 12d8c6a935f06d4d3f1f359ff60c952d6b7939f3
      https://github.com/openvswitch/ovs/commit/12d8c6a935f06d4d3f1f359ff60c952d6b7939f3
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/lib/automake.mk
    A ovn/lib/inc-proc-eng.c
    A ovn/lib/inc-proc-eng.h

  Log Message:
  -----------
  ovn-controller: Incremental processing engine

This patch implements the engine which will be used in future patches
for ovn-controller incremental processing.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 6b179607c8ce4dcfb56e36a0738f791d2933253b
      https://github.com/openvswitch/ovs/commit/6b179607c8ce4dcfb56e36a0738f791d2933253b
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/bfd.c
    M ovn/controller/binding.c
    M ovn/controller/encaps.c
    M ovn/controller/ovn-controller.c
    M ovn/controller/physical.c

  Log Message:
  -----------
  ovn-controller: Track OVSDB changes

Track OVSDB changes for future patches of incremental processing

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 0bd4d85c36efe7bee16569821f9f15b8570f5b3c
      https://github.com/openvswitch/ovs/commit/0bd4d85c36efe7bee16569821f9f15b8570f5b3c
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M include/ovn/actions.h
    M ovn/controller/binding.c
    M ovn/controller/lflow.c
    M ovn/controller/lflow.h
    M ovn/controller/ofctrl.c
    M ovn/controller/ofctrl.h
    M ovn/controller/ovn-controller.c
    M ovn/controller/physical.c
    M ovn/controller/physical.h
    M ovn/lib/actions.c
    M ovn/lib/extend-table.c
    M ovn/lib/extend-table.h

  Log Message:
  -----------
  ovn-controller: Initial use of incremental engine - quiet mode.

Incremental proccessing engine is used to compute flows. In this
patch we create below engine nodes:
    - Engine nodes for each OVSDB table in local OVS DB and SB DB.
    - runtime_data: compute and maintain intermediate result such
                    as local_datapath, etc.
    - mff_ovn_geneve: MFF_* field ID for our Geneve option, which
                      is provided by switch.
    - flow_output: compute and maintain computed flow table.

In this patch the ovn flow table is persistent across main loop
iterations, and a new index of SB uuid is maintained for the
desired flow table, which will be useful for next patches for
incremental processing.

This patch doesn't do any incremental processing yet, but it achieves
the "quiet mode": the flow computation won't be triggered by unrelated
events, such as pinctrl/ofctrl messages. The flow computation
(full compute) happens only when any of its related inputs are
changed.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: e0b9e339068c02b275631a6c4711ee3c6a918fbf
      https://github.com/openvswitch/ovs/commit/e0b9e339068c02b275631a6c4711ee3c6a918fbf
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/lflow.c
    M ovn/controller/lflow.h
    M ovn/controller/ovn-controller.c

  Log Message:
  -----------
  ovn-controller: Incremental logical flow processing

Implements change handler of flow_output for SB lflow changes.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 9d0b504abdeec1e0ccfe06371881303346d969d4
      https://github.com/openvswitch/ovs/commit/9d0b504abdeec1e0ccfe06371881303346d969d4
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/binding.c
    M ovn/controller/binding.h
    M ovn/controller/ovn-controller.c

  Log Message:
  -----------
  ovn-controller: runtime_data change handler for SB port-binding

Evaluates change for SB port-binding in runtime_data node.
If the port-binding change has no impact for the runtime_data it will
not trigger runtime_data change.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: e35a136d8df8c4bf7d3035287421649e280c6838
      https://github.com/openvswitch/ovs/commit/e35a136d8df8c4bf7d3035287421649e280c6838
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/ovn-controller.c
    M ovn/controller/physical.c
    M ovn/controller/physical.h

  Log Message:
  -----------
  ovn-controller: port-binding incremental processing for physical flows

This patch implements change handler for port-binding in flow_output
for physical flows computing, so that physical flow computing will
be incremental.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: c4af630718309f253ce7c809d85965bc8d00cb1d
      https://github.com/openvswitch/ovs/commit/c4af630718309f253ce7c809d85965bc8d00cb1d
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/ovn-controller.c
    M ovn/controller/physical.c
    M ovn/controller/physical.h

  Log Message:
  -----------
  ovn-controller: incremental processing for multicast group changes

This patch handles SB Multicast_Group table changes incrementally.
The Multicast_Group table changes can be triggered by creating/deleting
a lport of a lswitch. It can be also triggered indirectly by an
updating of a port-binding which is referenced by the multicast
group.

This patch together with previous incremental processing engine
related changes supports incremental processing for lflow changes
and port-binding changes of lports on other HVs, which are the most
common scenarios in a cloud where workloads come up and down.

In ovn-scale-test env [1], the total execution time of creating and
binding 10k ports on 1k HVs with 40 lswitches and 8 lrouters
(5 lswitches/lrouter), decreased from 3h40m to 1h50m because of the
less CPU on HVs. The CPU time of ovn-controller for additional 500
lports creating and binding (on top of already existed 10k lports)
decreased 90% comparing with master.

Latency for end-to-end operations of one extra port on top of the
10k lports, start from port-creation until all flows installation
on all related HVs is also improved significantly:

before: 20.6s in total
- lsp-add: 0.4s
- wait-until port up=true: 4.8s
- --wait=hv sync: 15.4s

after: 7.3s in total
- lsp-add: 0.4s
- wait-until port up=true: 4.0s
- --wait=hv sync: 2.9s

[1] https://github.com/openvswitch/ovn-scale-test

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 72aeb243a52a08e3888ef445083668a3305caa27
      https://github.com/openvswitch/ovs/commit/72aeb243a52a08e3888ef445083668a3305caa27
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M lib/ovsdb-idl-provider.h
    M lib/ovsdb-idl.c

  Log Message:
  -----------
  ovsdb-idl: Tracking - preserve data for deleted rows.

OVSDB IDL can track changes, but for deleted rows, the data is
destroyed and only uuid is tracked. In some cases we need to
check the data of the deleted rows. This patch preserves data
for deleted rows until track clear is called.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 2782e59d298bcf1680c7f37f09de4d385b527bc3
      https://github.com/openvswitch/ovs/commit/2782e59d298bcf1680c7f37f09de4d385b527bc3
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/ovn-controller.c

  Log Message:
  -----------
  ovn-controller: Split addr_sets from runtime_data.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 43e6900a79915be1c88f45281e6eca862814a7db
      https://github.com/openvswitch/ovs/commit/43e6900a79915be1c88f45281e6eca862814a7db
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M include/ovn/expr.h
    M ovn/controller/lflow.c
    M ovn/controller/lflow.h
    M ovn/controller/ovn-controller.c
    M ovn/lib/actions.c
    M ovn/lib/expr.c
    M ovn/utilities/ovn-trace.c
    M tests/test-ovn.c

  Log Message:
  -----------
  ovn-controller: Maintain resource references for logical flows.

This patch maintains the cross reference between logical flows and
the resources such as address sets and port groups that are used by
logical flows. This data will be needed in address set and port
group incremental processing.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 37c951b2593523376006e26a97928589a75f4861
      https://github.com/openvswitch/ovs/commit/37c951b2593523376006e26a97928589a75f4861
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/lflow.c
    M ovn/controller/lflow.h
    M ovn/controller/ovn-controller.c
    M tests/ovn.at

  Log Message:
  -----------
  ovn-controller: Incremental processing for address-set changes.

When the content of an address set changes, ovn-controller will
not recompute all flows but only the ones related to the changed
address-set. The performance test result is discussed at [1].

[1] https://mail.openvswitch.org/pipermail/ovs-discuss/2018-June/046880.html

Tested-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: adb2c5c92aaac2a58cbaab01d98dd0acabb2b529
      https://github.com/openvswitch/ovs/commit/adb2c5c92aaac2a58cbaab01d98dd0acabb2b529
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/ovn-controller.c

  Log Message:
  -----------
  ovn-controller: Split port_groups from runtime_data.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: c62ec1e23b74e714f24b2bb31ffa984a2a62f3a2
      https://github.com/openvswitch/ovs/commit/c62ec1e23b74e714f24b2bb31ffa984a2a62f3a2
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/lflow.h
    M ovn/controller/ovn-controller.c

  Log Message:
  -----------
  ovn-controller: Incremental processing for port-group changes.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 927992ce4e40482b243be549beadcc3442be49fb
      https://github.com/openvswitch/ovs/commit/927992ce4e40482b243be549beadcc3442be49fb
  Author: Jakub Sitnicki <jkbs at redhat.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M lib/coverage-unixctl.man
    M lib/coverage.c

  Log Message:
  -----------
  coverage: Add command for reading counter value.

From: Jakub Sitnicki <jkbs at redhat.com>

Facilitate checking coverage counters from scripts and tests with a new
coverage/read-counter command that gets the total count for a counter.

Same could be achieved by scraping the output of coverage/show command
but the difficulties there are that output is in human readable format
and zero-value counters are not listed.

Signed-off-by: Jakub Sitnicki <jkbs at redhat.com>
Acked-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: a13373e40ff28e2ff337f3f34dabfb7802ed82a7
      https://github.com/openvswitch/ovs/commit/a13373e40ff28e2ff337f3f34dabfb7802ed82a7
  Author: Jakub Sitnicki <jkbs at redhat.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M tests/automake.mk
    A tests/ovn-performance.at
    M tests/testsuite.at

  Log Message:
  -----------
  ovn: Test for full logical flow processing in ovn-controller.

From: Jakub Sitnicki <jkbs at redhat.com>

Add a test that performs typical operations of creating & destroying
logical routers, switches, ports, address sets and ACLs while checking
if they trigger full logical flow processing in the ovn-controller.
This way confirm that incremental processing is taking effect when we
expect it to.

Place the new test in a separate module - tests/ovn-performance.at,
instead of the usual tests/ovn.at as it doesn't test OVN's functionality
but rather a performance aspect of ovn-controller.

Signed-off-by: Jakub Sitnicki <jkbs at redhat.com>
Acked-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 3084a1c761c6f7698b4fb32ed512b5f97bfebdb2
      https://github.com/openvswitch/ovs/commit/3084a1c761c6f7698b4fb32ed512b5f97bfebdb2
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M tests/ovn-performance.at

  Log Message:
  -----------
  ovn-performance.at: Test port group incremental processing.

Add tests to make sure port group change doesn't trigger recomputing.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 27ca0f7883fafac260bebe2ab9a932bf3167f3f6
      https://github.com/openvswitch/ovs/commit/27ca0f7883fafac260bebe2ab9a932bf3167f3f6
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-05-24 (Fri, 24 May 2019)

  Changed paths:
    M ovn/controller/lflow.c
    M ovn/controller/lflow.h
    M ovn/controller/ovn-controller.c

  Log Message:
  -----------
  ovn-controller: mac_binding incremental processing.

Even if mac_binding is not used for workload provisioning, the
mac_binding table update will happen for gateway external ARP
processing. This patch ensures ARP events on gateway nodes causing
mac-binding changes do not trigger full recomputing on all chassises.

Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/ffbe41dbcb48...27ca0f7883fa


More information about the git mailing list