summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX
diff options
context:
space:
mode:
Diffstat (limited to 'VNFs/DPPD-PROX')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/TST009_Throughput.test2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/format.yaml6
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test10
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/machine.map3
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py63
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py2
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py5
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py2
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py3
10 files changed, 70 insertions, 28 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/TST009_Throughput.test b/VNFs/DPPD-PROX/helper-scripts/rapid/TST009_Throughput.test
index d931faa8..ce9ba72b 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/TST009_Throughput.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/TST009_Throughput.test
@@ -15,7 +15,7 @@
##
[TestParameters]
-name = TST009Testing
+name = Rapid_ETSINFV_TST009
number_of_tests = 2
total_number_of_test_machines = 2
lat_percentile = 99
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/format.yaml b/VNFs/DPPD-PROX/helper-scripts/rapid/format.yaml
index a6e5b0c2..1ac48abb 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/format.yaml
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/format.yaml
@@ -1,6 +1,8 @@
;Format: PushGateway
;Format: Xtesting
;URL:
+ part1: http://testresults.opnfv.org/test/api/v1/results
+;URL:
part1: http://192.168.36.61:9091/metrics/job/
part2: test
part3: /instance/
@@ -20,8 +22,8 @@
PacketsReceived: PacketsReceived
PacketsLost: PacketsLost
rapid_flowsizetest:
- project_name: "vsperf"
- scenario: "vsperf"
+ project_name: "cirv"
+ scenario: "rapid"
start_date: start_date
stop_date: stop_date
case_name: test
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test b/VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test
index 966c073a..b9f00f71 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test
@@ -19,6 +19,7 @@ name = BasicSwapTesting
number_of_tests = 2
total_number_of_test_machines = 2
lat_percentile = 99
+ipv6 = True
[TestM1]
name = Generator
@@ -38,7 +39,7 @@ cores = [1]
[test1]
test=warmuptest
flowsize=512
-imix=[64]
+imix=[84]
warmupspeed=1
warmuptime=2
@@ -49,8 +50,11 @@ test=flowsizetest
# all combinations must be meeting the same threshold
# The threshold is expressed in Mpps
pass_threshold=0.1
-imixs=[[64], [128]]
-# the number of flows in the list need to be powers of 2, max 2^30
+# DO NOT USE IMIX FOR IPV6 TESTING
+# PACKET SIZE NEEDS TO BE AT LEAST 84 (66 + 18) FOR IPV6
+# 18 bytes needed for UDP LATENCY AND COUNTER CONTENT
+imixs=[[84],[250]]
+# Number of flows in the list need to be powers of 2, max 2^30
# If not a power of 2, we will use the lowest power of 2 that is larger than
# the requested number of flows. e.g. 9 will result in 16 flows
flows=[64,500000]
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/machine.map b/VNFs/DPPD-PROX/helper-scripts/rapid/machine.map
index 1f7ce99d..38bc5a7e 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/machine.map
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/machine.map
@@ -28,3 +28,6 @@ machine_index=2
[TestM3]
machine_index=3
+
+[TestM4]
+machine_index=4
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml b/VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml
index 6d48d19e..941fba03 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/params_rapid.yaml
@@ -4,3 +4,5 @@ parameters:
PROX_image: testrapidVM
my_availability_zone: nova
security_group: prox_security_group
+ PROXVM_count: 4
+ PROX2VM_count: 0
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 8d7b4e33..1cd1fa33 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
@@ -35,7 +35,7 @@ class RandomPortBits(object):
# throw exeption since we need the first bit to be 1
# Otherwise, the randomization could results in all 0's
# and that might be an invalid UDP port and result in
- # packets begin discarded
+ # packets being discarded
src_number_of_random_bits = number_of_random_bits // 2
dst_number_of_random_bits = (number_of_random_bits -
src_number_of_random_bits)
@@ -43,12 +43,38 @@ class RandomPortBits(object):
src_number_of_random_bits)
dst_port_bitmap = '1000000000000000'.replace ('0','X',
dst_number_of_random_bits)
- return [src_port_bitmap, dst_port_bitmap, 1<<number_of_random_bits]
+ return [src_port_bitmap, dst_port_bitmap, 1 << number_of_random_bits]
class RapidGeneratorMachine(RapidMachine):
"""
- Class to deal with rapid configuration files
+ Class to deal with a generator PROX instance (VM, bare metal, container)
"""
+ def __init__(self, key, user, vim, rundir, machine_params, ipv6):
+ mac_address_size = 6
+ ethertype_size = 2
+ FCS_size = 4
+ if ipv6:
+ ip_header_size = 40
+ self.ip_length_offset = 18
+ # In IPV6, the IP size is the size of the IP content
+ self.frame_size_minus_ip_size = (2 * mac_address_size +
+ ethertype_size + ip_header_size + FCS_size)
+ else:
+ ip_header_size = 20
+ self.ip_length_offset = 16
+ # In IPV4, the IP size is the size of the IP header + IP content
+ self.frame_size_minus_ip_size = (2 * mac_address_size +
+ ethertype_size + FCS_size)
+ self.frame_size_minus_udp_header_and_content = (2 * mac_address_size +
+ ethertype_size + ip_header_size + FCS_size )
+ udp_header_start_offset = (2 * mac_address_size + ethertype_size +
+ ip_header_size)
+ self.udp_source_port_offset = udp_header_start_offset
+ self.udp_dest_port_offset = udp_header_start_offset + 2
+ self.udp_length_offset = udp_header_start_offset + 4
+ self.ipv6 = ipv6
+ super().__init__(key, user, vim, rundir, machine_params)
+
def get_cores(self):
return (self.machine_params['gencores'] +
self.machine_params['latcores'])
@@ -62,9 +88,8 @@ class RapidGeneratorMachine(RapidMachine):
for index, gw_ip in enumerate(self.machine_params['gw_ips'],
start = 1):
appendix = appendix + 'gw_ip{}="{}"\n'.format(index, gw_ip)
- appendix = (appendix +
- 'gw_hex_ip{}=convertIPToHex(gw_ip{})\n'.format(index,
- index))
+ appendix = (appendix + 'gw_hex_ip{}=convertIPToHex(gw_ip{})\n'.
+ format(index, index))
if 'bucket_size_exp' in self.machine_params.keys():
self.bucket_size_exp = self.machine_params['bucket_size_exp']
else:
@@ -100,15 +125,17 @@ class RapidGeneratorMachine(RapidMachine):
# The set_size function takes the PROX packet size as a parameter
self.socket.set_size(self.machine_params['gencores'], 0,
imix_frame_sizes[0] - 4)
- # 18 is the difference between the frame size and IP size =
- # size of (MAC addresses, ethertype and FCS)
- self.socket.set_value(self.machine_params['gencores'], 0, 16,
- imix_frame_sizes[0] - 18, 2)
- # 38 is the difference between the frame size and UDP size =
- # 18 + size of IP header (=20)
- self.socket.set_value(self.machine_params['gencores'], 0, 38,
- imix_frame_sizes[0] - 38, 2)
+ # Writing length in the ip header
+ self.socket.set_value(self.machine_params['gencores'], 0,
+ self.ip_length_offset, imix_frame_sizes[0] -
+ self.frame_size_minus_ip_size, 2)
+ # Writing length in the udp header
+ self.socket.set_value(self.machine_params['gencores'], 0,
+ self.udp_length_offset, imix_frame_sizes[0] -
+ self.frame_size_minus_udp_header_and_content, 2)
else:
+ if self.ipv6:
+ RapidLog.critical('IMIX not supported for IPV6')
prox_sizes = [frame_size - 4 for frame_size in imix_frame_sizes]
self.socket.set_imix(self.machine_params['gencores'], 0,
prox_sizes)
@@ -116,10 +143,10 @@ class RapidGeneratorMachine(RapidMachine):
def set_flows(self, number_of_flows):
source_port, destination_port, actualflows = RandomPortBits.get_bitmap(
number_of_flows)
- self.socket.set_random(self.machine_params['gencores'],0,34,
- source_port,2)
- self.socket.set_random(self.machine_params['gencores'],0,36,
- destination_port,2)
+ self.socket.set_random(self.machine_params['gencores'],0,
+ self.udp_source_port_offset, source_port,2)
+ self.socket.set_random(self.machine_params['gencores'],0,
+ self.udp_dest_port_offset, destination_port,2)
return actualflows
def start_gen_cores(self):
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py
index 7a5ebd4b..fc3e291f 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py
@@ -22,7 +22,7 @@ import re
class RapidMachine(object):
"""
- Class to deal with rapid configuration files
+ Class to deal with a PROX instance (VM, bare metal, container)
"""
def __init__(self, key, user, vim, rundir, machine_params):
self.name = machine_params['name']
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
index bdf27032..5c79c2c9 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py
@@ -45,6 +45,10 @@ class RapidConfigParser(object):
test_params['lat_percentile'] = 0.99
RapidLog.info('Latency percentile at {:.0f}%'.format(
test_params['lat_percentile']*100))
+ if testconfig.has_option('TestParameters', 'ipv6'):
+ test_params['ipv6'] = testconfig.getboolean('TestParameters','ipv6')
+ else:
+ test_params['ipv6'] = False
config = configparser.RawConfigParser()
config.read(test_params['environment_file'])
test_params['vim_type'] = config.get('Varia', 'vim')
@@ -62,7 +66,6 @@ class RapidConfigParser(object):
if option in ['imix','imixs','flows']:
test[option] = ast.literal_eval(testconfig.get(section,
option))
-# test[option] = [int(i) for i in test[option]]
elif option in ['maxframespersecondallingress','stepsize',
'flowsize']:
test[option] = int(testconfig.get(section, option))
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
index 3be07c21..9cbc4de9 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py
@@ -188,7 +188,7 @@ class RapidTest(object):
+ ' us | ' + '{:>9.0f}'.format(tx) + ' | {:>9.0f}'.format(rx) +
' | '+ abs_drop_rate_prefix+ '{:>9.0f}'.format(tx-rx) +
tot_drop_str +drop_rate_prefix +
- '{:>5.2f}'.format(old_div(float(tx-rx),tx)) + bcolors.ENDC +
+ '{:>5.2f}'.format(100*old_div(float(tx-rx),tx)) + bcolors.ENDC +
' |' + elapsed_time_str)
def run_iteration(self, requested_duration, flow_number, size, speed):
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
index d3885bf7..023b4bc3 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py
@@ -56,7 +56,8 @@ class RapidTestManager(object):
if 'gencores' in machine_params.keys():
machine = RapidGeneratorMachine(test_params['key'],
test_params['user'], test_params['vim_type'],
- test_params['rundir'], machine_params)
+ test_params['rundir'], machine_params,
+ test_params['ipv6'])
if machine_params['monitor']:
if monitor_gen:
RapidLog.exception("Can only monitor 1 generator")