##
-## Copyright (c) 2010-2017 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
##
-## Copyright (c) 2010-2018 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
[test1]
test=warmuptest
-flowsize=1024
+flowsize=512
packetsize=64
warmupspeed=10
warmuptime=2
packetsizes=[64,128]
# the number of flows in the list need to be powers of 2, max 2^20
# # Select from following numbers: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535, 131072, 262144, 524280, 1048576
-flows=[1,512]
+flows=[512,1]
##
-## Copyright (c) 2010-2018 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
[test1]
test=warmuptest
-flowsize=1024
+flowsize=512
packetsize=64
warmupspeed=1
warmuptime=2
packetsizes=[64,128]
# the number of flows in the list need to be powers of 2, max 2^20
# Select from following numbers: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535, 131072, 262144, 524280, 1048576
-flows=[1,512]
+flows=[512,1]
{
-"_Copyright": "Copyright (c) 2010-2018 Intel Corporation",
+"_Copyright": "Copyright (c) 2010-2019 Intel Corporation",
"_License": "SPDX-License-Identifier: Apache-2.0",
"builders": [
{
#!/usr/bin/env bash
##
-## Copyright (c) 2010-2018 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
#!/usr/bin/python
##
-## Copyright (c) 2010-2017 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
usage()
sys.exit(2)
for opt, arg in opts:
- if opt in ("-h", "--help"):
+ if opt in ["-h", "--help"]:
usage()
sys.exit()
- if opt in ("-v", "--version"):
+ if opt in ["-v", "--version"]:
print("Rapid Automated Performance Indication for Dataplane "+version)
sys.exit()
- if opt in ("--stack"):
+ if opt in ["--stack"]:
stack = arg
print ("Using '"+stack+"' as name for the stack")
- elif opt in ("--vms"):
+ elif opt in ["--vms"]:
vms = arg
print ("Using Virtual Machines Description: "+vms)
- elif opt in ("--key"):
+ elif opt in ["--key"]:
key = arg
print ("Using key: "+key)
- elif opt in ("--image"):
+ elif opt in ["--image"]:
image = arg
print ("Using image: "+image)
- elif opt in ("--image_file"):
+ elif opt in ["--image_file"]:
image_file = arg
print ("Using qcow2 file: "+image_file)
- elif opt in ("--dataplane_network"):
+ elif opt in ["--dataplane_network"]:
dataplane_network = arg
print ("Using dataplane network: "+ dataplane_network)
- elif opt in ("--subnet"):
+ elif opt in ["--subnet"]:
subnet = arg
print ("Using dataplane subnet: "+ subnet)
- elif opt in ("--subnet_cidr"):
+ elif opt in ["--subnet_cidr"]:
subnet_cidr = arg
print ("Using dataplane subnet: "+ subnet_cidr)
- elif opt in ("--internal_network"):
+ elif opt in ["--internal_network"]:
internal_network = arg
print ("Using control plane network: "+ internal_network)
- elif opt in ("--floating_network"):
+ elif opt in ["--floating_network"]:
floating_network = arg
print ("Using floating ip network: "+ floating_network)
- elif opt in ("--log"):
+ elif opt in ["--log"]:
loglevel = arg
print ("Log level: "+ loglevel)
# Checking if the dataplane network already exists, if not create it
log.debug("Checking dataplane network: " + dataplane_network)
if dataplane_network in Networks:
+ # If the dataplane already exists, we are assuming that this network is already created before with the proper configuration, hence we do not check if the subnet is created etc...
log.info("Dataplane network (" + dataplane_network + ") already active")
else:
log.info('Creating dataplane network ...')
ServerName=[]
config = ConfigParser.RawConfigParser()
vmconfig = ConfigParser.RawConfigParser()
-vmconfig.read(vms)
+vmname = os.path.dirname(os.path.realpath(__file__))+'/' + vms
+#vmconfig.read_file(open(vmname))
+vmconfig.readfp(open(vmname))
total_number_of_VMs = vmconfig.get('DEFAULT', 'total_number_of_vms')
cmd = 'openstack server list -f value -c Name'
log.debug (cmd)
if SRIOV_mgmt_port == 'NO':
nic_info = '--nic net-id=%s'%(internal_network)
else:
- for port in SRIOV_mgmt_port.split(','):
- nic_info = '--nic port-id=%s'%(port)
+ nic_info = '--nic port-id=%s'%(SRIOV_mgmt_port)
if SRIOV_port == 'NO':
nic_info = nic_info + ' --nic net-id=%s'%(dataplane_network)
else:
if [ "$1" == "compile" ]; then
prox_compile
else
- echo "Positional parameter 1 is empty"
[ ! -d ${BUILD_DIR} ] && sudo mkdir -p ${BUILD_DIR}
sudo chmod 0777 ${BUILD_DIR}
;;
-;; Copyright (c) 2010-2017 Intel Corporation
+;; Copyright (c) 2010-2019 Intel Corporation
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;;
-;; Copyright (c) 2010-2017 Intel Corporation
+;; Copyright (c) 2010-2019 Intel Corporation
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;;
-;; Copyright (c) 2010-2017 Intel Corporation
+;; Copyright (c) 2010-2019 Intel Corporation
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
##
-## Copyright (c) 2010-2018 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
##
-## Copyright (c) 2010-2018 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
[DEFAULT]
name = L2BasicSwapTesting
-number_of_tests = 2
+number_of_tests = 1
total_number_of_test_machines = 2
prox_socket = true
prox_launch_exit = true
swapcores = [1]
[test1]
-test=warmuptest
-flowsize=1024
-packetsize=64
-warmupspeed=10
-warmuptime=2
-
-
-[test2]
test=fixed_rate
packetsizes=[256]
speed=10
;;
-;; Copyright (c) 2010-2017 Intel Corporation
+;; Copyright (c) 2010-2019 Intel Corporation
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;;
-;; Copyright (c) 2010-2017 Intel Corporation
+;; Copyright (c) 2010-2019 Intel Corporation
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;;
-;; Copyright (c) 2010-2017 Intel Corporation
+;; Copyright (c) 2010-2019 Intel Corporation
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
##
-## Copyright (c) 2010-2018 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
[test1]
test=warmuptest
-flowsize=1024
+flowsize=512
packetsize=64
warmupspeed=1
warmuptime=2
packetsizes=[64]
# the number of flows in the list need to be powers of 2, max 2^20
# # Select from following numbers: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535, 131072, 262144, 524280, 1048576
-# flows=[1,512]
-#
-#
+flows=[512,1]
+
[DEFAULT]
name = L3FrameRateTesting
-number_of_tests = 2
+number_of_tests = 1
total_number_of_test_machines = 2
prox_socket = true
prox_launch_exit = true
swapcores = [1]
[test1]
-test=warmuptest
-flowsize=1024
-packetsize=64
-warmupspeed=10
-warmuptime=2
-
-[test2]
test=fixed_rate
packetsizes=[64]
speed=10
##
-## Copyright (c) 2010-2018 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
##
-## Copyright (c) 2010-2017 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
def reset_stats(self):
self._send('reset stats')
- def lat_stats(self, cores, tasks={0}):
+ def lat_stats(self, cores, tasks=[0]):
min_lat = 999999999
max_lat = avg_lat = 0
+ number_tasks_returning_stats = 0
self._send('lat stats %s %s' % (','.join(map(str, cores)), ','.join(map(str, tasks))))
for core in cores:
for task in tasks:
stats = self._recv().split(',')
if stats[0].startswith('error'):
if stats[0].startswith('error: invalid syntax'):
- log.critical("dp core stats error: unexpected invalid syntax (potential incompatibility between scripts and PROX)")
- raise Exception("dp core stats error")
+ log.critical("lat stats error: unexpected invalid syntax (potential incompatibility between scripts and PROX)")
+ raise Exception("lat stats error")
continue
+ number_tasks_returning_stats += 1
min_lat = min(int(stats[0]),min_lat)
max_lat = max(int(stats[1]),max_lat)
avg_lat += int(stats[2])
- avg_lat = avg_lat/len(cores)
+ avg_lat = avg_lat/number_tasks_returning_stats
self._send('stats latency(0).used')
used = float(self._recv())
self._send('stats latency(0).total')
buckets = buckets[:-1]
return buckets
- def core_stats(self, cores, tasks={0}):
+ def core_stats(self, cores, tasks=[0]):
rx = tx = drop = tsc = hz = rx_non_dp = tx_non_dp = tx_fail = 0
self._send('dp core stats %s %s' % (','.join(map(str, cores)), ','.join(map(str, tasks))))
for core in cores:
tx_fail += int(stats[5])
tsc = int(stats[6])
hz = int(stats[7])
- return rx,rx_non_dp, tx,tx_non_dp, drop, tx_fail, tsc, hz
- #return rx-rx_non_dp, tx-tx_non_dp, drop, tx_fail, tsc, hz
+ return rx, rx_non_dp, tx, tx_non_dp, drop, tx_fail, tsc, hz
def set_random(self, cores, task, offset, mask, length):
self._send('set random %s %s %s %s %s' % (','.join(map(str, cores)), task, offset, mask, length))
##
-## Copyright (c) 2010-2018 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
#!/usr/bin/python
##
-## Copyright (c) 2010-2017 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
print(" --test TEST_NAME Test cases will be read from TEST_NAME. Default is %s."%test_file)
print(" --map MACHINE_MAP_FILE Machine mapping will be read from MACHINE_MAP_FILE. Default is %s."%machine_map_file)
print(" --runtime Specify time in seconds for 1 test run")
- print(" --configonly If True, only upload all config files to the VMs, do not run the tests. Default is %s."%configonly)
+ print(" --configonly If this option is specified, only upload all config files to the VMs, do not run the tests")
print(" --log Specify logging level for log file output, default is DEBUG")
print(" --screenlog Specify logging level for screen output, default is INFO")
print(" -h, --help Show help message and exit.")
print("")
try:
- opts, args = getopt.getopt(sys.argv[1:], "vh", ["version","help", "env=", "test=", "map=", "runtime=","configonly=","log=","screenlog="])
+ opts, args = getopt.getopt(sys.argv[1:], "vh", ["version","help", "env=", "test=", "map=", "runtime=","configonly","log=","screenlog="])
except getopt.GetoptError as err:
print("===========================================")
print(str(err))
usage()
sys.exit(2)
for opt, arg in opts:
- if opt in ("-h", "--help"):
+ if opt in ["-h", "--help"]:
usage()
sys.exit()
- if opt in ("-v", "--version"):
+ if opt in ["-v", "--version"]:
print("Rapid Automated Performance Indication for Dataplane "+version)
sys.exit()
- if opt in ("--env"):
+ if opt in ["--env"]:
env = arg
- if opt in ("--test"):
+ if opt in ["--test"]:
test_file = arg
- if opt in ("--map"):
+ if opt in ["--map"]:
machine_map_file = arg
- if opt in ("--runtime"):
+ if opt in ["--runtime"]:
runtime = arg
- if opt in ("--configonly"):
- configonly = arg
- if configonly == 'True':
- configonly = True
- print('No actual runs, only uploading configuration files')
- else:
- configonly = False
- print('--configonly parameter is defaulted to False')
- if opt in ("--log"):
+ if opt in ["--configonly"]:
+ configonly = True
+ print('No actual runs, only uploading configuration files')
+ if opt in ["--log"]:
loglevel = arg
print ("Log level: "+ loglevel)
- if opt in ("--screenlog"):
+ if opt in ["--screenlog"]:
screenloglevel = arg
print ("Screen Log level: "+ screenloglevel)
lat_max = lat_max_sample
lat_avg = lat_avg + lat_avg_sample
used_avg = used_avg + used_sample
- lat_avg = lat_avg / n_loops
+ lat_avg = lat_avg / n_loops
used_avg = used_avg / n_loops
# Get statistics after some execution time
new_rx, new_non_dp_rx, new_tx, new_non_dp_tx, new_drop, new_tx_fail, new_tsc, tsc_hz = gensock.core_stats(genstatcores,tasks)
lat_warning = bcolors.WARNING + ' Latency accuracy issue?: {:>3.0f}%'.format(lat_used*100) + bcolors.ENDC
else:
lat_warning = ''
+ # The following if statement is testing if we pass the success criteria of a certain drop rate, average latenecy and maximum latency below the threshold
+ # The drop rate success can be achieved in 2 ways: either the drop rate is below a treshold, either we want that no packet has been lost during the test
+ # This can be specified by putting 0 in the .test file
if ((drop_rate < DROP_RATE_TRESHOLD) or (abs_dropped==DROP_RATE_TRESHOLD ==0)) and (lat_avg< LAT_AVG_TRESHOLD) and (lat_max < LAT_MAX_TRESHOLD):
lat_avg_prefix = bcolors.ENDC
lat_max_prefix = bcolors.ENDC
lat_warning = ''
log.info('|{:>7}'.format(str(attempts))+" | " + '{:>5.1f}'.format(speed) + '% ' +'{:>6.3f}'.format(get_pps(speed,size)) + ' Mpps | '+ '{:>9.3f}'.format(pps_req_tx)+' Mpps | '+ '{:>9.3f}'.format(pps_tx) +' Mpps | ' + '{:>9}'.format(pps_sut_tx_str) +' Mpps | '+ '{:>9.3f}'.format(pps_rx)+' Mpps | '+ '{:>9.0f}'.format(lat_avg)+' us | '+ '{:>9.0f}'.format(lat_max)+' us | '+ '{:>14d}'.format(abs_dropped)+ ' |''{:>9.2f}'.format(drop_rate)+ '% |'+lat_warning)
writer.writerow({'flow':'1','size':(size+4),'endspeed':speed,'endspeedpps':get_pps(speed,size),'endpps_req_tx':pps_req_tx,'endpps_tx':pps_tx,'endpps_sut_tx_str':pps_sut_tx_str,'endpps_rx':pps_rx,'endlat_avg':lat_avg,'endlat_max':lat_max,'endabs_dropped':abs_dropped,'enddrop_rate':drop_rate})
- gensock.stop(latcores)
def run_warmuptest(gensock):
# Running at low speed to make sure the ARP messages can get through.
##
-## Copyright (c) 2010-2018 Intel Corporation
+## Copyright (c) 2010-2019 Intel Corporation
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
[test1]
test=warmuptest
-flowsize=1024
+flowsize=512
packetsize=64
warmupspeed=1
warmuptime=2
+##
+## Copyright (c) 2010-2019 Intel Corporation
+##
+## Licensed under the Apache License, Version 2.0 (the "License");
+## you may not use this file except in compliance with the License.
+## You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+##
+## This code will help in using tshark to decode packets that were dumped
+## in the prox.log file as a result of dump, dump_tx or dump_rx commands
+
egrep '^[0-9]{4}|^[0-9]+\.' prox.log | text2pcap -q - - | tshark -r -
;;
-;; Copyright (c) 2010-2017 Intel Corporation
+;; Copyright (c) 2010-2019 Intel Corporation
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.