diff options
-rw-r--r-- | conf/02_vswitch.conf | 2 | ||||
-rw-r--r-- | conf/04_vnf.conf | 27 | ||||
-rw-r--r-- | conf/__init__.py | 3 | ||||
-rw-r--r-- | conf/integration/01b_dpdk_regression_tests.conf | 145 | ||||
-rwxr-xr-x | src/dpdk/Makefile | 4 | ||||
-rw-r--r-- | src/package-list.mk | 8 | ||||
-rw-r--r-- | vnfs/qemu/qemu.py | 17 | ||||
-rwxr-xr-x | vsperf | 23 | ||||
-rw-r--r-- | vswitches/ovs.py | 7 |
9 files changed, 108 insertions, 128 deletions
diff --git a/conf/02_vswitch.conf b/conf/02_vswitch.conf index 84ef71cb..283da278 100644 --- a/conf/02_vswitch.conf +++ b/conf/02_vswitch.conf @@ -115,7 +115,7 @@ PATHS['vswitch'] = { 'path': os.path.join(ROOT_DIR, 'src/vpp/vpp/build-root/install-vpp-native/vpp'), 'vpp': 'bin/vpp', 'vppctl': 'bin/vppctl', - 'vpp_plugin_path' : 'lib64/vpp_plugins', + 'vpp_plugin_path' : 'lib/vpp_plugins', }, 'bin': { 'vpp': 'vpp', diff --git a/conf/04_vnf.conf b/conf/04_vnf.conf index 234f11b6..1574ca8d 100644 --- a/conf/04_vnf.conf +++ b/conf/04_vnf.conf @@ -87,8 +87,9 @@ GUEST_TIMEOUT = [180] # Guest images may require different drive types such as ide to mount shared # locations and/or boot correctly. You can modify the types here. -GUEST_BOOT_DRIVE_TYPE = ['scsi'] -GUEST_SHARED_DRIVE_TYPE = ['scsi'] +# Default setting to ide to support qemu version 3.1.1. +GUEST_BOOT_DRIVE_TYPE = ['ide'] +GUEST_SHARED_DRIVE_TYPE = ['ide'] # guest loopback application method; supported options are: # 'testpmd' - testpmd from dpdk will be built and used @@ -130,10 +131,13 @@ GUEST_PROMPT = ['root.*#'] GUEST_NICS_NR = [2] # template for guests with 4 NICS, but only GUEST_NICS_NR NICS will be configured at runtime -GUEST_NICS = [[{'device' : 'eth0', 'mac' : '#MAC(00:00:00:00:00:01,2)', 'pci' : '00:04.0', 'ip' : '#IP(192.168.1.2,4)/24'}, - {'device' : 'eth1', 'mac' : '#MAC(00:00:00:00:00:02,2)', 'pci' : '00:05.0', 'ip' : '#IP(192.168.1.3,4)/24'}, - {'device' : 'eth2', 'mac' : '#MAC(cc:00:00:00:00:01,2)', 'pci' : '00:06.0', 'ip' : '#IP(192.168.1.4,4)/24'}, - {'device' : 'eth3', 'mac' : '#MAC(cc:00:00:00:00:02,2)', 'pci' : '00:07.0', 'ip' : '#IP(192.168.1.5,4)/24'}, +# With qemu verison 3.1.1 the PCI assignments are starting from 00.03.0. +# TODO: Need a better approach for pci configuration. Currently its based on what qemu-system-x86_64 assigns. +# One option is to use the pci configuration as one of the parameters of the qemu-system-x86_64 command. +GUEST_NICS = [[{'device' : 'eth0', 'mac' : '#MAC(00:00:00:00:00:01,2)', 'pci' : '00:03.0', 'ip' : '#IP(192.168.1.2,4)/24'}, + {'device' : 'eth1', 'mac' : '#MAC(00:00:00:00:00:02,2)', 'pci' : '00:04.0', 'ip' : '#IP(192.168.1.3,4)/24'}, + {'device' : 'eth2', 'mac' : '#MAC(cc:00:00:00:00:01,2)', 'pci' : '00:05.0', 'ip' : '#IP(192.168.1.4,4)/24'}, + {'device' : 'eth3', 'mac' : '#MAC(cc:00:00:00:00:02,2)', 'pci' : '00:06.0', 'ip' : '#IP(192.168.1.5,4)/24'}, ]] # amount of host memory allocated for each guest @@ -208,11 +212,18 @@ GUEST_BRIDGE_IP = ['#IP(1.1.1.5)/16'] # Note: Testpmd must be executed in interactive mode. It means, that # VSPERF won't work correctly if '-i' will be removed. GUEST_TESTPMD_PARAMS = ['-c 0x3 -n 4 --socket-mem 512 -- ' - '--burst=64 -i --txqflags=0xf00 ' - '--disable-hw-vlan'] + '--burst=64 -i '] # packet forwarding mode supported by testpmd; Please see DPDK documentation # for comprehensive list of modes supported by your version. # e.g. io|mac|mac_retry|macswap|flowgen|rxonly|txonly|csum|icmpecho|... # Note: Option "mac_retry" has been changed to "mac retry" since DPDK v16.07 GUEST_TESTPMD_FWD_MODE = ['csum'] + +# map queue stats to separate regs to verify MQ functionality +# setting this from testpmd command line prameters since DPDK 18.11 does not +# work as expected so we have to set this inside testpmd i.e. to set rx queue +# 2 on port 0 to mapping 5 add: "rx 0 2 5" +# Please see DPDK documentation to get more information how to set stat_qmap +# (https://doc.dpdk.org/guides/testpmd_app_ug/testpmd_funcs.html) +GUEST_QUEUE_STATS_MAPPING = [] diff --git a/conf/__init__.py b/conf/__init__.py index 83c5475f..6dff8360 100644 --- a/conf/__init__.py +++ b/conf/__init__.py @@ -256,6 +256,9 @@ class Settings(object): Expand VM option with given key for given number of VMs """ tmp_value = self.getValue(key) + # skip empty/not set value + if not tmp_value: + return if isinstance(tmp_value, str): scalar = True master_value = tmp_value diff --git a/conf/integration/01b_dpdk_regression_tests.conf b/conf/integration/01b_dpdk_regression_tests.conf index abc56c28..44343d28 100644 --- a/conf/integration/01b_dpdk_regression_tests.conf +++ b/conf/integration/01b_dpdk_regression_tests.conf @@ -21,6 +21,10 @@ # Generic configuration used by OVSDPDK testcases # ############################################################ + +# required to import path to the log file +from conf import settings + _OVSDPDK_1st_PMD_CORE = 4 _OVSDPDK_2nd_PMD_CORE = 5 # calculate PMD mask from core IDs configured above @@ -32,8 +36,11 @@ _OVSDPDK_GUEST_5_CORES = [('7', '8', '9', '10', '11')] # number of queues configured in OVS and GUEST _OVSDPDK_MQ = '2' -# Path to the log file -_OVSDPDK_VSWITCH_LOG = os.path.join(LOG_DIR, LOG_FILE_VSWITCHD) +# path to the log file +_RESULTS_PATH = settings.getValue('RESULTS_PATH') +name, ext = os.path.splitext(settings.getValue('LOG_FILE_VSWITCHD')) +log_file = "{name}_{uid}{ex}".format(name=name,uid=settings.getValue('LOG_TIMESTAMP'),ex=ext) +_OVSDPDK_VSWITCH_LOG = os.path.join(_RESULTS_PATH, log_file) _OVSDPDK_HEADER_LEN = 18 # length of frame headers in bytes, it's used for calculation # of payload size, i.e. payload = frame_size - header_len @@ -172,59 +179,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['tools', 'assert', 'not len(#STEP[-1])'], ] }, - { - # Support of netdev-dpdk/detach has been removed from OVS, so testcase will fail with recent - # OVS/DPDK versions. There is an ongoing discussion about possible support of netdev-dpdk/detach - # in the future OVS versions. - # Test has been tested with: - # OVS_TAG = 03d6399e618e4136c5da0be2b6f18f0b7d75b2bb - # DPDK_TAG = v16.11 - "Name": "ovsdpdk_hotplug_detach", - "Deployment": "clean", - "Description": "Same as ovsdpdk_hotplug_attach, but delete and detach the device after the hotplug. " - "Note: Support of netdev-dpdk/detach has been removed from OVS, so testcase will fail " - "with recent OVS/DPDK versions.", - "vSwitch" : "OvsDpdkVhost", - "Parameters" : { - # suppress DPDK configuration, so physical interfaces are not bound to DPDK driver - 'WHITELIST_NICS' : [], - 'NICS' : [], - }, - "TestSteps": [ - # check if OVS supports netdev-dpdk/detach, fail otherwise - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] list-commands', '|netdev-dpdk\/detach'], - ['tools', 'assert', 'len(#STEP[-1])'], - # restore original NICS configuration, so we can use add/del_phy_port - ['settings', 'setValue', 'TEST_PARAMS', ''], - # find out which DPDK driver is being used; it should be the last configured - # DPDK module; optional path and .ko suffix must be removed - ['tools', 'eval', '\'$TOOLS["dpdk_modules"][-1]\'.split("/")[-1].split(".")[0]'], - # bind NIC to DPDK driver - ['tools', 'exec_shell', 'sudo $TOOLS["bind-tool"] --bind #STEP[-1] $NICS[0]["pci"]'], - # and check that DPDK port can be created without errors - ['vswitch', 'add_switch', 'int_br0'], - ['#port', 'vswitch', 'add_phy_port', 'int_br0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', - '|Error attaching device.*$NICS[0]["pci"]'], - ['tools', 'assert', 'not len(#STEP[-1])'], - # try to unbind port - should fail beause it is being used - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] netdev-dpdk/detach $NICS[0]["pci"] 2>&1; exit 0', - '|Device.*$NICS[0]["pci"].*is being used by interface'], - ['tools', 'assert', 'len(#STEP[-1])'], - # delete port and unbind it - should succeed - ['vswitch', 'del_port', 'int_br0', '#STEP[port][0]'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] netdev-dpdk/detach $NICS[0]["pci"]', - '|Device.*$NICS[0]["pci"].*has been detached'], - ['tools', 'assert', 'len(#STEP[-1])'], - # try to add port again - ['vswitch', 'add_phy_port', 'int_br0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', - '|Error attaching device.*$NICS[0]["pci"]'], - # it will work because auto attach was implemented into OVS - ['tools', 'assert', 'not len(#STEP[-1])'], - ['vswitch', 'del_switch', 'int_br0'], - ] - }, ] ############################################################ @@ -410,7 +364,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "VSWITCH_DPDK_MULTI_QUEUES" : _OVSDPDK_MQ, }, "TestSteps": [ - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk[01]\s+queue-id: \d+'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk[01]\s+queue-id:\s+\d+'], # check that requested nr of queues was created on both NICs ['tools', 'assert', 'len(#STEP[-1])=={}'.format(int(_OVSDPDK_MQ)*2)], ] @@ -432,8 +386,10 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ }, "TestSteps": [ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] -- set Interface dpdk0 other_config:pmd-rxq-affinity="0:{},1:{}"'.format(_OVSDPDK_1st_PMD_CORE, _OVSDPDK_1st_PMD_CORE)], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id: 0 1'], - ['tools', 'assert', 'len(#STEP[-1])==1'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id:\s+0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id:\s+1'], + ['tools', 'assert', 'len(#STEP[-2])==1'], + ['tools', 'assert', 'len(#STEP[-2])==1'], ] }, { @@ -453,8 +409,8 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ }, "TestSteps": [ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] -- set Interface dpdk0 other_config:pmd-rxq-affinity="0:{},1:{}"'.format(_OVSDPDK_1st_PMD_CORE, _OVSDPDK_2nd_PMD_CORE)], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id: 0$'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id: 1$'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id:\s+0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id:\s+1'], ['tools', 'assert', 'len(#STEP[-2])==1'], ['tools', 'assert', 'len(#STEP[-2])==1'], ] @@ -475,12 +431,15 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TestSteps": STEP_VSWITCH_PVP_INIT + [ ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", - '|dpdkvhostuserclient0\s+queue-id: \d'], + '|dpdkvhostuserclient0\s+queue-id:\s+\d'], ['tools', 'assert', 'len(#STEP[-1])==1'], ['vnf', 'start'], ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", - '|dpdkvhostuserclient0\s+queue-id: 0 1'], - ['tools', 'assert', 'len(#STEP[-1])==1'], + '|dpdkvhostuserclient0\s+queue-id:\s+0'], + ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", + '|dpdkvhostuserclient0\s+queue-id:\s+1'], + ['tools', 'assert', 'len(#STEP[-2])==1'], + ['tools', 'assert', 'len(#STEP[-2])==1'], ['vnf', 'stop'], ] + STEP_VSWITCH_PVP_FINIT @@ -500,11 +459,12 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TRAFFICGEN_DURATION" : 5, "TRAFFICGEN" : "IxNet", "TRAFFIC" : { - "bidir" : "false", + "bidir" : "False", "traffic_type" : "rfc2544_continuous", "multistream" : 6, "stream_type" : "L3", "frame_rate" : 1, + "learning_frames" : False, 'l2': { 'srcmac': "00:00:07:00:0E:00", 'dstmac': "00:00:00:00:00:01" @@ -514,7 +474,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ 'proto': 'udp', 'srcip': '6.6.6.6', 'dstip': '1.1.1.1', - }, + } } }, "TestSteps": STEP_VSWITCH_PVP_INIT + [ @@ -525,6 +485,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ # so send_traffic() will end with success ['vswitch', 'add_flow', 'int_br0', {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'int_br0', {'priority' : '0', 'actions' : ['NORMAL']}], ['vnf', 'start'], # configure two channels, so multiple cores could be used ['vnf', 'execute_and_wait', 'ethtool -L eth0 combined 2'], @@ -549,7 +510,6 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['vnf', 'execute_and_wait', 'route add default gw 1.1.1.5 eth0'], ['vnf', 'execute_and_wait', 'arp -s 1.1.1.5 DE:AD:BE:EF:CA:FC'], ['vnf', 'execute_and_wait', 'ip a'], - ['trafficgen', 'send_traffic',{}], # check interrupts to verify that traffic was corectly dispatched... ['#result', 'vnf', 'execute_and_wait', 'cat /proc/interrupts', @@ -580,16 +540,15 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ # there must be separate CPU for each of RX/TX queues "GUEST_SMP" : ['5'], "GUEST_TESTPMD_PARAMS" : ['-c 0x1F -n 4 --socket-mem 512 -- ' - '--burst=64 -i --txqflags=0xf00 --nb-cores=4 ' - # map queue stats to separate regs to verify MQ functionality - '--rx-queue-stats-mapping=\(0,0,0\),\(0,1,1\),\(1,0,2\),\(1,1,3\) ' - '--tx-queue-stats-mapping=\(0,0,4\),\(0,1,5\),\(1,0,6\),\(1,1,7\) ' - '--disable-hw-vlan --rxq=2 --txq=2'], + '--burst=64 -i --nb-cores=4 ' + '--rxq=2 --txq=2'], "TRAFFICGEN_DURATION" : 5, "TRAFFIC" : { "traffic_type" : "rfc2544_continuous", "multistream" : 3, "stream_type" : "L3", + "frame_rate" : 1, + "learning_frames" : False, 'l3': { 'enabled': True, 'proto': 'udp', @@ -597,12 +556,21 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ 'dstip': '1.1.1.1', }, }, + "GUEST_QUEUE_STATS_MAPPING" : ["rx 0 0 0", + "rx 0 1 1", + "rx 1 0 2", + "rx 1 1 3", + "tx 0 0 4", + "tx 0 1 5", + "tx 1 0 6", + "tx 1 1 7" + ] }, "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT + [ ['vnf', 'start'], ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", - '|dpdk\w+\s+queue-id: \d'], + '|dpdk\w+\s+queue-id:\s+\d'], # there must be two standalone queue records for every interface (2x4) ['tools', 'assert', 'len(#STEP[-1])==8'], ['trafficgen', 'send_traffic', {}], @@ -739,7 +707,7 @@ _OVSDPDK_VDEV_ADD_NULL = [ ['vswitch', 'add_switch', 'int_br0'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port int_br0 null0 -- ' 'set Interface null0 type=dpdk options:dpdk-devargs=eth_null0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', '|dpdk-devargs=\S+eth_null0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', '|dpdk-devargs=eth_null0'], ['tools', 'assert', 'len(#STEP[-1])==1'], ] @@ -776,7 +744,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TestSteps": _OVSDPDK_VDEV_ADD_NULL + [ ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] del-port null0'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', - '|dpdk-devargs=\S+eth_null0'], + '|dpdk-devargs=eth_null0'], ['tools', 'assert', 'not len(#STEP[-1])'], ] }, @@ -1017,9 +985,9 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TestSteps": [ ['vswitch', 'add_switch', 'int_br0'], ['vswitch', 'add_phy_port', 'int_br0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9710'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9702'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], - ['tools', 'assert', 'int(#STEP[-1])==9710'], + ['tools', 'assert', 'int(#STEP[-1])==9702'], # get line number of next log file entry ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9711'], @@ -1027,7 +995,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['tools', 'exec_shell', "sed -n '#STEP[-2][0],$ p' $_OVSDPDK_VSWITCH_LOG", '|unsupported MTU 9711'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], - ['tools', 'assert', 'int(#STEP[-1])==9710'], + ['tools', 'assert', 'int(#STEP[-1])==9702'], ] }, { @@ -1041,9 +1009,9 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ "TestSteps": [ ['vswitch', 'add_switch', 'int_br0'], ['vswitch', 'add_vport', 'int_br0'], - ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9710'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9702'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], - ['tools', 'assert', 'int(#STEP[-1])==9710'], + ['tools', 'assert', 'int(#STEP[-1])==9702'], # get line number of next log file entry ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9711'], @@ -1052,7 +1020,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ '|unsupported MTU 9711'], ['tools', 'assert', 'len(#STEP[-1])'], ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], - ['tools', 'assert', 'int(#STEP[-1])==9710'], + ['tools', 'assert', 'int(#STEP[-1])==9702'], ] }, { @@ -1200,8 +1168,8 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ ['trafficgen', 'get_results'], # all traffic should pass through (i.e. 0% frame loss) ['tools', 'assert', 'float(#STEP[-1][0]["frame_loss_percent"])==0'], - # set packetsize to 9019 and send traffic - ['settings', 'setValue', 'TRAFFICGEN_PKT_SIZES', (9019,)], + # set packetsize to 9702 and send traffic + ['settings', 'setValue', 'TRAFFICGEN_PKT_SIZES', (9702,)], # disable verification of send_traffic "!" prefix, otherwise vsperf # will fail when 100% packet loss is detected ['!trafficgen', 'send_traffic', {}], @@ -1244,10 +1212,6 @@ _OVSDPDK_RATE_set_rate_limiter = [ 'set Interface $_OVSDPDK_RATE_PORT$_OVSDPDK_RATE_NICID ' 'ingress_policing_burst=$_OVSDPDK_RATE_BURST ' 'ingress_policing_rate=$_OVSDPDK_RATE_RATE'], - # check vswitchd log file, that rate limiter was created - ['tools', 'exec_shell', "sed -n '#STEP[-2][0],$ p' $_OVSDPDK_VSWITCH_LOG", - '|CIR period'], - ['tools', 'assert', '("CIR period" in #STEP[-1])==$_OVSDPDK_RATE_LIMITER_CREATED'], # verify that interface has correct rate limiter configuration ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] ' 'list interface $_OVSDPDK_RATE_PORT$_OVSDPDK_RATE_NICID', @@ -1491,11 +1455,6 @@ _OVSDPDK_QOS_set_qos = [ 'other-config:cbs=$_OVSDPDK_QOS_CBS','|\w{8}-\w{4}-\w{4}-\w{4}-\w{12}'], ['tools', 'assert', 'len(#STEP[-1])==1'], - # Check the OVS logs - ['tools', 'exec_shell', "sed -n '#STEP[-3][0],$ p' $_OVSDPDK_VSWITCH_LOG", - '|CIR period'], - ['tools', 'assert', '"CIR period" in #STEP[-1]'], - # Check the QoS policy and attributes ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] -t ovs-vswitchd qos/show ' '$_OVSDPDK_QOS_PORT$_OVSDPDK_QOS_NICID', '.+'], @@ -1615,7 +1574,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ # Check the OVS logs ['tools', 'exec_shell', "sed -n '#STEP[LOG_MARK][0],$ p' $_OVSDPDK_VSWITCH_LOG", - 'Failed to set QoS type egress-policer on port #STEP[1][0]: No such file or directory'], + 'Failed to set QoS type egress-policer on port #STEP[1][0]: Invalid argument'], ['tools', 'assert', 'len(#STEP[-1])==1'], # Check the attributes for vhost0 @@ -1645,7 +1604,7 @@ INTEGRATION_TESTS = INTEGRATION_TESTS + [ # Check the OVS logs ['tools', 'exec_shell', "sed -n '#STEP[LOG_MARK][0],$ p' $_OVSDPDK_VSWITCH_LOG", - 'Failed to set QoS type egress-policer on port #STEP[1][0]: No such file or directory'], + 'Failed to set QoS type egress-policer on port #STEP[1][0]: Invalid argument'], ['tools', 'assert', 'len(#STEP[-1])==1'], # Check the attributes for vhost0 diff --git a/src/dpdk/Makefile b/src/dpdk/Makefile index 4b4330d7..1a1521db 100755 --- a/src/dpdk/Makefile +++ b/src/dpdk/Makefile @@ -82,13 +82,13 @@ endif # CentOS 7.3 specific config changes to compile ifeq ($(ID),"centos") ifeq ($(VERSION_ID),"7") - $(AT)sed -i.bak s@'SRCS-y += ethtool/igb/igb_main.c'@'#SRCS-y += ethtool/igb/igb_main.c'@g $(WORK_DIR)/lib/librte_eal/linuxapp/kni/Makefile + $(AT)sed -i.bak s@'SRCS-y += ethtool/igb/igb_main.c'@'#SRCS-y += ethtool/igb/igb_main.c'@g $(WORK_DIR)/kernel/linux/kni/Makefile endif endif # RHEL 7.3 specific config changes to compile ifeq ($(ID),"rhel") ifeq ($(VERSION_ID),"7.3") - $(AT)sed -i.bak s@'SRCS-y += ethtool/igb/igb_main.c'@'#SRCS-y += ethtool/igb/igb_main.c'@g $(WORK_DIR)/lib/librte_eal/linuxapp/kni/Makefile + $(AT)sed -i.bak s@'SRCS-y += ethtool/igb/igb_main.c'@'#SRCS-y += ethtool/igb/igb_main.c'@g $(WORK_DIR)/kernel/linux/kni/Makefile endif endif $(AT)sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST=./CONFIG_RTE_LIBRTE_VHOST=y/g' $(CONFIG_FILE_LINUXAPP) diff --git a/src/package-list.mk b/src/package-list.mk index d32a9ffd..11f876da 100644 --- a/src/package-list.mk +++ b/src/package-list.mk @@ -13,19 +13,19 @@ # dpdk section # DPDK_URL ?= git://dpdk.org/dpdk DPDK_URL ?= http://dpdk.org/git/dpdk -DPDK_TAG ?= v17.08 +DPDK_TAG ?= v18.11-rc2 # OVS section OVS_URL ?= https://github.com/openvswitch/ovs -OVS_TAG ?= v2.8.1 +OVS_TAG ?= v2.12.0 # VPP section VPP_URL ?= https://git.fd.io/vpp -VPP_TAG ?= v17.07 +VPP_TAG ?= v19.08.1 # QEMU section QEMU_URL ?= https://github.com/qemu/qemu.git -QEMU_TAG ?= v2.9.1 +QEMU_TAG ?= v3.1.1 # TREX section TREX_URL ?= https://github.com/cisco-system-traffic-generator/trex-core.git diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py index 684222a7..fb87ed27 100644 --- a/vnfs/qemu/qemu.py +++ b/vnfs/qemu/qemu.py @@ -123,7 +123,7 @@ class IVnfQemu(IVnf): uid=S.getValue('LOG_TIMESTAMP'), ex=ext) cmd_logger = logging.FileHandler( - filename=os.path.join(S.getValue('LOG_DIR'), rename_gcmd)) + filename=os.path.join(S.getValue('RESULTS_PATH'), rename_gcmd)) cmd_logger.setLevel(logging.DEBUG) cmd_logger.addFilter(self.GuestCommandFilter()) logger.addHandler(cmd_logger) @@ -398,6 +398,8 @@ class IVnfQemu(IVnf): self.execute_and_wait('./testpmd {}'.format(testpmd_params), 60, "Done") self.execute_and_wait('set fwd ' + self._testpmd_fwd_mode, 20, 'testpmd>') + for entry in S.getValue('GUEST_QUEUE_STATS_MAPPING'): + self.execute_and_wait('set stat_qmap ' + entry, 2, 'testpmd>') self.execute_and_wait('start', 20, 'testpmd>') def _configure_l2fwd(self): @@ -503,11 +505,16 @@ class IVnfQemu(IVnf): pci_slots) elif driver == 'igb_uio_from_src': # build and insert igb_uio and rebind interfaces to it - self.execute_and_wait('make RTE_OUTPUT=$RTE_SDK/$RTE_TARGET -C ' - '$RTE_SDK/lib/librte_eal/linuxapp/igb_uio') + # from DPDK 18.05 Linux kernel driver changed location + # also it is not possible to compile driver without + # passing EXTRA_CFLAGS + self.execute_and_wait("make RTE_OUTPUT=$RTE_SDK/{0} \ + EXTRA_CFLAGS=\"-I$RTE_SDK/{1}/include\" \ + -C $RTE_SDK/kernel/linux/igb_uio"\ + .format(S.getValue('RTE_TARGET'), S.getValue('RTE_TARGET'))) self.execute_and_wait('modprobe uio') - self.execute_and_wait('insmod %s/kmod/igb_uio.ko' % - S.getValue('RTE_TARGET')) + self.execute_and_wait('insmod {}/kmod/igb_uio.ko'\ + .format(S.getValue('RTE_TARGET'))) self.execute_and_wait('./*tools/dpdk*bind.py -b igb_uio ' + pci_slots) else: self._logger.error( @@ -672,12 +672,22 @@ def main(): settings.load_from_dir(os.path.join(_CURR_DIR, 'conf')) - # Define the timestamp to be used by logs and results + # define the timestamp to be used by logs and results date = datetime.datetime.fromtimestamp(time.time()) timestamp = date.strftime('%Y-%m-%d_%H-%M-%S') settings.setValue('LOG_TIMESTAMP', timestamp) - # Load non performance/integration tests + # generate results directory name + # integration test use vswitchd log in test step assertions, ensure that + # correct value will be set before loading integration test configuration + results_dir = "results_" + timestamp + results_path = os.path.join(settings.getValue('LOG_DIR'), results_dir) + settings.setValue('RESULTS_PATH', results_path) + # create results directory + if not os.path.exists(results_path): + os.makedirs(results_path) + + # load non performance/integration tests if args['integration']: settings.load_from_dir(os.path.join(_CURR_DIR, 'conf/integration')) @@ -704,15 +714,6 @@ def main(): # if required, handle list-* operations handle_list_options(args) - # generate results directory name - results_dir = "results_" + timestamp - results_path = os.path.join(settings.getValue('LOG_DIR'), results_dir) - settings.setValue('RESULTS_PATH', results_path) - - # create results directory - if not os.path.exists(results_path): - os.makedirs(results_path) - configure_logging(settings.getValue('VERBOSITY')) # CI build support diff --git a/vswitches/ovs.py b/vswitches/ovs.py index e713fc38..853bef85 100644 --- a/vswitches/ovs.py +++ b/vswitches/ovs.py @@ -47,13 +47,12 @@ class IVSwitchOvs(IVSwitch, tasks.Process): """See IVswitch for general description """ super().__init__() + name, ext = os.path.splitext(settings.getValue('LOG_FILE_VSWITCHD')) rename_vswitchd = "{name}_{uid}{ex}".format(name=name, - uid=settings.getValue( - 'LOG_TIMESTAMP'), + uid=settings.getValue('LOG_TIMESTAMP'), ex=ext) - self._logfile = os.path.join(settings.getValue('RESULTS_PATH'), - rename_vswitchd) + self._logfile = os.path.join(settings.getValue('RESULTS_PATH'), rename_vswitchd) self._ovsdb_pidfile_path = os.path.join(settings.getValue('TOOLS')['ovs_var_tmp'], "ovsdb-server.pid") self._vswitchd_pidfile_path = os.path.join(settings.getValue('TOOLS')['ovs_var_tmp'], |