dpdk: postpone updating runtime data

This prevents crash due to worker tread accessing device data
while device vector is growing.

Type: fix
Change-Id: I5cf9f53ddbe97fe52db8fd431ea7c0e480f3d4bc
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index da7a123..a515bca 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -552,7 +552,6 @@
 	      vnm, xd->hw_if_index, q, VNET_HW_IF_RXQ_THREAD_ANY);
 	  }
 
-      vnet_hw_if_update_runtime_data (vnm, xd->hw_if_index);
 
       /*Get vnet hardware interface */
       hi = vnet_get_hw_interface (vnm, xd->hw_if_index);
@@ -597,6 +596,9 @@
 		      format_dpdk_device_errors, xd);
     }
 
+  for (int i = 0; i < vec_len (dm->devices); i++)
+    vnet_hw_if_update_runtime_data (vnm, dm->devices[i].hw_if_index);
+
   return 0;
 }