summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/integration/01_testcases.conf139
-rwxr-xr-xdocs/userguide/testusage.rst12
-rw-r--r--vnfs/qemu/qemu.py39
-rw-r--r--vnfs/qemu/qemu_dpdk_vhost_user.py5
-rw-r--r--vswitches/ovs_dpdk_vhost.py6
5 files changed, 198 insertions, 3 deletions
diff --git a/conf/integration/01_testcases.conf b/conf/integration/01_testcases.conf
index 084323b2..7b2f7079 100644
--- a/conf/integration/01_testcases.conf
+++ b/conf/integration/01_testcases.conf
@@ -128,6 +128,48 @@ STEP_VSWITCH_PVVP_FLOWS_FINIT = [
['vswitch', 'del_flow', 'int_br0', {'in_port': '#STEP[3][1]'}],
] + STEP_VSWITCH_PVVP_FINIT
+STEP_VSWITCH_P4VP_INIT = STEP_VSWITCH_PVVP_INIT + [
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 7 vm3 ports
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 8
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 9 vm4 ports
+ ['vswitch', 'add_vport', 'int_br0'], # STEP 10
+]
+
+STEP_VSWITCH_P4VP_FINIT = [
+ ['vswitch', 'del_port', 'int_br0', '#STEP[7][0]'], # vm3 ports
+ ['vswitch', 'del_port', 'int_br0', '#STEP[8][0]'],
+ ['vswitch', 'del_port', 'int_br0', '#STEP[9][0]'], # vm4 ports
+ ['vswitch', 'del_port', 'int_br0', '#STEP[10][0]'],
+] + STEP_VSWITCH_PVVP_FINIT
+
+STEP_VSWITCH_P4VP_FLOWS_INIT = STEP_VSWITCH_P4VP_INIT + [
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[1][1]', \
+ 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[4][1]', \
+ 'actions': ['output:#STEP[5][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[6][1]', \
+ 'actions': ['output:#STEP[7][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[8][1]', \
+ 'actions': ['output:#STEP[9][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[10][1]', \
+ 'actions': ['output:#STEP[2][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', \
+ 'actions': ['output:#STEP[10][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[9][1]', \
+ 'actions': ['output:#STEP[8][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[7][1]', \
+ 'actions': ['output:#STEP[6][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[5][1]', \
+ 'actions': ['output:#STEP[4][1]'], 'idle_timeout': '0'}],
+ ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[3][1]', \
+ 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}],
+]
+
+STEP_VSWITCH_P4VP_FLOWS_FINIT = [
+ ['vswitch', 'dump_flows', 'int_br0'],
+ ['vswitch', 'del_flow', 'int_br0'],
+] + STEP_VSWITCH_P4VP_FINIT
+
STEP_VSWITCH_2PHY_2VM_INIT = STEP_VSWITCH_PVVP_INIT
STEP_VSWITCH_2PHY_2VM_FINIT = STEP_VSWITCH_PVVP_FINIT
@@ -576,6 +618,103 @@ INTEGRATION_TESTS = [
STEP_VSWITCH_PVVP_FLOWS_FINIT
},
{
+ "Name": "vswitch_p4vp",
+ "Description": "Just configure 4 chained vnfs",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
+ "Name": "vswitch_p4vp_tput",
+ "Description": "4 chained vnfs, execute RFC2544 throughput test",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', \
+ 'bidir' : 'True'}],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
+ "Name": "vswitch_p4vp_back2back",
+ "Description": "4 chained vnfs, execute RFC2544 back2back test",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', \
+ 'bidir' : 'True'}],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
+ "Name": "vswitch_p4vp_cont",
+ "Description": "4 chained vnfs, execute continuous stream test",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
+ 'bidir' : 'True'}],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
+ "Name": "vswitch_p4vp_all",
+ "Description": "4 chained vnfs, execute RFC2544 throughput test",
+ "Deployment": "clean",
+ "TestSteps": STEP_VSWITCH_P4VP_FLOWS_INIT +
+ [
+ ['vnf1', 'start'],
+ ['vnf2', 'start'],
+ ['vnf3', 'start'],
+ ['vnf4', 'start'],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'throughput', \
+ 'bidir' : 'True'}],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'back2back', \
+ 'bidir' : 'True'}],
+ ['trafficgen', 'send_traffic', {'traffic_type' : 'continuous', \
+ 'bidir' : 'True'}],
+ ['vnf1', 'stop'],
+ ['vnf2', 'stop'],
+ ['vnf3', 'stop'],
+ ['vnf4', 'stop'],
+ ] +
+ STEP_VSWITCH_P4VP_FLOWS_FINIT
+ },
+ {
# Topology: 2 Parallel PVP connections
# To run a Linux bridge as a loopback in the Guest use:
# --test-params "guest_loopback=linux_bridge" --integration 2pvp_udp_dest_flows
diff --git a/docs/userguide/testusage.rst b/docs/userguide/testusage.rst
index 3c5cc4d4..9648569f 100755
--- a/docs/userguide/testusage.rst
+++ b/docs/userguide/testusage.rst
@@ -518,6 +518,18 @@ environment.
on the same numa as the NIC in use if possible/applicable. Testpmd should be
assigned at least (nb_cores +1) total cores with the cpu mask.
+The following CLI parameters override the corresponding configuration settings:
+ 1. guest_nic_queues, which overrides all GUEST_NIC_QUEUES values
+ 2. guest_testpmd_txq, which overrides all GUEST_TESTPMD_TXQ
+ 3. guest_testpmd_rxq, which overrides all GUEST_TESTPMD_RXQ
+ 4. guest_testpmd_nb_cores, which overrides all GUEST_TESTPMD_NB_CORES
+ values
+ 5. guest_testpmd_cpu_mask, which overrides all GUEST_TESTPMD_CPU_MASK
+ values
+ 6. vswitch_dpdk_multi_queues, which overrides VSWITCH_DPDK_MULTI_QUEUES
+ 7. guest_smp, which overrides all GUEST_SMP values
+ 8. guest_core_binding, which overrides all GUEST_CORE_BINDING values
+
Executing Packet Forwarding tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py
index 977b7bc1..ae0056dc 100644
--- a/vnfs/qemu/qemu.py
+++ b/vnfs/qemu/qemu.py
@@ -81,6 +81,11 @@ class IVnfQemu(IVnf):
self._testpmd_fwd_mode, 'io')
self._testpmd_fwd_mode = 'io'
+ guest_smp = int(get_test_param('guest_smp', 0))
+ if guest_smp:
+ override_list = [guest_smp] * (self._number + 1)
+ S.setValue('GUEST_SMP', override_list)
+
name = 'Client%d' % self._number
vnc = ':%d' % self._number
# NOTE: affinization of main qemu process can cause hangup of 2nd VM
@@ -232,14 +237,18 @@ class IVnfQemu(IVnf):
stdin=proc.stdout)
proc.wait()
+ guest_core_binding = int(get_test_param('guest_core_binding', 0))
for cpu in range(0, int(S.getValue('GUEST_SMP')[self._number])):
match = None
for line in output.decode(cur_locale).split('\n'):
match = re.search(thread_id % cpu, line)
if match:
- self._affinitize_pid(
- S.getValue('GUEST_CORE_BINDING')[self._number][cpu],
- match.group(1))
+ if guest_core_binding:
+ self._affinitize_pid(guest_core_binding, match.group(1))
+ else:
+ self._affinitize_pid(
+ S.getValue('GUEST_CORE_BINDING')[self._number][cpu],
+ match.group(1))
break
if not match:
@@ -391,6 +400,30 @@ class IVnfQemu(IVnf):
'/DPDK/app/test-pmd')
self.execute_and_wait('make clean')
self.execute_and_wait('make')
+
+ # get multi-queue settings from CLI
+ guest_testpmd_txq = int(get_test_param('guest_testpmd_txq', 0))
+ if guest_testpmd_txq:
+ override_list = [guest_testpmd_txq] * (self._number + 1)
+ S.setValue('GUEST_TESTPMD_TXQ', override_list)
+
+ guest_testpmd_rxq = int(get_test_param('guest_testpmd_rxq', 0))
+ if guest_testpmd_rxq:
+ override_list = [guest_testpmd_rxq] * (self._number + 1)
+ S.setValue('GUEST_TESTPMD_RXQ', override_list)
+
+ guest_testpmd_nb_cores = \
+ int(get_test_param('guest_testpmd_nb_cores', 0))
+ if guest_testpmd_nb_cores:
+ override_list = [guest_testpmd_nb_cores] * (self._number + 1)
+ S.setValue('GUEST_TESTPMD_NB_CORES', override_list)
+
+ guest_testpmd_cpu_mask = \
+ int(get_test_param('guest_testpmd_cpu_mask', 0))
+ if guest_testpmd_cpu_mask:
+ override_list = [guest_testpmd_cpu_mask] * (self._number + 1)
+ S.setValue('GUEST_TESTPMD_CPU_MASK', override_list)
+
if int(S.getValue('GUEST_NIC_QUEUES')[self._number]):
self.execute_and_wait(
'./testpmd {} -n4 --socket-mem 512 --'.format(
diff --git a/vnfs/qemu/qemu_dpdk_vhost_user.py b/vnfs/qemu/qemu_dpdk_vhost_user.py
index 51c10242..a25c61ef 100644
--- a/vnfs/qemu/qemu_dpdk_vhost_user.py
+++ b/vnfs/qemu/qemu_dpdk_vhost_user.py
@@ -18,6 +18,7 @@
import logging
from conf import settings as S
+from conf import get_test_param
from vnfs.qemu.qemu import IVnfQemu
class QemuDpdkVhostUser(IVnfQemu):
@@ -32,6 +33,10 @@ class QemuDpdkVhostUser(IVnfQemu):
self._logger = logging.getLogger(__name__)
# multi-queue values
+ guest_nic_queues = int(get_test_param('guest_nic_queues', 0))
+ if guest_nic_queues:
+ override_list = [guest_nic_queues] * (self._number + 1)
+ S.setValue('GUEST_NIC_QUEUES', override_list)
if int(S.getValue('GUEST_NIC_QUEUES')[self._number]):
queue_str = ',queues={}'.format(S.getValue('GUEST_NIC_QUEUES')[self._number])
mq_vector_str = ',mq=on,vectors={}'.format(
diff --git a/vswitches/ovs_dpdk_vhost.py b/vswitches/ovs_dpdk_vhost.py
index 327a697d..5beb0051 100644
--- a/vswitches/ovs_dpdk_vhost.py
+++ b/vswitches/ovs_dpdk_vhost.py
@@ -22,6 +22,7 @@ import os
from src.ovs import OFBridge
from src.dpdk import dpdk
from conf import settings
+from conf import get_test_param
from vswitches.ovs import IVSwitchOvs
class OvsDpdkVhost(IVSwitchOvs):
@@ -69,6 +70,11 @@ class OvsDpdkVhost(IVSwitchOvs):
dpdk.init()
super(OvsDpdkVhost, self).start()
# old style OVS <= 2.5.0 multi-queue enable
+ vswitch_dpdk_multi_queues = \
+ int(get_test_param('vswitch_dpdk_multi_queues', 0))
+ if vswitch_dpdk_multi_queues:
+ settings.setValue('VSWITCH_DPDK_MULTI_QUEUES', \
+ vswitch_dpdk_multi_queues)
if settings.getValue('OVS_OLD_STYLE_MQ') and \
int(settings.getValue('VSWITCH_DPDK_MULTI_QUEUES')):
tmp_br = OFBridge(timeout=-1)