[ovs-dev] [PATCH 1/3] dpdk: postpone dpdk_init

hanxueluo at 126.com hanxueluo at 126.com
Sun Feb 19 10:41:25 UTC 2017


From: Huanle Han <hanxueluo at gmail.com>

Currently, dpdk_init takes a long time and system datapath keeps
disconnecting during dpdk_init on ovs restart. Put bridge_reconfigure()
in front of dpdk_init() so that system datapath works immediately,
and dpdk datapath works on next iteration of bridge_run()

Signed-off-by: Huanle Han <hanxueluo at gmail.com>
---
 vswitchd/bridge.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 2e10013..7db3d67 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2937,10 +2937,6 @@ bridge_run(void)
     }
     cfg = ovsrec_open_vswitch_first(idl);
 
-    if (cfg) {
-        dpdk_init(&cfg->other_config);
-    }
-
     /* Initialize the ofproto library.  This only needs to run once, but
      * it must be done after the configuration is set.  If the
      * initialization has already occurred, bridge_init_ofproto()
@@ -2997,6 +2993,10 @@ bridge_run(void)
         }
     }
 
+    if (cfg) {
+        dpdk_init(&cfg->other_config);
+    }
+
     if (daemonize_txn) {
         enum ovsdb_idl_txn_status status = ovsdb_idl_txn_commit(daemonize_txn);
         if (status != TXN_INCOMPLETE) {
-- 
2.7.4




More information about the dev mailing list