aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/ip/ip4.robot
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2019-09-02 23:28:30 +0200
committerJan Gelety <jgelety@cisco.com>2019-09-05 06:15:47 +0000
commita7d74ea1d1cf916a72881a878980a4b6868fa9ec (patch)
treeec3d986b02eb9cfda5aa4dd19529983207358d13 /resources/libraries/robot/ip/ip4.robot
parent26560a80c1f7426c4d3c797c039a1a6fb7b60a8f (diff)
FIX: Use vhost macs when testpmd_mac forwarding used in VM
Change-Id: I291c3dc852e7c1bde6fb6102a9168cfec9992682 Signed-off-by: Jan Gelety <jgelety@cisco.com> (cherry picked from commit 474034ac24ce89cdaa94a09ae4d9ebbd3fb0f219)
Diffstat (limited to 'resources/libraries/robot/ip/ip4.robot')
-rw-r--r--resources/libraries/robot/ip/ip4.robot60
1 files changed, 52 insertions, 8 deletions
diff --git a/resources/libraries/robot/ip/ip4.robot b/resources/libraries/robot/ip/ip4.robot
index 7209c6ccec..84f422e8bc 100644
--- a/resources/libraries/robot/ip/ip4.robot
+++ b/resources/libraries/robot/ip/ip4.robot
@@ -305,6 +305,8 @@
| | ...
| | ... | *Arguments:*
| | ... | - nf_nodes - Number of guest VMs. Type: integer
+| | ... | - testpmd_mac - Switch for testpmd_mac test configuration.
+| | ... | Type: boolean
| | ...
| | ... | *Note:*
| | ... | Socket paths for VM are defined in following format:
@@ -316,7 +318,7 @@
| | ... | \| IPv4 forwarding with Vhost-User initialized in a 2-node circular\
| | ... | topology \| 1 \|
| | ...
-| | [Arguments] | ${nf_nodes}=${1}
+| | [Arguments] | ${nf_nodes}=${1} | ${testpmd_mac}=${FALSE}
| | ...
| | Set interfaces in path up
| | ${fib_table_1}= | Set Variable | ${101}
@@ -353,9 +355,23 @@
| | | ... | ${dut1} | ${dut1-vhost-${number}-if1} | 1.1.1.2 | 30
| | | VPP Interface Set IP Address
| | | ... | ${dut1} | ${dut1-vhost-${number}-if2} | 1.1.2.2 | 30
-| | | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=1.1.1.1
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=1.1.1.1
| | | ... | interface=${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
-| | | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=1.1.2.1
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=1.1.2.1
+| | | ... | interface=${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut1} | ${dut1-vhost-${number}-if1}
+| | | ... | 1.1.2.2 | ${dut1-vhost-${number}-if2_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut1} | ${dut1-vhost-${number}-if2}
+| | | ... | 1.1.1.2 | ${dut1-vhost-${number}-if1_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=1.1.2.2
+| | | ... | interface=${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=1.1.1.2
| | | ... | interface=${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
| Initialize IPv4 forwarding with vhost in 3-node circular topology
@@ -382,7 +398,7 @@
| | ... | \| IPv4 forwarding with Vhost-User initialized in a 3-node circular\
| | ... | topology \| 1 \|
| | ...
-| | [Arguments] | ${nf_nodes}=${1}
+| | [Arguments] | ${nf_nodes}=${1} | ${testpmd_mac}=${FALSE}
| | ...
| | Set interfaces in path up
| | ${fib_table_1}= | Set Variable | ${101}
@@ -446,13 +462,41 @@
| | | ... | ${dut2} | ${dut2-vhost-${number}-if1} | 1.1.1.2 | 30
| | | VPP Interface Set IP Address
| | | ... | ${dut2} | ${dut2-vhost-${number}-if2} | 1.1.2.2 | 30
-| | | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=1.1.1.1
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=1.1.1.1
+| | | ... | interface=${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=1.1.2.1
+| | | ... | interface=${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut2} | 20.0.0.0 | 8 | gateway=1.1.1.1
+| | | ... | interface=${dut2-vhost-${number}-if1} | vrf=${fib_table_1}
+| | | Run Keyword Unless | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut2} | 10.0.0.0 | 8 | gateway=1.1.2.1
+| | | ... | interface=${dut2-vhost-${number}-if2} | vrf=${fib_table_2}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut1} | ${dut1-vhost-${number}-if1}
+| | | ... | 1.1.2.2 | ${dut1-vhost-${number}-if2_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut1} | ${dut1-vhost-${number}-if2}
+| | | ... | 1.1.1.2 | ${dut1-vhost-${number}-if1_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut2} | ${dut2-vhost-${number}-if1}
+| | | ... | 1.1.2.2 | ${dut2-vhost-${number}-if2_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | VPP Add IP Neighbor | ${dut2} | ${dut2-vhost-${number}-if2}
+| | | ... | 1.1.1.2 | ${dut2-vhost-${number}-if1_mac}
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=1.1.2.2
| | | ... | interface=${dut1-vhost-${number}-if1} | vrf=${fib_table_1}
-| | | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=1.1.2.1
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=1.1.1.2
| | | ... | interface=${dut1-vhost-${number}-if2} | vrf=${fib_table_2}
-| | | Vpp Route Add | ${dut2} | 20.0.0.0 | 8 | gateway=1.1.1.1
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut2} | 20.0.0.0 | 8 | gateway=1.1.2.2
| | | ... | interface=${dut2-vhost-${number}-if1} | vrf=${fib_table_1}
-| | | Vpp Route Add | ${dut2} | 10.0.0.0 | 8 | gateway=1.1.2.1
+| | | Run Keyword If | ${testpmd_mac}
+| | | ... | Vpp Route Add | ${dut2} | 10.0.0.0 | 8 | gateway=1.1.1.2
| | | ... | interface=${dut2-vhost-${number}-if2} | vrf=${fib_table_2}
| Initialize IPv4 forwarding with VLAN dot1q sub-interfaces in circular topology