diff mbox series

[ovs-dev,v5,2/3] system-dpdk: Split ovsdb creation and vswitchd start.

Message ID 20220624101325.1792748-3-ktraynor@redhat.com
State Accepted
Commit 55ba0e81dccfc4ed1a1ee160c1a2a04abc841491
Headers show
Series DPDK shared mempool config. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Kevin Traynor June 24, 2022, 10:13 a.m. UTC
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 <ktraynor@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 tests/system-dpdk-macros.at | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

Comments

Pai G, Sunil July 8, 2022, 2:10 p.m. UTC | #1
Hi Kevin, 

Thanks for the patch, changes LGTM, 

> -----Original Message-----
> From: dev <ovs-dev-bounces@openvswitch.org> On Behalf Of Kevin Traynor
> Sent: Friday, June 24, 2022 3:43 PM
> To: dev@openvswitch.org
> Cc: david.marchand@redhat.com
> Subject: [ovs-dev] [PATCH v5 2/3] 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.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> Reviewed-by: David Marchand <david.marchand@redhat.com>
> ---
>  tests/system-dpdk-macros.at | 27 ++++++++++++++++++++-------
>  1 file changed, 20 insertions(+), 7 deletions(-)
> 

Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
diff mbox series

Patch

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])