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.

Signed-off-by: Kevin Traynor <[email protected]>
---
 tests/system-dpdk-macros.at | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at
index ef0e84e93..d171a4508 100644
--- a/tests/system-dpdk-macros.at
+++ b/tests/system-dpdk-macros.at
@@ -36,9 +36,19 @@ 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~])
@@ -55,9 +65,12 @@ 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])
 
-- 
2.34.3

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to