From ea2c5d5168e56bb45a8839ee2cab890cbdbd873a Mon Sep 17 00:00:00 2001 From: Luc Provoost Date: Thu, 6 Aug 2020 14:11:05 +0200 Subject: fix: IPV6 packet generation, packet loss reporting UDP and IP packet length and source UDP port and destination UDP port were wrongly set for IPv6 packets. In the *.test files, there is now an optional boolean field (ipv6) in the [TestParameters] section. When set to true, the generator will use the IPv6 packet layout to place the right values at the proper offset in the packet. If not present or set to false, the IPv4 layout will be used. Note also that packet size needs to be at least 84 bytes for IPV6 traffic since we need space for latency and other information in each packet. Packet loss ratio is now printed as a percentage of the total packets sent. Change-Id: I2136e87f3032348ae95b69052be7da8461c6303c Signed-off-by: Luc Provoost --- .../helper-scripts/rapid/TST009_Throughput.test | 2 +- VNFs/DPPD-PROX/helper-scripts/rapid/format.yaml | 6 ++- VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test | 10 ++-- VNFs/DPPD-PROX/helper-scripts/rapid/machine.map | 3 ++ .../helper-scripts/rapid/params_rapid.yaml | 2 + .../rapid/rapid_generator_machine.py | 63 +++++++++++++++------- .../helper-scripts/rapid/rapid_machine.py | 2 +- .../DPPD-PROX/helper-scripts/rapid/rapid_parser.py | 5 +- VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py | 2 +- VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py | 3 +- 10 files changed, 70 insertions(+), 28 deletions(-) (limited to 'VNFs/DPPD-PROX/helper-scripts') 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,5 +1,7 @@ ;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 @@ -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<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") -- cgit 1.2.3-korg