From 20150da55eed2634cda771d8e481b76590c90b75 Mon Sep 17 00:00:00 2001 From: Luc Provoost Date: Mon, 9 Jan 2023 15:07:59 +0100 Subject: Optional MAC address and other changes The MAC address of the dataplane interfaces in the environment file is now optional. If not specified, the HW MAC address of that interface will be used. When using l2 tests, the parameter will be needed anyway and the test will fail if the MAC address is not specified. Starting from DPDK 20.11, the EAL --pci-whitelist parameter changed into --allow. We are now checking the DPDK version of the PROX instance to determine which parameter to use. For pods using cgroup v2, we are now using a different file to determine the cpuset available to the pod. Signed-off-by: Luc Provoost Change-Id: I7a88458406b9ae3c8cae9c583cc37121d40c5073 --- VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py') diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py index ee8fa67f..1a82671a 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py @@ -170,10 +170,13 @@ class RapidConfigParser(object): while True: dp_ip_key = 'dp_ip{}'.format(index) dp_mac_key = 'dp_mac{}'.format(index) - if dp_ip_key in machines[int(machine['dest_vm'])-1].keys() and \ - dp_mac_key in machines[int(machine['dest_vm'])-1].keys(): - dp_port = {'ip': machines[int(machine['dest_vm'])-1][dp_ip_key], - 'mac' : machines[int(machine['dest_vm'])-1][dp_mac_key]} + if dp_ip_key in machines[int(machine['dest_vm'])-1].keys(): + if dp_mac_key in machines[int(machine['dest_vm'])-1].keys(): + dp_port = {'ip': machines[int(machine['dest_vm'])-1][dp_ip_key], + 'mac' : machines[int(machine['dest_vm'])-1][dp_mac_key]} + else: + dp_port = {'ip': machines[int(machine['dest_vm'])-1][dp_ip_key], + 'mac' : None} dp_ports.append(dict(dp_port)) index += 1 else: -- cgit 1.2.3-korg