[ovs-dev] [PATCH ovn 1/2] northd: Port dummy-numa cli option from OVS

Fabrizio D'Angelo fdangelo at redhat.com
Tue Jun 15 22:33:19 UTC 2021


Signed-off-by: Fabrizio D'Angelo <fdangelo at redhat.com>
---
 northd/ovn-northd-ddlog.c | 9 ++++++++-
 northd/ovn-northd.c       | 7 +++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/northd/ovn-northd-ddlog.c b/northd/ovn-northd-ddlog.c
index 444e13e39..d81414ce7 100644
--- a/northd/ovn-northd-ddlog.c
+++ b/northd/ovn-northd-ddlog.c
@@ -29,6 +29,7 @@
 #include "memory.h"
 #include "openvswitch/hmap.h"
 #include "openvswitch/json.h"
+#include "openvswitch/ovs-numa.h"
 #include "openvswitch/poll-loop.h"
 #include "openvswitch/vlog.h"
 #include "ovsdb-cs.h"
@@ -1080,7 +1081,8 @@ parse_options(int argc OVS_UNUSED, char *argv[] OVS_UNUSED,
         VLOG_OPTION_ENUMS,
         SSL_OPTION_ENUMS,
         OPT_DRY_RUN,
-        OPT_DDLOG_RECORD
+        OPT_DDLOG_RECORD,
+        OPT_DUMMY_NUMA,
     };
     static const struct option long_options[] = {
         {"ovnsb-db", required_argument, NULL, 'd'},
@@ -1094,6 +1096,7 @@ parse_options(int argc OVS_UNUSED, char *argv[] OVS_UNUSED,
         OVN_DAEMON_LONG_OPTIONS,
         VLOG_LONG_OPTIONS,
         STREAM_SSL_LONG_OPTIONS,
+        {"dummy-numa", required_argument, NULL, OPT_DUMMY_NUMA},
         {NULL, 0, NULL, 0},
     };
     char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
@@ -1150,6 +1153,10 @@ parse_options(int argc OVS_UNUSED, char *argv[] OVS_UNUSED,
             *pause = true;
             break;
 
+        case OPT_DUMMY_NUMA:
+            ovs_numa_set_dummy(optarg);
+            break;
+
         case OPT_DDLOG_RECORD:
             record_file = optarg;
             break;
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index d872f6a3c..153d635c4 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -39,6 +39,7 @@
 #include "lib/ovn-util.h"
 #include "lib/lb.h"
 #include "memory.h"
+#include "ovs-numa.h"
 #include "lib/ovn-parallel-hmap.h"
 #include "ovn/actions.h"
 #include "ovn/features.h"
@@ -14008,6 +14009,7 @@ parse_options(int argc OVS_UNUSED, char *argv[] OVS_UNUSED,
         VLOG_OPTION_ENUMS,
         SSL_OPTION_ENUMS,
         OPT_DRY_RUN,
+        OPT_DUMMY_NUMA,
     };
     static const struct option long_options[] = {
         {"ovnsb-db", required_argument, NULL, 'd'},
@@ -14017,6 +14019,7 @@ parse_options(int argc OVS_UNUSED, char *argv[] OVS_UNUSED,
         {"options", no_argument, NULL, 'o'},
         {"version", no_argument, NULL, 'V'},
         {"dry-run", no_argument, NULL, OPT_DRY_RUN},
+        {"dummy-numa", required_argument, NULL, OPT_DUMMY_NUMA},
         OVN_DAEMON_LONG_OPTIONS,
         VLOG_LONG_OPTIONS,
         STREAM_SSL_LONG_OPTIONS,
@@ -14072,6 +14075,10 @@ parse_options(int argc OVS_UNUSED, char *argv[] OVS_UNUSED,
             ovn_print_version(0, 0);
             exit(EXIT_SUCCESS);
 
+        case OPT_DUMMY_NUMA:
+            ovs_numa_set_dummy(optarg);
+            break;
+
         case OPT_DRY_RUN:
             *paused = true;
             break;
-- 
2.31.1



More information about the dev mailing list