summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/rapid
diff options
context:
space:
mode:
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/README2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/bare.test6
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/basicrapid.test6
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/centos.json2
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh2
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py36
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh1
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/gen.cfg2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/gen_gw.cfg2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/impair.cfg2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/impair.test2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/irq.test2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/l2framerate.test10
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/l2swap.cfg2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/l2zeroloss.test9
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/l3framerate.test9
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/machine.map2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py17
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapidVMs.vms2
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py39
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/secgw.test4
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/sharkproxlog.sh18
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg2
25 files changed, 92 insertions, 91 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/README b/VNFs/DPPD-PROX/helper-scripts/rapid/README
index cb3a4fd8..602346da 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/README
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/README
@@ -1,5 +1,5 @@
##
-## 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/bare.test b/VNFs/DPPD-PROX/helper-scripts/rapid/bare.test
index e686e15e..c3f4965f 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/bare.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/bare.test
@@ -1,5 +1,5 @@
##
-## 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.
@@ -43,7 +43,7 @@ startspeed = 10
[test1]
test=warmuptest
-flowsize=1024
+flowsize=512
packetsize=64
warmupspeed=10
warmuptime=2
@@ -53,4 +53,4 @@ test=flowsizetest
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]
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/basicrapid.test b/VNFs/DPPD-PROX/helper-scripts/rapid/basicrapid.test
index 4bdfdda4..0a751d8c 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/basicrapid.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/basicrapid.test
@@ -1,5 +1,5 @@
##
-## 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.
@@ -43,7 +43,7 @@ startspeed = 10
[test1]
test=warmuptest
-flowsize=1024
+flowsize=512
packetsize=64
warmupspeed=1
warmuptime=2
@@ -53,5 +53,5 @@ test=flowsizetest
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]
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/centos.json b/VNFs/DPPD-PROX/helper-scripts/rapid/centos.json
index 3754ea09..df43393a 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/centos.json
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/centos.json
@@ -1,5 +1,5 @@
{
-"_Copyright": "Copyright (c) 2010-2018 Intel Corporation",
+"_Copyright": "Copyright (c) 2010-2019 Intel Corporation",
"_License": "SPDX-License-Identifier: Apache-2.0",
"builders": [
{
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh b/VNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh
index 9effa53c..7d66bd39 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh
@@ -1,6 +1,6 @@
#!/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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
index 3fbdc4c3..fc5e97b4 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
@@ -1,7 +1,7 @@
#!/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.
@@ -89,43 +89,43 @@ if args:
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)
@@ -204,6 +204,7 @@ if floating_network !='NO':
# 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 ...')
@@ -280,7 +281,9 @@ ServerToBeCreated=[]
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)
@@ -322,8 +325,7 @@ for vm in range(1, int(total_number_of_VMs)+1):
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:
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh b/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh
index 883244fa..2695735c 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh
@@ -136,7 +136,6 @@ function prox_install()
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}
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/gen.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/gen.cfg
index 0b52430f..0a34a83f 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/gen.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/gen.cfg
@@ -1,5 +1,5 @@
;;
-;; 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/gen_gw.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/gen_gw.cfg
index d6a2fa98..6744d54f 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/gen_gw.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/gen_gw.cfg
@@ -1,5 +1,5 @@
;;
-;; 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/impair.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/impair.cfg
index 8ca9e05d..16b6ac99 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/impair.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/impair.cfg
@@ -1,5 +1,5 @@
;;
-;; 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/impair.test b/VNFs/DPPD-PROX/helper-scripts/rapid/impair.test
index d1b0e368..806762a1 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/impair.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/impair.test
@@ -1,5 +1,5 @@
##
-## 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/irq.test b/VNFs/DPPD-PROX/helper-scripts/rapid/irq.test
index 78b68483..4dbb0cc6 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/irq.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/irq.test
@@ -1,5 +1,5 @@
##
-## 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/l2framerate.test b/VNFs/DPPD-PROX/helper-scripts/rapid/l2framerate.test
index a9f8d0ae..51710fe9 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/l2framerate.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/l2framerate.test
@@ -16,7 +16,7 @@
[DEFAULT]
name = L2BasicSwapTesting
-number_of_tests = 2
+number_of_tests = 1
total_number_of_test_machines = 2
prox_socket = true
prox_launch_exit = true
@@ -36,14 +36,6 @@ config_file = l2swap.cfg
swapcores = [1]
[test1]
-test=warmuptest
-flowsize=1024
-packetsize=64
-warmupspeed=10
-warmuptime=2
-
-
-[test2]
test=fixed_rate
packetsizes=[256]
speed=10
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg
index 3a3cf2c8..37612c3d 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg
@@ -1,5 +1,5 @@
;;
-;; 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg
index 79140623..380b6646 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg
@@ -1,5 +1,5 @@
;;
-;; 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/l2swap.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/l2swap.cfg
index 004588c0..366d8ac2 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/l2swap.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/l2swap.cfg
@@ -1,5 +1,5 @@
;;
-;; 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/l2zeroloss.test b/VNFs/DPPD-PROX/helper-scripts/rapid/l2zeroloss.test
index af60c407..95b2d492 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/l2zeroloss.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/l2zeroloss.test
@@ -1,5 +1,5 @@
##
-## 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.
@@ -43,7 +43,7 @@ startspeed = 10
[test1]
test=warmuptest
-flowsize=1024
+flowsize=512
packetsize=64
warmupspeed=1
warmuptime=2
@@ -53,6 +53,5 @@ test=flowsizetest
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]
+
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/l3framerate.test b/VNFs/DPPD-PROX/helper-scripts/rapid/l3framerate.test
index 81d9989d..2095da4c 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/l3framerate.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/l3framerate.test
@@ -16,7 +16,7 @@
[DEFAULT]
name = L3FrameRateTesting
-number_of_tests = 2
+number_of_tests = 1
total_number_of_test_machines = 2
prox_socket = true
prox_launch_exit = true
@@ -35,13 +35,6 @@ config_file = swap.cfg
swapcores = [1]
[test1]
-test=warmuptest
-flowsize=1024
-packetsize=64
-warmupspeed=10
-warmuptime=2
-
-[test2]
test=fixed_rate
packetsizes=[64]
speed=10
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/machine.map b/VNFs/DPPD-PROX/helper-scripts/rapid/machine.map
index b6e199d7..1f7ce99d 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/machine.map
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/machine.map
@@ -1,5 +1,5 @@
##
-## 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py b/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py
index bda3e5d9..5d5fb181 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py
@@ -1,5 +1,5 @@
##
-## 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.
@@ -183,22 +183,24 @@ class prox_sock(object):
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')
@@ -217,7 +219,7 @@ class prox_sock(object):
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:
@@ -236,8 +238,7 @@ class prox_sock(object):
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))
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapidVMs.vms b/VNFs/DPPD-PROX/helper-scripts/rapid/rapidVMs.vms
index b83c0d07..6032f68b 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapidVMs.vms
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapidVMs.vms
@@ -1,5 +1,5 @@
##
-## 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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
index 8964f2de..d0ee68a3 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
@@ -1,7 +1,7 @@
#!/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.
@@ -61,14 +61,14 @@ def usage():
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))
@@ -79,32 +79,27 @@ if args:
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)
@@ -245,7 +240,7 @@ def run_iteration(gensock,sutsock):
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)
@@ -339,6 +334,9 @@ def run_flow_size_test(gensock,sutsock):
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
@@ -626,7 +624,6 @@ def run_impairtest(gensock,sutsock):
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.
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/secgw.test b/VNFs/DPPD-PROX/helper-scripts/rapid/secgw.test
index 5c5813f0..d3693f29 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/secgw.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/secgw.test
@@ -1,5 +1,5 @@
##
-## 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.
@@ -50,7 +50,7 @@ startspeed = 10
[test1]
test=warmuptest
-flowsize=1024
+flowsize=512
packetsize=64
warmupspeed=1
warmuptime=2
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/sharkproxlog.sh b/VNFs/DPPD-PROX/helper-scripts/rapid/sharkproxlog.sh
index f52e5766..3c1a90ee 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/sharkproxlog.sh
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/sharkproxlog.sh
@@ -1 +1,19 @@
+##
+## 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 -
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg
index 02300f82..b2f39c9a 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg
@@ -1,5 +1,5 @@
;;
-;; 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.