summaryrefslogtreecommitdiffstats
path: root/VNFs
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2020-09-23 14:45:23 +0200
committerLuc Provoost <luc.provoost@intel.com>2020-09-29 10:15:14 +0200
commit0d1b97e647224d3d977186523d45555bc819f42a (patch)
tree278e9ad8dbc3262dc07ea6b0a77defdc08cf7b4a /VNFs
parent80dfeb5c734cc4d681f467e853a541a8a91fe1cf (diff)
New PROX version, background traffic reporting
deploycentostools.sh is now installing a recent PROX version. When using background traffic, the tool is also reporting the total traffic that was handled by the NFVi stack, including foreground & background traffic. The use of the prox_socket and prox_launch_exit was also broken in a previous release and is now fixed. When setting prox_socket to false for a PROX instance, we will not create a socket connection to control that PROX instance. Setting this option to false is not meaningful for the generator PROX instances since we would not be able to control the behavior of the PROX generator during the test. You could use the generator against another non-PROX instance and then set prox_socket to false for that non-PROX instance. Default is true. prox_launch_exit is used to start and stop the PROX program inside the instance. Default is true. This is useful in case you want to start PROX manually to be able to inspect the PROX UI, but at the same time, let the rapid scripts control the testing. Change-Id: Ib5aa809f4be201859542769f5f55f4989dad97ef Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs')
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh4
-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.cfg5
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg1
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py7
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_defaults.py2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py8
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py4
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_impairtest.py2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py43
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py51
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py2
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py34
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg2
18 files changed, 89 insertions, 86 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
index 8d627e5e..e488f352 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
@@ -50,7 +50,7 @@ def main():
rapid_stack_params = {}
RapidStackManager.parse_config(rapid_stack_params)
log_file = 'CREATE{}.log'.format(rapid_stack_params['stack_name'])
- RapidLog.log_init(log_file, 'DEBUG', 'INFO', '2020.05.05')
+ RapidLog.log_init(log_file, 'DEBUG', 'INFO', '2020.09.23')
#cloud_name = 'openstackL6'
#stack_name = 'rapid'
#heat_template = 'openstack-rapid.yaml'
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh b/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh
index f90283ef..47ddaaaa 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh
@@ -18,11 +18,11 @@
# Directory for package build
BUILD_DIR="/opt/rapid"
DPDK_VERSION="20.05"
-PROX_COMMIT="ba394f91"
+PROX_COMMIT="80dfeb5c734cc4d681f467e853a541a8a91fe1cf"
PROX_CHECKOUT="git checkout ${PROX_COMMIT}"
## Next line is overruling the PROX_COMMIT and will replace the version with a very specific patch. Should be commented out
## if you want to use a committed version of PROX with the COMMIT ID specified above
-##Following line has the commit for testing IMIX, IPV6, ... It is the merge of all PROX commits on May 27th 2020
+## As an example: Following line has the commit for testing IMIX, IPV6, ... It is the merge of all PROX commits on May 27th 2020
#PROX_CHECKOUT="git fetch \"https://gerrit.opnfv.org/gerrit/samplevnf\" refs/changes/23/70223/1 && git checkout FETCH_HEAD"
MULTI_BUFFER_LIB_VER="0.52"
export RTE_SDK="${BUILD_DIR}/dpdk-${DPDK_VERSION}"
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/gen.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/gen.cfg
index 1827395f..717915d1 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/gen.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/gen.cfg
@@ -28,7 +28,7 @@ rx desc=2048
tx desc=2048
vlan=yes
vdev=gen_tap
-local ipv4=${local_ip1}
+local ipv4=${local_ip1}/24
[variables]
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/gen_gw.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/gen_gw.cfg
index fc3b6a68..f53b41d5 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/gen_gw.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/gen_gw.cfg
@@ -28,7 +28,7 @@ rx desc=2048
tx desc=2048
vlan=yes
vdev=gen_tap
-local ipv4=${local_ip1}
+local ipv4=${local_ip1}/24
[variables]
$mbs=8
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/impair.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/impair.cfg
index d9d86281..cb3f349e 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/impair.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/impair.cfg
@@ -29,7 +29,7 @@ rx desc=2048
tx desc=2048
vlan=yes
vdev=impair_tap
-local ipv4=${local_ip1}
+local ipv4=${local_ip1}/24
[defaults]
@@ -49,4 +49,5 @@ sub mode=l3
rx port=if0
tx port=if0
delay us=1000
-probability=100
+proba delay=50
+proba no drop=100
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg
index 74ac20e2..e0942212 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen.cfg
@@ -48,8 +48,6 @@ tx port=p0
bps=1250000000
pkt inline=${dest_hex_mac1} 00 00 00 00 00 00 08 00 45 00 00 2e 00 01 00 00 40 11 f7 7d ${local_hex_ip1} ${dest_hex_ip1} 0b b8 0b b9 00 1a 55 7b
pkt size=60
-;gateway ipv4=${gw_ip1}
-local ipv4=${local_ip1}
min bulk size=$mbs
max bulk size=16
drop=yes
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg
index ff9ef8b8..1a8dddb3 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/l2gen_bare.cfg
@@ -48,7 +48,6 @@ tx port=p0
bps=1250000000
pkt inline=${dest_hex_mac1} 00 00 00 00 00 00 08 00 45 00 00 2e 00 01 00 00 40 11 f7 7d ${local_hex_ip1} ${dest_hex_ip1} 0b b8 0b b9 00 1a 55 7b
pkt size=60
-local ipv4=${local_ip1}
min bulk size=$mbs
max bulk size=64
drop=yes
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml b/VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml
index 941fba03..6b1d863c 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml
@@ -1,7 +1,7 @@
parameters:
public_net_name: admin_floating_net
data_net_name: dataplane-network
- PROX_image: testrapidVM
+ PROX_image: rapidVM
my_availability_zone: nova
security_group: prox_security_group
PROXVM_count: 4
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py b/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py
index a6dd4bcb..586731eb 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py
@@ -34,9 +34,6 @@ class prox_ctrl(object):
self._user = user
self._proxsock = []
- def __del__(self):
- self.close()
-
def ip(self):
return self._ip
@@ -89,7 +86,6 @@ class prox_ctrl(object):
return sock
def close(self):
- """Must be called before program termination."""
for sock in self._proxsock:
sock.quit()
@@ -187,9 +183,6 @@ class prox_sock(object):
self._sock = sock
self._rcvd = b''
- def __del__(self):
- self.quit()
-
def quit(self):
if self._sock is not None:
self._send('quit')
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_defaults.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_defaults.py
index 2aa1acc1..404e6e32 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_defaults.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_defaults.py
@@ -21,7 +21,7 @@ class RapidDefaults(object):
Class to define the test defaults
"""
test_params = {
- 'version' : '2020.04.15', # Please do NOT change, used for debugging
+ 'version' : '2020.09.23', # Please do NOT change, used for debugging
'environment_file' : 'rapid.env', #Default string for environment
'test_file' : 'basicrapid.test', #Default string for test
'machine_map_file' : 'machine.map', #Default string for machine map file
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
index e5405081..ca3b5a2f 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
@@ -138,7 +138,7 @@ class FlowSizeTest(RapidTest):
self.set_background_speed(self.background_machines, speed)
self.start_background_traffic(self.background_machines)
# Get statistics now that the generation is stable and initial ARP messages are dealt with
- pps_req_tx,pps_tx,pps_sut_tx,pps_rx,lat_avg,lat_perc , lat_perc_max, lat_max, abs_tx,abs_rx,abs_dropped, abs_tx_fail, drop_rate, lat_min, lat_used, r, actual_duration = self.run_iteration(float(self.test['runtime']),flow_number,size,speed)
+ pps_req_tx,pps_tx,pps_sut_tx,pps_rx,lat_avg,lat_perc , lat_perc_max, lat_max, abs_tx,abs_rx,abs_dropped, abs_tx_fail, drop_rate, lat_min, lat_used, r, actual_duration, avg_bg_rate = self.run_iteration(float(self.test['runtime']),flow_number,size,speed)
self.stop_background_traffic(self.background_machines)
if r > 1:
retry_warning = bcolors.WARNING + ' {:1} retries needed'.format(r) + bcolors.ENDC
@@ -164,6 +164,7 @@ class FlowSizeTest(RapidTest):
enddrop_rate = drop_rate
endabs_tx = abs_tx
endabs_rx = abs_rx
+ endavg_bg_rate = avg_bg_rate
if lat_warning or retry_warning:
endwarning = '| | {:177.177} |'.format(retry_warning + lat_warning)
success = True
@@ -196,6 +197,7 @@ class FlowSizeTest(RapidTest):
enddrop_rate = drop_rate
endabs_tx = abs_tx
endabs_rx = abs_rx
+ endavg_bg_rate = avg_bg_rate
if lat_warning or gen_warning or retry_warning:
endwarning = '| | {:186.186} |'.format(retry_warning + lat_warning + gen_warning)
success = True
@@ -241,6 +243,10 @@ class FlowSizeTest(RapidTest):
TestPassed = False
speed_prefix = lat_avg_prefix = lat_perc_prefix = lat_max_prefix = abs_drop_rate_prefix = drop_rate_prefix = bcolors.ENDC
RapidLog.info(self.report_result(flow_number,size,endspeed,endpps_req_tx,endpps_tx,endpps_sut_tx,endpps_rx,endlat_avg,endlat_perc,endlat_perc_max,endlat_max,endabs_tx,endabs_rx,endabs_dropped,actual_duration,speed_prefix,lat_avg_prefix,lat_perc_prefix,lat_max_prefix,abs_drop_rate_prefix,drop_rate_prefix))
+ if endavg_bg_rate:
+ tot_avg_rx_rate = endpps_rx + (endavg_bg_rate * len(self.background_machines))
+ endtotaltrafficrate = '| | Total amount of traffic received by all generators during this test: {:>4.3f} Gb/s {:7.3f} Mpps {} |'.format(RapidTest.get_speed(tot_avg_rx_rate,size) , tot_avg_rx_rate, ' '*84)
+ RapidLog.info (endtotaltrafficrate)
if endwarning:
RapidLog.info (endwarning)
RapidLog.info("+--------+------------------+-------------+-------------+-------------+------------------------+----------+----------+----------+-----------+-----------+-----------+-----------+-------+----+")
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
index 1cd1fa33..dee40d94 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
@@ -103,10 +103,10 @@ class RapidGeneratorMachine(RapidMachine):
appendix = appendix + 'heartbeat="60"\n'
super().generate_lua(vim, appendix)
- def start_prox(self):
+ def start_prox(self, configonly=False):
# Start the generator with the -e option so that the cores don't
# start automatically
- super().start_prox('-e')
+ super().start_prox(configonly, '-e')
def set_generator_speed(self, speed):
# The assumption is that we only use task 0 for generating
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_impairtest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_impairtest.py
index 0f925552..74d624d5 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_impairtest.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_impairtest.py
@@ -57,7 +57,7 @@ class ImpairTest(RapidTest):
sys.stdout.flush()
time.sleep(1)
# Get statistics now that the generation is stable and NO ARP messages any more
- pps_req_tx,pps_tx,pps_sut_tx,pps_rx,lat_avg, lat_perc, lat_perc_max, lat_max, abs_tx, abs_rx, abs_dropped, abs_tx_fail, drop_rate, lat_min, lat_used, r, actual_duration = self.run_iteration(float(self.test['runtime']),flow_number,size,speed)
+ pps_req_tx,pps_tx,pps_sut_tx,pps_rx,lat_avg, lat_perc, lat_perc_max, lat_max, abs_tx, abs_rx, abs_dropped, abs_tx_fail, drop_rate, lat_min, lat_used, r, actual_duration, _ = self.run_iteration(float(self.test['runtime']),flow_number,size,speed)
# Drop rate is expressed in percentage. lat_used is a ratio (0 to 1). The sum of these 2 should be 100%.
# If the sum is lower than 95, it means that more than 5% of the latency measurements where dropped for accuracy reasons.
if (drop_rate + lat_used * 100) < 95:
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py
index a9f53083..4a0bcb82 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py
@@ -48,12 +48,13 @@ class RapidMachine(object):
self.vim = vim
def __del__(self):
- self._client.scp_get('/prox.log', './{}.prox.log'.format(self.name))
+ if self.machine_params['prox_socket']:
+ self._client.scp_get('/prox.log', './{}.prox.log'.format(self.name))
def get_cores(self):
return (self.machine_params['cores'])
- def devbind(self):
+ def devbind(self, configonly):
# Script to bind the right network interface to the poll mode driver
for index, dp_port in enumerate(self.dp_ports, start = 1):
DevBindFileName = self.rundir + '/devbind-{}-port{}.sh'.format(self.ip, index)
@@ -61,8 +62,9 @@ class RapidMachine(object):
cmd = 'sed -i \'s/MACADDRESS/' + dp_port['mac'] + '/\' ' + DevBindFileName
result = self._client.run_cmd(cmd)
RapidLog.debug('devbind.sh MAC updated for port {} on {} {}'.format(index, self.name, result))
- result = self._client.run_cmd(DevBindFileName)
- RapidLog.debug('devbind.sh running for port {} on {} {}'.format(index, self.name, result))
+ if ((not configonly) and self.machine_params['prox_launch_exit']):
+ result = self._client.run_cmd(DevBindFileName)
+ RapidLog.debug('devbind.sh running for port {} on {} {}'.format(index, self.name, result))
def generate_lua(self, vim, appendix = ''):
PROXConfigfile = open (self.machine_params['config_file'], 'r')
@@ -93,25 +95,28 @@ class RapidMachine(object):
self._client.scp_put(self.LuaFileName, self.rundir + '/parameters.lua')
self._client.scp_put('helper.lua', self.rundir + '/helper.lua')
- def start_prox(self, autostart=''):
- self._client = prox_ctrl(self.ip, self.key, self.user)
- self._client.connect()
- if self.vim in ['OpenStack']:
- self.devbind()
- self.generate_lua(self.vim)
- self._client.scp_put(self.machine_params['config_file'], '{}/{}'.format(self.rundir, self.machine_params['config_file']))
- if self.machine_params['prox_launch_exit']:
- cmd = 'sudo {}/prox {} -t -o cli -f {}/{}'.format(self.rundir, autostart, self.rundir, self.machine_params['config_file'])
- RapidLog.debug("Starting PROX on {}: {}".format(self.name, cmd))
- result = self._client.run_cmd(cmd, 'PROX Testing on {}'.format(self.name))
- #RapidLog.debug("Finished PROX on {}: {}, {}".format(self.name, cmd, result))
- RapidLog.debug("Finished PROX on {}: {}".format(self.name, cmd))
+ def start_prox(self, configonly=False, autostart=''):
+ if self.machine_params['prox_socket']:
+ self._client = prox_ctrl(self.ip, self.key, self.user)
+ self._client.connect()
+ if self.vim in ['OpenStack']:
+ self.devbind(configonly)
+ self.generate_lua(self.vim)
+ self._client.scp_put(self.machine_params['config_file'], '{}/{}'.format(self.rundir, self.machine_params['config_file']))
+ if ((not configonly) and self.machine_params['prox_launch_exit']):
+ cmd = 'sudo {}/prox {} -t -o cli -f {}/{}'.format(self.rundir, autostart, self.rundir, self.machine_params['config_file'])
+ RapidLog.debug("Starting PROX on {}: {}".format(self.name, cmd))
+ result = self._client.run_cmd(cmd, 'PROX Testing on {}'.format(self.name))
+ #RapidLog.debug("Finished PROX on {}: {}, {}".format(self.name, cmd, result))
+ RapidLog.debug("Finished PROX on {}: {}".format(self.name, cmd))
def close_prox(self):
- self.socket.quit()
+ if self.machine_params['prox_socket'] and self.machine_params['prox_launch_exit']:
+ self.socket.quit()
def connect_prox(self):
- self.socket = self._client.connect_socket()
+ if self.machine_params['prox_socket']:
+ self.socket = self._client.connect_socket()
def start(self):
self.socket.start(self.get_cores())
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
index 289d8366..af595704 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
@@ -96,33 +96,30 @@ class RapidConfigParser(object):
machine = {}
for test_machine in range(1, test_params['required_number_of_test_machines']+1):
machine.clear()
- if not(testconfig.has_option('TestM%d'%test_machine, 'prox_socket')
- and not testconfig.getboolean('TestM%d'%test_machine,
- 'prox_socket')):
- section = 'TestM%d'%test_machine
- options = testconfig.options(section)
- for option in options:
- if option in ['prox_socket','prox_launch_exit','monitor']:
- machine[option] = testconfig.getboolean(section, option)
- elif option in ['cores', 'gencores','latcores']:
- machine[option] = ast.literal_eval(testconfig.get(
- section, option))
- elif option in ['bucket_size_exp']:
- machine[option] = int(testconfig.get(section, option))
- else:
- machine[option] = testconfig.get(section, option)
- for key in ['prox_socket','prox_launch_exit']:
- if key not in machine.keys():
- machine[key] = True
- if 'monitor' not in machine.keys():
- machine['monitor'] = True
- index = int(machine_map.get('TestM%d'%test_machine,
- 'machine_index'))
- section = 'M%d'%index
- options = config.options(section)
- for option in options:
- machine[option] = config.get(section, option)
- machines.append(dict(machine))
+ section = 'TestM%d'%test_machine
+ options = testconfig.options(section)
+ for option in options:
+ if option in ['prox_socket','prox_launch_exit','monitor']:
+ machine[option] = testconfig.getboolean(section, option)
+ elif option in ['cores', 'gencores','latcores']:
+ machine[option] = ast.literal_eval(testconfig.get(
+ section, option))
+ elif option in ['bucket_size_exp']:
+ machine[option] = int(testconfig.get(section, option))
+ else:
+ machine[option] = testconfig.get(section, option)
+ for key in ['prox_socket','prox_launch_exit']:
+ if key not in machine.keys():
+ machine[key] = True
+ if 'monitor' not in machine.keys():
+ machine['monitor'] = True
+ index = int(machine_map.get('TestM%d'%test_machine,
+ 'machine_index'))
+ section = 'M%d'%index
+ options = config.options(section)
+ for option in options:
+ machine[option] = config.get(section, option)
+ machines.append(dict(machine))
for machine in machines:
dp_ports = []
if 'dest_vm' in machine.keys():
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
index 6654d361..cdacb801 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
@@ -433,4 +433,4 @@ class RapidTest(object):
drop_rate = 100.0*tot_dp_drop/dp_tx
if ((drop_rate < self.test['drop_rate_threshold']) or (tot_dp_drop == self.test['drop_rate_threshold'] ==0) or (tot_dp_drop > self.test['maxz'])):
break
- return(pps_req_tx,pps_tx,pps_sut_tx,pps_rx,lat_avg,percentile,percentile_max,lat_max,dp_tx,dp_rx,tot_dp_drop,(t4_tx_fail - t1_tx_fail),drop_rate,lat_min,used_avg,r,tot_core_measurement_duration)
+ return(pps_req_tx,pps_tx,pps_sut_tx,pps_rx,lat_avg,percentile,percentile_max,lat_max,dp_tx,dp_rx,tot_dp_drop,(t4_tx_fail - t1_tx_fail),drop_rate,lat_min,used_avg,r,tot_core_measurement_duration,avg_bg_rate)
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
index 2c18b232..8e879a06 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
@@ -42,18 +42,21 @@ class RapidTestManager(object):
"""
RapidTestManager Class
"""
+ def __del__(self):
+ for machine in self.machines:
+ machine.close_prox()
+
@staticmethod
def get_defaults():
return (RapidDefaults.test_params)
- @staticmethod
- def run_tests(test_params):
+ def run_tests(self, test_params):
test_params = RapidConfigParser.parse_config(test_params)
RapidLog.debug(test_params)
monitor_gen = monitor_sut = False
background_machines = []
sut_machine = gen_machine = None
- machines = []
+ self.machines = []
for machine_params in test_params['machines']:
if 'gencores' in machine_params.keys():
machine = RapidGeneratorMachine(test_params['key'],
@@ -79,14 +82,16 @@ class RapidTestManager(object):
raise Exception("Can only monitor 1 sut")
else:
monitor_sut = True
- sut_machine = machine
- machines.append(machine)
+ if machine_params['prox_socket']:
+ sut_machine = machine
+ self.machines.append(machine)
+ prox_executor = concurrent.futures.ThreadPoolExecutor(max_workers=len(self.machines))
+ self.future_to_prox = {prox_executor.submit(machine.start_prox,test_params['configonly']): machine for machine in self.machines}
if test_params['configonly']:
+ concurrent.futures.wait(self.future_to_prox,return_when=ALL_COMPLETED)
sys.exit()
- prox_executor = concurrent.futures.ThreadPoolExecutor(max_workers=len(machines))
- future_to_prox = {prox_executor.submit(machine.start_prox): machine for machine in machines}
- with concurrent.futures.ThreadPoolExecutor(max_workers=len(machines)) as executor:
- future_to_connect_prox = {executor.submit(machine.connect_prox): machine for machine in machines}
+ with concurrent.futures.ThreadPoolExecutor(max_workers=len(self.machines)) as executor:
+ future_to_connect_prox = {executor.submit(machine.connect_prox): machine for machine in self.machines}
concurrent.futures.wait(future_to_connect_prox,return_when=ALL_COMPLETED)
result = True
for test_param in test_params['tests']:
@@ -101,11 +106,11 @@ class RapidTestManager(object):
elif test_param['test'] in ['corestats']:
test = CoreStatsTest(test_param, test_params['runtime'],
test_params['TestName'],
- test_params['environment_file'], machines)
+ test_params['environment_file'], self.machines)
elif test_param['test'] in ['portstats']:
test = PortStatsTest(test_param, test_params['runtime'],
test_params['TestName'],
- test_params['environment_file'], machines)
+ test_params['environment_file'], self.machines)
elif test_param['test'] in ['impairtest']:
test = ImpairTest(test_param, test_params['lat_percentile'],
test_params['runtime'],
@@ -115,7 +120,7 @@ class RapidTestManager(object):
elif test_param['test'] in ['irqtest']:
test = IrqTest(test_param, test_params['runtime'],
test_params['TestName'],
- test_params['environment_file'], machines)
+ test_params['environment_file'], self.machines)
elif test_param['test'] in ['warmuptest']:
test = WarmupTest(test_param, gen_machine)
else:
@@ -124,8 +129,6 @@ class RapidTestManager(object):
single_test_result = test.run()
if not single_test_result:
result = False
- for machine in machines:
- machine.close_prox()
return (result)
def main():
@@ -139,7 +142,8 @@ def main():
test_params['test_file'])
RapidLog.log_init(log_file, test_params['loglevel'],
test_params['screenloglevel'] , test_params['version'] )
- test_result = RapidTestManager.run_tests(test_params)
+ test_manager = RapidTestManager()
+ test_result = test_manager.run_tests(test_params)
RapidLog.info('Test result is : {}'.format(test_result))
if __name__ == "__main__":
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg
index 0cca80c6..4463f833 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/swap.cfg
@@ -27,7 +27,7 @@ name=if0
mac=hardware
vlan=yes
vdev=swap_tap
-local ipv4=${local_ip1}
+local ipv4=${local_ip1}/24
[defaults]
mempool size=8K