diff mbox series

[ovs-dev,v1,13/14] dpdk-tests: Accept other configs in OVS_DPDK_START

Message ID 1530200511-77186-14-git-send-email-tiago.lam@intel.com
State Superseded
Delegated to: Ian Stokes
Headers show
Series Support multi-segment mbufs | expand

Commit Message

Lam, Tiago June 28, 2018, 3:41 p.m. UTC
As it stands, OVS_DPDK_START() won't allow other configs to be set
before starting the ovs-vswitchd daemon. This is a problem since some
configs, such as the "dpdk-multi-seg-mbufs=true" for enabling the
multi-segment mbufs, need to be set prior to start OvS.

To support other options, OVS_DPDK_START() has been modified to accept
extra configs in the form "$config_name=$config_value". It then uses
ovs-vsctl to set the configs.

Signed-off-by: Tiago Lam <tiago.lam@intel.com>
---
 tests/system-dpdk-macros.at | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Eelco Chaudron July 3, 2018, 1:11 p.m. UTC | #1
On 28 Jun 2018, at 17:41, Tiago Lam wrote:

> As it stands, OVS_DPDK_START() won't allow other configs to be set
> before starting the ovs-vswitchd daemon. This is a problem since some
> configs, such as the "dpdk-multi-seg-mbufs=true" for enabling the
> multi-segment mbufs, need to be set prior to start OvS.
>
> To support other options, OVS_DPDK_START() has been modified to accept
> extra configs in the form "$config_name=$config_value". It then uses
> ovs-vsctl to set the configs.
>
> Signed-off-by: Tiago Lam <tiago.lam@intel.com>
>

LGTM,

Acked-by: Eelco Chaudron <echaudro@redhat.com>

<SNIP>
diff mbox series

Patch

diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at
index 0762ee0..485a0f3 100644
--- a/tests/system-dpdk-macros.at
+++ b/tests/system-dpdk-macros.at
@@ -21,7 +21,7 @@  m4_define([OVS_DPDK_PRE_CHECK],
 ])
 
 
-# OVS_DPDK_START()
+# OVS_DPDK_START([other-conf-args])
 #
 # Create an empty database and start ovsdb-server. Add special configuration
 # dpdk-init to enable DPDK functionality. Start ovs-vswitchd connected to that
@@ -48,6 +48,11 @@  m4_define([OVS_DPDK_START],
    AT_CHECK([lscpu], [], [stdout])
    AT_CHECK([cat stdout | grep "NUMA node(s)" | awk '{c=1; while (c++<$(3)) {printf "1024,"}; print "1024"}' > SOCKET_MEM])
    AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="$(cat SOCKET_MEM)"])
+   dnl Iterate through $other-conf-args list and include them
+   m4_foreach_w(opt, $1, [
+       AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:opt])
+   ])
+   dnl m4_if([$1], [], [], [AT_CHECK(["$1"])])
 
    dnl Start ovs-vswitchd.
    AT_CHECK([ovs-vswitchd --detach --no-chdir --pidfile --log-file -vvconn -vofproto_dpif -vunixctl], [0], [stdout], [stderr])