diff options
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/ContainerUtils.py | 32 | ||||
-rw-r--r-- | resources/libraries/python/QemuManager.py | 4 | ||||
-rw-r--r-- | resources/libraries/robot/shared/container.robot | 20 | ||||
-rw-r--r-- | resources/libraries/robot/shared/vm.robot | 4 | ||||
-rw-r--r-- | resources/templates/container/memif_create_chain_ip4.exec | 4 | ||||
-rw-r--r-- | resources/templates/container/memif_create_pipeline_ip4.exec | 4 | ||||
-rw-r--r-- | resources/templates/vm/vpp_chain_ip4.exec | 4 |
7 files changed, 36 insertions, 36 deletions
diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py index 111861ab33..77e139f80f 100644 --- a/resources/libraries/python/ContainerUtils.py +++ b/resources/libraries/python/ContainerUtils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 Cisco and/or its affiliates. # 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: @@ -297,10 +297,10 @@ class ContainerManager: """ self.engine.create_vpp_startup_config() - vif1_mac = kwargs[u"tg_if1_mac"] \ + vif1_mac = kwargs[u"tg_pf1_mac"] \ if (kwargs[u"mid1"] - 1) % kwargs[u"nodes"] + 1 == 1 \ else f"52:54:00:00:{(kwargs[u'mid1'] - 1):02X}:02" - vif2_mac = kwargs[u"tg_if2_mac"] \ + vif2_mac = kwargs[u"tg_pf2_mac"] \ if (kwargs[u"mid2"] - 1) % kwargs[u"nodes"] + 1 == kwargs[u"nodes"]\ else f"52:54:00:00:{(kwargs['mid2'] + 1):02X}:01" self.engine.create_vpp_exec_config( @@ -332,11 +332,11 @@ class ContainerManager: self.engine.container.node, kwargs[u"dut1_if2"]) if_black_name = Topology.get_interface_name( self.engine.container.node, kwargs[u"dut1_if1"]) - tg_if_ip4 = kwargs[u"tg_if2_ip4"] - tg_if_mac = kwargs[u"tg_if2_mac"] + tg_pf_ip4 = kwargs[u"tg_pf2_ip4"] + tg_pf_mac = kwargs[u"tg_pf2_mac"] else: - tg_if_ip4 = kwargs[u"tg_if1_ip4"] - tg_if_mac = kwargs[u"tg_if1_mac"] + tg_pf_ip4 = kwargs[u"tg_pf1_ip4"] + tg_pf_mac = kwargs[u"tg_pf1_mac"] if1_pci = Topology.get_interface_pci_addr( self.engine.container.node, kwargs[u"dut2_if1"]) if2_pci = Topology.get_interface_pci_addr( @@ -368,7 +368,7 @@ class ContainerManager: f"create interface memif id {i} socket-id 2 master\n" f"set interface state memif2/{i} up\n" f"set interface l2 bridge memif2/{i} 2\n" - f"set ip neighbor memif2/{i} {tg_if_ip4} {tg_if_mac} " + f"set ip neighbor memif2/{i} {tg_pf_ip4} {tg_pf_mac} " f"static\n\n" ) @@ -401,8 +401,8 @@ class ContainerManager: tnl_local_ip = f"{local_ip_base}.{nf_instance + 100}" tnl_remote_ip = f"{local_ip_base}.{nf_instance}" remote_ip_base = kwargs[u"dut1_if1_ip4"].rsplit(u".", 1)[0] - tg_if_ip4 = kwargs[u"tg_if1_ip4"] - tg_if_mac = kwargs[u"tg_if1_mac"] + tg_pf_ip4 = kwargs[u"tg_pf1_ip4"] + tg_pf_mac = kwargs[u"tg_pf1_mac"] raddr_ip4 = kwargs[u"laddr_ip4"] l_mac1 = 17 l_mac2 = 18 @@ -411,8 +411,8 @@ class ContainerManager: tnl_local_ip = f"{local_ip_base}.{nf_instance}" tnl_remote_ip = f"{local_ip_base}.{nf_instance + 100}" remote_ip_base = kwargs[u"dut2_if2_ip4"].rsplit(u".", 1)[0] - tg_if_ip4 = kwargs[u"tg_if2_ip4"] - tg_if_mac = kwargs[u"tg_if2_mac"] + tg_pf_ip4 = kwargs[u"tg_pf2_ip4"] + tg_pf_mac = kwargs[u"tg_pf2_mac"] raddr_ip4 = kwargs[u"raddr_ip4"] l_mac1 = 1 l_mac2 = 2 @@ -428,8 +428,8 @@ class ContainerManager: sid2=u"2", mac1=f"02:02:00:00:{l_mac1:02X}:{(nf_instance - 1):02X}", mac2=f"02:02:00:00:{l_mac2:02X}:{(nf_instance - 1):02X}", - tg_if2_ip4=tg_if_ip4, - tg_if2_mac=tg_if_mac, + tg_pf2_ip4=tg_pf_ip4, + tg_pf2_mac=tg_pf_mac, raddr_ip4=raddr_ip4, tnl_local_ip=tnl_local_ip, tnl_remote_ip=tnl_remote_ip, @@ -455,10 +455,10 @@ class ContainerManager: role2 = u"master" if node == kwargs[u"nodes"] else u"slave" kwargs[u"mid2"] = kwargs[u"mid2"] \ if node == kwargs[u"nodes"] else kwargs[u"mid2"] + 1 - vif1_mac = kwargs[u"tg_if1_mac"] \ + vif1_mac = kwargs[u"tg_pf1_mac"] \ if (kwargs[u"mid1"] - 1) % kwargs[u"nodes"] + 1 == 1 \ else f"52:54:00:00:{(kwargs[u'mid1'] - 1):02X}:02" - vif2_mac = kwargs[u"tg_if2_mac"] \ + vif2_mac = kwargs[u"tg_pf2_mac"] \ if (kwargs[u"mid2"] - 1) % kwargs[u"nodes"] + 1 == kwargs[u"nodes"]\ else f"52:54:00:00:{(kwargs[u'mid2'] + 1):02X}:01" socket1 = f"{kwargs[u'guest_dir']}/memif-{self.engine.container.name}-"\ diff --git a/resources/libraries/python/QemuManager.py b/resources/libraries/python/QemuManager.py index a9b1b6423e..ce55be0a51 100644 --- a/resources/libraries/python/QemuManager.py +++ b/resources/libraries/python/QemuManager.py @@ -68,13 +68,13 @@ class QemuManager: vif1_mac = Topology.get_interface_mac( self.nodes[node], f"vhost{idx1}" ) if kwargs[u"vnf"] == u"testpmd_mac" \ - else kwargs[u"tg_if1_mac"] if nf_node == 1 \ + else kwargs[u"tg_pf1_mac"] if nf_node == 1 \ else f"52:54:00:00:{(qemu_id - 1):02x}:02" idx2 = (nf_chain - 1) * nf_nodes * 2 + nf_node * 2 vif2_mac = Topology.get_interface_mac( self.nodes[node], f"vhost{idx2}" ) if kwargs[u"vnf"] == u"testpmd_mac" \ - else kwargs[u"tg_if2_mac"] if nf_node == nf_nodes \ + else kwargs[u"tg_pf2_mac"] if nf_node == nf_nodes \ else f"52:54:00:00:{(qemu_id + 1):02x}:01" self.machines_affinity[name] = CpuUtils.get_affinity_nf( diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot index b2b3d01a4e..9cd54e811c 100644 --- a/resources/libraries/robot/shared/container.robot +++ b/resources/libraries/robot/shared/container.robot @@ -211,16 +211,16 @@ | | Run Keyword If | '${container_chain_topology}' == 'chain_ip4' | | ... | ${group}.Configure VPP In All Containers | | ... | ${container_chain_topology} -| | ... | tg_if1_mac=${TG_pf1_mac} -| | ... | tg_if2_mac=${TG_pf2_mac} +| | ... | tg_pf1_mac=${TG_pf1_mac} +| | ... | tg_pf2_mac=${TG_pf2_mac} | | ... | nodes=${nf_nodes} | | ... | ELSE IF | '${container_chain_topology}' == 'chain_ipsec' | | ... | ${group}.Configure VPP In All Containers | | ... | ${container_chain_topology} -| | ... | tg_if1_ip4=${tg_if1_ip4} -| | ... | tg_if1_mac=${TG_pf1_mac}[0] -| | ... | tg_if2_ip4=${tg_if2_ip4} -| | ... | tg_if2_mac=${TG_pf2_mac}[0] +| | ... | tg_pf1_ip4=${tg_if1_ip4} +| | ... | tg_pf1_mac=${TG_pf1_mac}[0] +| | ... | tg_pf2_ip4=${tg_if2_ip4} +| | ... | tg_pf2_mac=${TG_pf2_mac}[0] | | ... | dut1_if1_ip4=${dut1_if1_ip4} | | ... | dut1_if2_ip4=${dut1_if2_ip4} | | ... | dut2_if1_ip4=${dut2_if1_ip4} @@ -232,8 +232,8 @@ | | ... | ELSE IF | '${container_chain_topology}' == 'pipeline_ip4' | | ... | ${group}.Configure VPP In All Containers | | ... | ${container_chain_topology} -| | ... | tg_if1_mac=${TG_pf1_mac}[0] -| | ... | tg_if2_mac=${TG_pf2_mac}[0] +| | ... | tg_pf1_mac=${TG_pf1_mac}[0] +| | ... | tg_pf2_mac=${TG_pf2_mac}[0] | | ... | nodes=${nf_nodes} | | ... | ELSE IF | '${container_chain_topology}' == 'cross_horiz' | | ... | ${group}.Configure VPP In All Containers @@ -341,8 +341,8 @@ | | ... | dut1_if1=${DUT1_${int}1}[0] | dut1_if2=${DUT1_${int}2}[0] | | ... | dut2_if1=${DUT2_${int}1}[0] | dut2_if2=${DUT2_${int}2}[0] | | ... | dut2_if2_ip4=${dut2_if2_ip4} -| | ... | tg_if1_ip4=${tg_if1_ip4} | tg_if1_mac=${TG_pf1_mac}[0] -| | ... | tg_if2_ip4=${tgi_f2_ip4} | tg_if2_mac=${TG_pf2_mac}[0] +| | ... | tg_pf1_ip4=${tg_if1_ip4} | tg_pf1_mac=${TG_pf1_mac}[0] +| | ... | tg_pf2_ip4=${tgi_f2_ip4} | tg_pf2_mac=${TG_pf2_mac}[0] | | ... | nodes=${nodes} | | Start VPP in all '${container_group}' containers diff --git a/resources/libraries/robot/shared/vm.robot b/resources/libraries/robot/shared/vm.robot index 5963287335..21fce77683 100644 --- a/resources/libraries/robot/shared/vm.robot +++ b/resources/libraries/robot/shared/vm.robot @@ -50,7 +50,7 @@ | | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes} | jumbo=${jumbo} | | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${use_tuned_cfs} | | ... | auto_scale=${auto_scale} | vnf=${vnf} -| | ... | tg_if1_mac=${TG_pf1_mac} | tg_if2_mac=${TG_pf2_mac} +| | ... | tg_pf1_mac=${TG_pf1_mac}[0] | tg_pf2_mac=${TG_pf2_mac}[0] | | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr} | | ... | rxq_count_int=${rxq_count_int} | enable_csum=${False} | | ... | enable_gso=${False} @@ -96,7 +96,7 @@ | | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes} | jumbo=${jumbo} | | ... | perf_qemu_qsz=${perf_qemu_qsz} | use_tuned_cfs=${use_tuned_cfs} | | ... | auto_scale=${auto_scale} | vnf=${vnf} -| | ... | tg_if1_mac=${TG_pf1_mac} | tg_if2_mac=${TG_pf2_mac} +| | ... | tg_pf1_mac=${TG_pf1_mac}[0] | tg_pf2_mac=${TG_pf2_mac}[0] | | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr} | | ... | rxq_count_int=${rxq_count_int} | enable_csum=${False} | | ... | enable_gso=${False} diff --git a/resources/templates/container/memif_create_chain_ip4.exec b/resources/templates/container/memif_create_chain_ip4.exec index 879da8fe48..1751d582be 100644 --- a/resources/templates/container/memif_create_chain_ip4.exec +++ b/resources/templates/container/memif_create_chain_ip4.exec @@ -8,8 +8,8 @@ create interface memif id $mid2 socket-id $sid2 hw-addr $mac2 master set interface ip address memif$sid2/$mid2 1.1.$sid2.1/24 set interface state memif$sid2/$mid2 up -set ip neighbor static memif$sid1/$mid1 1.1.$sid1.2 $vif1_mac[0] -set ip neighbor static memif$sid2/$mid2 1.1.$sid2.2 $vif2_mac[0] +set ip neighbor static memif$sid1/$mid1 1.1.$sid1.2 $vif1_mac +set ip neighbor static memif$sid2/$mid2 1.1.$sid2.2 $vif2_mac ip route add 10.0.0.0/8 via 1.1.$sid1.2 ip route add 20.0.0.0/8 via 1.1.$sid2.2 diff --git a/resources/templates/container/memif_create_pipeline_ip4.exec b/resources/templates/container/memif_create_pipeline_ip4.exec index d612603a38..d45eb5e200 100644 --- a/resources/templates/container/memif_create_pipeline_ip4.exec +++ b/resources/templates/container/memif_create_pipeline_ip4.exec @@ -8,8 +8,8 @@ create interface memif id $mid2 socket-id $sid2 hw-addr $mac2 $role2 set interface ip address memif$sid2/$mid2 1.1.$sid2.1/24 set interface state memif$sid2/$mid2 up -set ip neighbor static memif$sid1/$mid1 1.1.$sid1.2 $vif1_mac[0] -set ip neighbor static memif$sid2/$mid2 1.1.$sid2.2 $vif2_mac[0] +set ip neighbor static memif$sid1/$mid1 1.1.$sid1.2 $vif1_mac +set ip neighbor static memif$sid2/$mid2 1.1.$sid2.2 $vif2_mac ip route add 10.0.0.0/8 via 1.1.$sid1.2 ip route add 20.0.0.0/8 via 1.1.$sid2.2 diff --git a/resources/templates/vm/vpp_chain_ip4.exec b/resources/templates/vm/vpp_chain_ip4.exec index 8fe07530ea..3c5f076b5d 100644 --- a/resources/templates/vm/vpp_chain_ip4.exec +++ b/resources/templates/vm/vpp_chain_ip4.exec @@ -9,8 +9,8 @@ set interface mac address GigabitEthernet0/7/0 $mac2 set interface ip address GigabitEthernet0/7/0 1.1.2.1/24 set interface state GigabitEthernet0/7/0 up -set ip neighbor static GigabitEthernet0/6/0 1.1.1.2 $vif1_mac[0] -set ip neighbor static GigabitEthernet0/7/0 1.1.2.2 $vif2_mac[0] +set ip neighbor static GigabitEthernet0/6/0 1.1.1.2 $vif1_mac +set ip neighbor static GigabitEthernet0/7/0 1.1.2.2 $vif2_mac ip route add 10.0.0.0/8 via 1.1.1.2 ip route add 20.0.0.0/8 via 1.1.2.2 |