ofproto-dpif: Call dpif_poll_threads_set() before dpif_run().
authorDaniele Di Proietto <diproiettod@vmware.com>
Tue, 23 Feb 2016 19:36:10 +0000 (11:36 -0800)
committerDaniele Di Proietto <diproiettod@vmware.com>
Mon, 23 May 2016 17:27:42 +0000 (10:27 -0700)
An upcoming commit will make dpif_poll_threads_set() record the
requested configuration and dpif_run() apply it, so it makes sense to
change the order.

Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Tested-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
ofproto/ofproto-dpif.c

index 63d9c8d..df4a632 100644 (file)
@@ -503,6 +503,8 @@ type_run(const char *type)
         return 0;
     }
 
+    /* This must be called before dpif_run() */
+    dpif_poll_threads_set(backer->dpif, pmd_cpu_mask);
 
     if (dpif_run(backer->dpif)) {
         backer->need_revalidate = REV_RECONFIGURE;
@@ -531,8 +533,6 @@ type_run(const char *type)
         udpif_set_threads(backer->udpif, n_handlers, n_revalidators);
     }
 
-    dpif_poll_threads_set(backer->dpif, pmd_cpu_mask);
-
     if (backer->need_revalidate) {
         struct ofproto_dpif *ofproto;
         struct simap_node *node;