[ovs-dev] [PATCH v8 2/4] system-dpdk: split ovs_dpdk_start into db and daemon ops

Gowrishankar Muthukrishnan gmuthukr at redhat.com
Thu Jul 9 16:48:17 UTC 2020


OVS_DPDK_START could be split into two macros to start
ovsdb-server and ovs-vswitchd individually so that, user can
use ovs-vsctl to configure ovs tables for test requirements.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukr at redhat.com>
---
 tests/system-dpdk-macros.at | 17 ++++++++++++-----
 tests/system-dpdk.at        |  5 +++++
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at
index c6708ca..9e55f10 100644
--- a/tests/system-dpdk-macros.at
+++ b/tests/system-dpdk-macros.at
@@ -33,13 +33,11 @@ m4_define([OVS_DPDK_PRE_PHY_SKIP],
 ])
 
 
-# OVS_DPDK_START()
+# OVS_DB_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).
+# Create an empty database and start ovsdb-server.
 #
-m4_define([OVS_DPDK_START],
+m4_define([OVS_DB_START],
   [dnl Create database.
    AT_CHECK([touch .conf.db.~lock~])
    AT_CHECK([ovsdb-tool create conf.db $abs_top_srcdir/vswitchd/vswitch.ovsschema])
@@ -54,7 +52,16 @@ m4_define([OVS_DPDK_START],
 
    dnl Initialize database.
    AT_CHECK([ovs-vsctl --no-wait init])
+])
+
 
+# OVS_DPDK_START()
+#
+# Add special configuration dpdk-init to enable DPDK functionality.
+# Start ovs-vswitchd connected to that database using system devices (no dummies).
+#
+m4_define([OVS_DPDK_START],
+  [
    dnl Enable DPDK functionality
    AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true])
 
diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at
index 21424c2..ab10f44 100644
--- a/tests/system-dpdk.at
+++ b/tests/system-dpdk.at
@@ -8,6 +8,7 @@ dnl Check if EAL init is successful
 AT_SETUP([OVS-DPDK - EAL init])
 AT_KEYWORDS([dpdk])
 OVS_DPDK_PRE_CHECK()
+OVS_DB_START()
 OVS_DPDK_START()
 AT_CHECK([grep "DPDK Enabled - initializing..." ovs-vswitchd.log], [], [stdout])
 AT_CHECK([grep "EAL" ovs-vswitchd.log], [], [stdout])
@@ -28,6 +29,7 @@ AT_SETUP([OVS-DPDK - add standard DPDK port])
 AT_KEYWORDS([dpdk])
 
 OVS_DPDK_PRE_PHY_SKIP()
+OVS_DB_START()
 OVS_DPDK_START()
 
 dnl Add userspace bridge and attach it to OVS
@@ -55,6 +57,7 @@ dnl Add vhost-user-client port
 AT_SETUP([OVS-DPDK - add vhost-user-client port])
 AT_KEYWORDS([dpdk])
 OVS_DPDK_PRE_CHECK()
+OVS_DB_START()
 OVS_DPDK_START()
 
 dnl Add userspace bridge and attach it to OVS
@@ -89,6 +92,7 @@ AT_SETUP([OVS-DPDK - ping vhost-user ports])
 AT_KEYWORDS([dpdk])
 OVS_DPDK_PRE_CHECK()
 AT_SKIP_IF([! which testpmd >/dev/null 2>/dev/null])
+OVS_DB_START()
 OVS_DPDK_START()
 
 dnl Find number of sockets
@@ -167,6 +171,7 @@ AT_SETUP([OVS-DPDK - ping vhost-user-client ports])
 AT_KEYWORDS([dpdk])
 OVS_DPDK_PRE_CHECK()
 AT_SKIP_IF([! which testpmd >/dev/null 2>/dev/null])
+OVS_DB_START()
 OVS_DPDK_START()
 
 dnl Find number of sockets
-- 
1.8.3.1



More information about the dev mailing list