diff options
author | Luc Provoost <luc.provoost@intel.com> | 2020-05-29 10:22:45 +0200 |
---|---|---|
committer | Luc Provoost <luc.provoost@intel.com> | 2020-05-29 10:22:45 +0200 |
commit | 6f898f1c73d630bf6e5e75ba1b30d261c8301d2a (patch) | |
tree | b549863cb813a5a2d62da2396ef3b3d0b8117038 /VNFs/DPPD-PROX | |
parent | b3c5a6a20926dc9fca32240b89f3dea09d07aa02 (diff) |
Fix for container .env file and small updates
Since runrapid.py is now supporting more than 1 dataplane interface, we
need to use a port index in the rapid.env file for the dataplane ports.
In k8sdeployment.py, we only support 1 dataplane port, but we are
writing dp_ip1 and dp_mac1 in the environment file. The copyright dates
are also updated. Some references to VM have also been changed to instance.
Change-Id: Ie1d036c13ef5d6f0aa1f35aa068a9760a1cfc2a9
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX')
17 files changed, 69 insertions, 104 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/README b/VNFs/DPPD-PROX/helper-scripts/rapid/README index ab6e44f2..198b6db1 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/README +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/README @@ -1,5 +1,5 @@ ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/bare.test b/VNFs/DPPD-PROX/helper-scripts/rapid/bare.test index 37d52212..e827e974 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/bare.test +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/bare.test @@ -1,5 +1,5 @@ ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/basicrapid.test b/VNFs/DPPD-PROX/helper-scripts/rapid/basicrapid.test index 25561bc4..e0909c42 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/basicrapid.test +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/basicrapid.test @@ -1,5 +1,5 @@ ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/centos.json b/VNFs/DPPD-PROX/helper-scripts/rapid/centos.json index 964de93e..d7d8f1d4 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/centos.json +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/centos.json @@ -1,5 +1,5 @@ { -"_Copyright": "Copyright (c) 2010-2019 Intel Corporation", +"_Copyright": "Copyright (c) 2010-2020 Intel Corporation", "_License": "SPDX-License-Identifier: Apache-2.0", "builders": [ { diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh b/VNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh index 984f0255..cca7f743 100755 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/check_prox_system_setup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh b/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh index f89d4fe2..d19abbe7 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/deploycentostools.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/genv6.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/genv6.cfg index 8f5e399b..650e284c 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/genv6.cfg +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/genv6.cfg @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2010-2020 Intel Corporation +;; Copyright (c) 2020 Intel Corporation ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/helper.lua b/VNFs/DPPD-PROX/helper-scripts/rapid/helper.lua index d38bb808..237c385b 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/helper.lua +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/helper.lua @@ -1,5 +1,5 @@ -- --- Copyright (c) 2010-2020 Intel Corporation +-- Copyright (c) 2020 Intel Corporation -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/impair.test b/VNFs/DPPD-PROX/helper-scripts/rapid/impair.test index a6a217de..02e38524 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/impair.test +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/impair.test @@ -1,5 +1,5 @@ ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test b/VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test index 2dd571b5..f854c6a9 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/ipv6.test @@ -1,5 +1,5 @@ ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/k8sdeployment.py b/VNFs/DPPD-PROX/helper-scripts/rapid/k8sdeployment.py index caf2d2e2..5e921d46 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/k8sdeployment.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/k8sdeployment.py @@ -1,7 +1,7 @@ #!/usr/bin/env python2.7 ## -## Copyright (c) 2019 Intel Corporation +## Copyright (c) 2019-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. @@ -175,11 +175,11 @@ class K8sDeployment: self._runtime_config.set("M%d" % pod.get_id(), "admin_ip", pod.get_admin_ip()) self._runtime_config.set("M%d" % pod.get_id(), - "dp_mac", pod.get_dp_mac()) + "dp_mac1", pod.get_dp_mac()) self._runtime_config.set("M%d" % pod.get_id(), "dp_pci_dev", pod.get_dp_pci_dev()) self._runtime_config.set("M%d" % pod.get_id(), - "dp_ip", pod.get_dp_ip()) + "dp_ip1", pod.get_dp_ip()) # Section [Varia] self._runtime_config.add_section("Varia") diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/l2framerate.test b/VNFs/DPPD-PROX/helper-scripts/rapid/l2framerate.test index fc452f8b..e09b80f3 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/l2framerate.test +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/l2framerate.test @@ -1,5 +1,5 @@ ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py b/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py index 163c6d9f..43f7f140 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py @@ -50,7 +50,8 @@ class prox_ctrl(object): def connect(self): attempts = 1 - RapidLog.debug("Trying to connect to VM which was just launched on %s, attempt: %d" % (self._ip, attempts)) + RapidLog.debug("Trying to connect to instance which was just launched \ + on %s, attempt: %d" % (self._ip, attempts)) while True: try: self.test_connect() @@ -58,15 +59,19 @@ class prox_ctrl(object): except RuntimeWarning as ex: attempts += 1 if attempts > 20: - RapidLog.exception("Failed to connect to VM after %d attempts:\n%s" % (attempts, ex)) - raise Exception("Failed to connect to VM after %d attempts:\n%s" % (attempts, ex)) + RapidLog.exception("Failed to connect to instance after %d\ + attempts:\n%s" % (attempts, ex)) + raise Exception("Failed to connect to instance after %d \ + attempts:\n%s" % (attempts, ex)) time.sleep(2) - RapidLog.debug("Trying to connect to VM which was just launched on %s, attempt: %d" % (self._ip, attempts)) - RapidLog.debug("Connected to VM on %s" % self._ip) + RapidLog.debug("Trying to connect to instance which was just \ + launched on %s, attempt: %d" % (self._ip, attempts)) + RapidLog.debug("Connected to instance on %s" % self._ip) def connect_socket(self): attempts = 1 - RapidLog.debug("Trying to connect to PROX (just launched) on %s, attempt: %d" % (self._ip, attempts)) + RapidLog.debug("Trying to connect to PROX (just launched) on %s, \ + attempt: %d" % (self._ip, attempts)) sock = None while True: sock = self.prox_sock() @@ -74,10 +79,13 @@ class prox_ctrl(object): break attempts += 1 if attempts > 20: - RapidLog.exception("Failed to connect to PROX on %s after %d attempts" % (self._ip, attempts)) - raise Exception("Failed to connect to PROX on %s after %d attempts" % (self._ip, attempts)) + RapidLog.exception("Failed to connect to PROX on %s after %d \ + attempts" % (self._ip, attempts)) + raise Exception("Failed to connect to PROX on %s after %d \ + attempts" % (self._ip, attempts)) time.sleep(2) - RapidLog.debug("Trying to connect to PROX (just launched) on %s, attempt: %d" % (self._ip, attempts)) + RapidLog.debug("Trying to connect to PROX (just launched) on %s, \ + attempt: %d" % (self._ip, attempts)) RapidLog.info("Connected to PROX on %s" % self._ip) return sock @@ -93,12 +101,14 @@ class prox_ctrl(object): for child in self._children: ret = os.waitpid(child[0], os.WNOHANG) if ret[0] == 0: - print("Waiting for child process '%s' to complete ..." % child[1]) + print("Waiting for child process '%s' to complete ..." + % child[1]) ret = os.waitpid(child[0], 0) rc = ret[1] if os.WIFEXITED(rc): if os.WEXITSTATUS(rc) == 0: - print("Child process '%s' completed successfully" % child[1]) + print("Child process '%s' completed successfully" + % child[1]) else: print("Child process '%s' returned exit status %d" % ( child[1], os.WEXITSTATUS(rc))) @@ -231,14 +241,16 @@ class prox_sock(object): max_lat = avg_lat = 0 number_tasks_returning_stats = 0 buckets = [0] * 128 - self._send('lat all stats %s %s' % (','.join(map(str, cores)), ','.join(map(str, tasks)))) + self._send('lat all stats %s %s' % (','.join(map(str, cores)), + ','.join(map(str, tasks)))) for core in cores: for task in tasks: stats = self._recv().split(',') if 'is not measuring' in stats[0]: continue if stats[0].startswith('error'): - RapidLog.critical("lat stats error: unexpected reply from PROX (potential incompatibility between scripts and PROX)") + RapidLog.critical("lat stats error: unexpected reply from PROX\ + (potential incompatibility between scripts and PROX)") raise Exception("lat stats error") number_tasks_returning_stats += 1 min_lat = min(int(stats[0]),min_lat) @@ -246,13 +258,17 @@ class prox_sock(object): avg_lat += int(stats[2]) #min_since begin = int(stats[3]) #max_since_begin = int(stats[4]) - tsc = int(stats[5]) # Taking the last tsc as the timestamp since PROX will return the same tsc for each core/task combination + tsc = int(stats[5]) # Taking the last tsc as the timestamp since + # PROX will return the same tsc for each + # core/task combination hz = int(stats[6]) #coreid = int(stats[7]) #taskid = int(stats[8]) stats = self._recv().split(':') if stats[0].startswith('error'): - RapidLog.critical("lat stats error: unexpected lat bucket reply (potential incompatibility between scripts and PROX)") + RapidLog.critical("lat stats error: unexpected lat bucket \ + reply (potential incompatibility between scripts \ + and PROX)") raise Exception("lat bucket reply error") buckets[0] = int(stats[1]) for i in range(1, 128): @@ -263,10 +279,12 @@ class prox_sock(object): used = float(self._recv()) self._send('stats latency(0).total') total = float(self._recv()) - return min_lat, max_lat, avg_lat, (old_div(used,total)), tsc, hz, buckets + return (min_lat, max_lat, avg_lat, (old_div(used,total)), tsc, hz, + buckets) def irq_stats(self, core, bucket, task=0): - self._send('stats task.core(%s).task(%s).irq(%s)' % (core, task, bucket)) + self._send('stats task.core(%s).task(%s).irq(%s)' % + (core, task, bucket)) stats = self._recv().split(',') return int(stats[0]) @@ -279,13 +297,16 @@ class prox_sock(object): def core_stats(self, cores, tasks=[0]): rx = tx = drop = tsc = hz = rx_non_dp = tx_non_dp = tx_fail = 0 - self._send('dp core stats %s %s' % (','.join(map(str, cores)), ','.join(map(str, tasks)))) + self._send('dp core stats %s %s' % (','.join(map(str, cores)), + ','.join(map(str, tasks)))) for core in cores: for task in tasks: stats = self._recv().split(',') if stats[0].startswith('error'): if stats[0].startswith('error: invalid syntax'): - RapidLog.critical("dp core stats error: unexpected invalid syntax (potential incompatibility between scripts and PROX)") + RapidLog.critical("dp core stats error: unexpected \ + invalid syntax (potential incompatibility \ + between scripts and PROX)") raise Exception("dp core stats error") continue rx += int(stats[0]) @@ -303,7 +324,9 @@ class prox_sock(object): self._send('multi port stats %s' % (','.join(map(str, ports)))) result = self._recv().split(';') if result[0].startswith('error'): - RapidLog.critical("multi port stats error: unexpected invalid syntax (potential incompatibility between scripts and PROX)") + RapidLog.critical("multi port stats error: unexpected invalid \ + syntax (potential incompatibility between scripts and \ + PROX)") raise Exception("multi port stats error") for statistics in result: stats = statistics.split(',') @@ -316,16 +339,20 @@ class prox_sock(object): return rx, tx, no_mbufs, errors, tsc def set_random(self, cores, task, offset, mask, length): - self._send('set random %s %s %s %s %s' % (','.join(map(str, cores)), task, offset, mask, length)) + self._send('set random %s %s %s %s %s' % (','.join(map(str, cores)), + task, offset, mask, length)) def set_size(self, cores, task, pkt_size): - self._send('pkt_size %s %s %s' % (','.join(map(str, cores)), task, pkt_size)) + self._send('pkt_size %s %s %s' % (','.join(map(str, cores)), task, + pkt_size)) def set_imix(self, cores, task, imix): - self._send('imix %s %s %s' % (','.join(map(str, cores)), task, ','.join(map(str,imix)))) + self._send('imix %s %s %s' % (','.join(map(str, cores)), task, + ','.join(map(str,imix)))) def set_value(self, cores, task, offset, value, length): - self._send('set value %s %s %s %s %s' % (','.join(map(str, cores)), task, offset, value, length)) + self._send('set value %s %s %s %s %s' % (','.join(map(str, cores)), + task, offset, value, length)) def _send(self, cmd): """Append LF and send command to the PROX instance.""" @@ -334,7 +361,7 @@ class prox_sock(object): self._sock.sendall(cmd.encode() + b'\n') def _recv(self): - """Receive response from PROX instance, and return it with LF removed.""" + """Receive response from PROX instance, return it with LF removed.""" if self._sock is None: raise RuntimeError("PROX socket closed, cannot receive anymore") pos = self._rcvd.find(b'\n') diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid.vms b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid.vms deleted file mode 100644 index a790540f..00000000 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid.vms +++ /dev/null @@ -1,62 +0,0 @@ -## -## 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. -## - - -[DEFAULT] -total_number_of_vms=3 -flavor_info=--ram 4096 --disk 40 --vcpus 4 -;flavor_meta_data=--property hw:mem_page_size=large --property hw:cpu_policy=dedicated --property hw:cpu_thread_policy=isolate --property hw:numa_nodes=1 --property hw:numa_cpus.0=0,1,2,3 --property hw:numa_mempolicy=strict --property hw:numa_mem.0=4096 -;flavor_meta_data=--property hw:mem_page_size=large --property hw:cpu_policy=dedicated --property hw:cpu_thread_policy=isolate -flavor_meta_data=--property hw:mem_page_size=large --property hw:cpu_policy=dedicated -;flavor_meta_data=--property hw:mem_page_size=large --property hw:cpu_policy=dedicated --property hw:cpu_realtime=yes --property hw:cpu_realtime_mask=^0 -;boot_info=--availability-zone nova --security-group default --config-drive=true -boot_info=--availability-zone nova --security-group prox_security_group -SRIOV_mgmt_port=NO -SRIOV_port=NO - -[VM1] - -[VM2] - -[VM3] - -[VM4] - -[VM5] - -[VM6] - -[VM7] - -[VM8] - -[VM9] - -[VM10] - -[VM11] - -[VM12] - -[VM13] - -[VM14] - -[VM15] - -[VM16] - - diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/secgw.test b/VNFs/DPPD-PROX/helper-scripts/rapid/secgw.test index fea9b512..b34f6642 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/secgw.test +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/secgw.test @@ -1,5 +1,5 @@ ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/sharkproxlog.sh b/VNFs/DPPD-PROX/helper-scripts/rapid/sharkproxlog.sh index 18fdaa0b..c2c4ab07 100755 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/sharkproxlog.sh +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/sharkproxlog.sh @@ -1,5 +1,5 @@ ## -## Copyright (c) 2010-2019 Intel Corporation +## Copyright (c) 2010-2020 Intel Corporation ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/swapv6.cfg b/VNFs/DPPD-PROX/helper-scripts/rapid/swapv6.cfg index ce323e9c..e073f8f1 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/swapv6.cfg +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/swapv6.cfg @@ -1,5 +1,5 @@ ;; -;; Copyright (c) 2010-2019 Intel Corporation +;; Copyright (c) 2020 Intel Corporation ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. |