diff options
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid')
4 files changed, 134 insertions, 10 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/configs/swap_gw.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/configs/swap_gw.cfg new file mode 100644 index 00000000..abadfa64 --- /dev/null +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/configs/swap_gw.cfg @@ -0,0 +1,50 @@ +;; +;; 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. +;; + +[lua] +dofile("parameters.lua") + +[eal options] +-n=4 ; force number of memory channels +no-output=no ; disable DPDK debug output +eal=--proc-type auto ${eal} + +[port 0] +name=if0 +mac=hardware +vlan=yes +vdev=swap_tap +local ipv4=${local_ip1} + +[defaults] +mempool size=8K + +[global] +name=${name} + +[core $mcore] +mode=master + +[core $cores] +name=swap +task=0 +mode=swap +sub mode=l3 +rx port=if0 +tx port=if0 +gateway ipv4=${gw_ip1} +drop=no +;arp update time=1 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 9f1af503..5d6916a7 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py @@ -108,12 +108,6 @@ class RapidGeneratorMachine(RapidMachine): self.machine_params['gencores'])) appendix = appendix + 'latcores="%s"\n'% ','.join(map(str, self.machine_params['latcores'])) - if 'gw_vm' in self.machine_params.keys(): - 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 + 'bucket_size_exp="{}"\n'.format(self.bucket_size_exp)) if 'heartbeat' in self.machine_params.keys(): diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py index e97b255a..d0ce8c14 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py @@ -50,10 +50,11 @@ class RapidMachine(object): self.machine_params = machine_params self.vim = vim self.cpu_mapping = None - PROXConfigfile = open (self.machine_params['config_file'], 'r') - PROXConfig = PROXConfigfile.read() - PROXConfigfile.close() - self.all_tasks_for_this_cfg = set(re.findall("task\s*=\s*(\d+)",PROXConfig)) + if 'config_file' in self.machine_params.keys(): + PROXConfigfile = open (self.machine_params['config_file'], 'r') + PROXConfig = PROXConfigfile.read() + PROXConfigfile.close() + self.all_tasks_for_this_cfg = set(re.findall("task\s*=\s*(\d+)",PROXConfig)) def __del__(self): if ((not self.configonly) and self.machine_params['prox_socket']): @@ -154,6 +155,12 @@ class RapidMachine(object): LuaFile.write('dest_ip{}="{}"\n'.format(index, dest_port['ip'])) LuaFile.write('dest_hex_ip{}=convertIPToHex(dest_ip{})\n'.format(index, index)) LuaFile.write('dest_hex_mac{}="{}"\n'.format(index , dest_port['mac'].replace(':',' '))) + if 'gw_vm' in self.machine_params.keys(): + for index, gw_ip in enumerate(self.machine_params['gw_ips'], + start = 1): + LuaFile.write('gw_ip{}="{}"\n'.format(index, gw_ip)) + LuaFile.write('gw_hex_ip{}=convertIPToHex(gw_ip{})\n'. + format(index, index)) LuaFile.write(appendix) self._client.scp_put(self.LuaFileName, self.rundir + '/parameters.lua') self._client.scp_put('helper.lua', self.rundir + '/helper.lua') diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/tests/basicrapid_gw.test b/VNFs/DPPD-PROX/helper-scripts/rapid/tests/basicrapid_gw.test new file mode 100644 index 00000000..a876a049 --- /dev/null +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/tests/basicrapid_gw.test @@ -0,0 +1,73 @@ +## +## Copyright (c) 2021 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. +## +# CHECK README IN THIS DIRECTORY FOR MORE EXPLANATION +# ON PARAMETERS IN THIS FILE + +[TestParameters] +name = BasicSwapWithGatewayTesting +number_of_tests = 1 +total_number_of_test_machines = 3 +lat_percentile = 99 + +[TestM1] +name = Generator +config_file = configs/gen_gw.cfg +gw_vm = 2 +dest_vm = 3 +mcore = [0] +gencores = [1] +latcores = [3] +#bucket_size_exp = 12 + +[TestM2] +name = Gateway +monitor = false +prox_socket = false +prox_launch_exit = false + +[TestM3] +name = Swap +config_file = configs/swap_gw.cfg +gw_vm = 2 +mcore = [0] +cores = [1] +#prox_socket = true +#prox_launch_exit = true + +[test1] +test=flowsizetest +warmupflowsize=512 +warmupimix=[64] +warmupspeed=1 +warmuptime=2 +# Each element in the imix list will result in a separate test. Each element +# is on its turn a list of packet sizes which will be used during one test +# execution. If you only want to test 1 size, define a list with only one +# element. +imixs=[[64],[64,250,800,800]] +# the 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] +# Setting one of the following thresholds to infinity (inf) +# results in the criterion not being evaluated to rate the test as succesful +drop_rate_threshold = 0.1 +lat_avg_threshold = 50 +lat_perc_threshold = 80 +lat_max_threshold = inf +accuracy = 1 +startspeed = 50 +#ramp_step = 1 |