diff mbox series

[ovs-dev,v14,3/3] ovn-northd: Add configuration option for parallel lflow build

Message ID 20210212144952.27215-3-anton.ivanov@cambridgegreys.com
State New
Headers show
Series [ovs-dev,v14,1/3] ovn-libs: Add support for parallel processing | expand

Commit Message

Anton Ivanov Feb. 12, 2021, 2:49 p.m. UTC
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
---
 northd/ovn-northd.c |  3 +++
 ovn-nb.xml          | 13 +++++++++++++
 2 files changed, 16 insertions(+)
diff mbox series

Patch

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index c8cdc4861..e95cfa556 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -12850,6 +12850,9 @@  ovnnb_db_run(struct northd_context *ctx,
     northd_probe_interval_nb = get_probe_interval(ovnnb_db, nb);
     northd_probe_interval_sb = get_probe_interval(ovnsb_db, nb);
 
+    use_parallel_build = smap_get_bool(&nb->options,
+                                          "use_parallel_build", false) &&
+                          ovn_can_parallelize_hashes(false);
     use_logical_dp_groups = smap_get_bool(&nb->options,
                                           "use_logical_dp_groups", false);
     /* deprecated, use --event instead */
diff --git a/ovn-nb.xml b/ovn-nb.xml
index a94918bb6..fd8f9c096 100644
--- a/ovn-nb.xml
+++ b/ovn-nb.xml
@@ -213,6 +213,19 @@ 
           The default value is <code>false</code>.
         </p>
       </column>
+      <column name="options" key="use_parallel_build">
+        <p>
+          If set to <code>true</code>, <code>ovn-northd</code> will attempt
+          to compute logical flows in parallel.
+        </p>
+        <p>
+          Parallel computation is enabled only if the system has 4 or more
+          cores/threads available to be used by ovn-northd.
+        </p>
+        <p>
+          The default value is <code>false</code>.
+        </p>
+      </column>
 
       <column name="options" key="ignore_lsp_down">
         <p>