[ovs-dev] [PATCH ovn v3 0/4] uuid-based conjunction id generation.

Han Zhou hzhou at ovn.org
Thu Nov 11 22:38:21 UTC 2021


It is important to keep conjunction IDs consistent between runs to avoid
unnecessary OVS flows deletion and reinstallation. However, There are two
problems of the current lflow-cache based conjunction id peristent approach.

1) When n_conjs changes, the cached conj_id_ofs can overlap with other lflows.
2) When lflow-cache is not enabled, conjunction id is not consistent across
runs.

This series replace the lflow-cache based approach by a new way of conjunction
id generation which keeps the ids consistent regardless of the lflow-cache
enablement.

v1 -> v2: adding the missing patch 1.
v2 -> v3: adding more tests, and minor changes for error logging and coverage
counters.

Han Zhou (4):
  lflow-cache.h: Fix comment about lflow-cache.
  lflow-cache: Remove conjunction id cache.
  test-utils: Add test_read_uint_hex_value helper.
  lflow: Consistent conjunction id generation.

 controller/automake.mk           |   2 +
 controller/lflow-cache.c         |  30 +--
 controller/lflow-cache.h         |  20 +-
 controller/lflow-conj-ids.c      | 259 +++++++++++++++++++++
 controller/lflow-conj-ids.h      |  41 ++++
 controller/lflow.c               | 154 ++++++-------
 controller/lflow.h               |   4 +-
 controller/ovn-controller.c      |  32 +--
 controller/test-lflow-cache.c    |  44 ++--
 controller/test-lflow-conj-ids.c | 128 +++++++++++
 tests/automake.mk                |   3 +
 tests/ovn-lflow-cache.at         | 383 +++++++++++--------------------
 tests/ovn-lflow-conj-ids.at      | 112 +++++++++
 tests/ovn.at                     | 271 ++++++++--------------
 tests/test-utils.c               |  22 +-
 tests/test-utils.h               |   2 +
 tests/testsuite.at               |   1 +
 17 files changed, 909 insertions(+), 599 deletions(-)
 create mode 100644 controller/lflow-conj-ids.c
 create mode 100644 controller/lflow-conj-ids.h
 create mode 100644 controller/test-lflow-conj-ids.c
 create mode 100644 tests/ovn-lflow-conj-ids.at

-- 
2.30.2



More information about the dev mailing list