system-dpdk: Split ovsdb creation and vswitchd start.
Splitting them allows them to be reused separately. This
is useful for setting some things in ovsdb before vswitchd is
started or DPDK is initialized.
Acked-by: Sunil Pai G
@@ -35,11 +35,21 @@ m4_define([OVS_DPDK_PRE_PHY_SKIP],
# OVS_DPDK_START()
#
-# Create an empty database and start ovsdb-server. Add special configuration
-# dpdk-init to enable DPDK functionality. Start ovs-vswitchd connected to that
-# database using system devices (no dummies).
+# Start ovsdb-server. Set dpdk-init to initialize DPDK. Start ovs-vswitchd.
#
m4_define([OVS_DPDK_START],
+ [dnl start ovs dpdk
+ OVS_DPDK_START_OVSDB()
+ dnl Enable DPDK functionality
+ AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true])
+ OVS_DPDK_START_VSWITCHD()
+])
+
+# OVS_DPDK_START_OVSDB()
+#
+# Create an empty database and start ovsdb-server.
+#
+m4_define([OVS_DPDK_START_OVSDB],
[dnl Create database.
AT_CHECK([touch .conf.db.~lock~])
AT_CHECK([ovsdb-tool create conf.db $abs_top_srcdir/vswitchd/vswitch.ovsschema])
@@ -54,11 +64,14 @@ m4_define([OVS_DPDK_START],
dnl Initialize database.
AT_CHECK([ovs-vsctl --no-wait init])
+])
- dnl Enable DPDK functionality
- AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true])
-
- dnl Change DPDK drivers log levels so that tests only catch errors
+# OVS_DPDK_START_VSWITCHD()
+#
+# Add special configuration for dpdk-init. Start ovs-vswitchd.
+#
+m4_define([OVS_DPDK_START_VSWITCHD],
+ [dnl Change DPDK drivers log levels so that tests only catch errors
AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-extra=--log-level=pmd.*:error])
dnl Start ovs-vswitchd.
