From 8442f6a8ce0962d818b7cd800150980c65983719 Mon Sep 17 00:00:00 2001 From: Luc Provoost Date: Wed, 24 Feb 2021 11:51:22 +0100 Subject: Preparation for packet mis-ordering stats Changed PROX and the python scripts so that the "lat all stats" command also returns the mis_ordered, extent and duplicate statistics. In order to make this work properly, we need now to also stop and restart the latency cores, every time we stop and start the generator cores, since the sequence numbers are reinitialised every time we start the generator core. Change-Id: Ic4212a989c8ee9d0f026a34ca63a08b982c32b71 Signed-off-by: Luc Provoost --- .../helper-scripts/rapid/rapid_generator_machine.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py') 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 074d4f7e..9f1af503 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py @@ -74,6 +74,10 @@ class RapidGeneratorMachine(RapidMachine): self.udp_dest_port_offset = udp_header_start_offset + 2 self.udp_length_offset = udp_header_start_offset + 4 self.ipv6 = ipv6 + if 'bucket_size_exp' in machine_params.keys(): + self.bucket_size_exp = machine_params['bucket_size_exp'] + else: + self.bucket_size_exp = 11 super().__init__(key, user, vim, rundir, resultsdir, machine_params, configonly) @@ -99,7 +103,7 @@ class RapidGeneratorMachine(RapidMachine): RapidLog.debug('{} ({}): latcores {} remapped to {}'.format(self.name, self.ip, self.machine_params['latcores'], cpus_remapped)) self.machine_params['latcores'] = cpus_remapped - def generate_lua(self, vim, prox_config_file): + def generate_lua(self): appendix = 'gencores="%s"\n'% ','.join(map(str, self.machine_params['gencores'])) appendix = appendix + 'latcores="%s"\n'% ','.join(map(str, @@ -110,10 +114,6 @@ class RapidGeneratorMachine(RapidMachine): appendix = appendix + 'gw_ip{}="{}"\n'.format(index, gw_ip) 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: - self.bucket_size_exp = 11 appendix = (appendix + 'bucket_size_exp="{}"\n'.format(self.bucket_size_exp)) if 'heartbeat' in self.machine_params.keys(): @@ -121,7 +121,7 @@ class RapidGeneratorMachine(RapidMachine): 'heartbeat="%s"\n'% self.machine_params['heartbeat']) else: appendix = appendix + 'heartbeat="60"\n' - super().generate_lua(vim, prox_config_file, appendix) + super().generate_lua(appendix) def start_prox(self): # Start the generator with the -e option so that the cores don't -- cgit 1.2.3-korg