From: Ido Schimmel <idosch(a)mellanox.com>
The purpose of the recipes is to test ECMP, so we can do with just two
links instead of four.
This allows us to run the recipes on more setups without changing their
functionality.
Signed-off-by: Ido Schimmel <idosch(a)mellanox.com>
Signed-off-by: Yuval Mintz <yuvalm(a)mellanox.com>
---
recipes/switchdev/l3-005-ecmp-basic.py | 13 ++++---------
recipes/switchdev/l3-005-ecmp-basic.xml | 4 ----
recipes/switchdev/l3-006-ecmp-linkdown.py | 13 ++++---------
recipes/switchdev/l3-006-ecmp-linkdown.xml | 4 ----
recipes/switchdev/l3-007-ecmp-maxsize.py | 13 ++++---------
recipes/switchdev/l3-007-ecmp-maxsize.xml | 4 ----
6 files changed, 12 insertions(+), 39 deletions(-)
diff --git a/recipes/switchdev/l3-005-ecmp-basic.py
b/recipes/switchdev/l3-005-ecmp-basic.py
index 05f8634..2ccce1a 100644
--- a/recipes/switchdev/l3-005-ecmp-basic.py
+++ b/recipes/switchdev/l3-005-ecmp-basic.py
@@ -24,16 +24,15 @@ def ipv4(test_ip):
def do_task(ctl, hosts, ifaces, aliases):
m1, sw, m2 = hosts
- m1_if1, sw_if1, sw_if2, sw_if3, sw_if4, sw_if5, m2_if1, m2_if2, m2_if3, \
- m2_if4, m2_if5, m3_if1 = ifaces
+ m1_if1, sw_if1, sw_if2, sw_if3, m2_if1, m2_if2, m2_if3, m3_if1 = ifaces
- ecmp_sw_ifaces = [sw_if2, sw_if3, sw_if4, sw_if5]
- ecmp_m_ifaces = [m2_if1, m2_if2, m2_if3, m2_if4]
+ ecmp_sw_ifaces = [sw_if2, sw_if3]
+ ecmp_m_ifaces = [m2_if1, m2_if2]
m2.config("/proc/sys/net/ipv4/ip_forward", "1")
ecmp_common.create_topology(m1_if1, sw_if1, ecmp_sw_ifaces, ecmp_m_ifaces,
- m2_if5, m3_if1)
+ m2_if3, m3_if1)
sleep(30)
tl = TestLib(ctl, aliases)
@@ -48,12 +47,8 @@ do_task(ctl, [ctl.get_host("machine1"),
ctl.get_host("switch").get_interface("if1"),
ctl.get_host("switch").get_interface("if2"),
ctl.get_host("switch").get_interface("if3"),
- ctl.get_host("switch").get_interface("if4"),
- ctl.get_host("switch").get_interface("if5"),
ctl.get_host("machine2").get_interface("if1"),
ctl.get_host("machine2").get_interface("if2"),
- ctl.get_host("machine2").get_interface("if3"),
- ctl.get_host("machine2").get_interface("if4"),
ctl.get_host("machine2").get_interface("veth0"),
ctl.get_host("machine2").get_interface("veth1")],
ctl.get_aliases())
diff --git a/recipes/switchdev/l3-005-ecmp-basic.xml
b/recipes/switchdev/l3-005-ecmp-basic.xml
index c5bf094..7d063b8 100644
--- a/recipes/switchdev/l3-005-ecmp-basic.xml
+++ b/recipes/switchdev/l3-005-ecmp-basic.xml
@@ -11,16 +11,12 @@
<eth id="if1" label="X" />
<eth id="if2" label="A" />
<eth id="if3" label="B" />
- <eth id="if4" label="C" />
- <eth id="if5" label="D" />
</interfaces>
</host>
<host id="machine2">
<interfaces>
<eth id="if1" label="A" />
<eth id="if2" label="B" />
- <eth id="if3" label="C" />
- <eth id="if4" label="D" />
<veth_pair>
<veth id="veth0"/>
<veth id="veth1" netns="nsif">
diff --git a/recipes/switchdev/l3-006-ecmp-linkdown.py
b/recipes/switchdev/l3-006-ecmp-linkdown.py
index 7677399..fb07701 100644
--- a/recipes/switchdev/l3-006-ecmp-linkdown.py
+++ b/recipes/switchdev/l3-006-ecmp-linkdown.py
@@ -25,16 +25,15 @@ def ipv4(test_ip):
def do_task(ctl, hosts, ifaces, aliases):
m1, sw, m2 = hosts
- m1_if1, sw_if1, sw_if2, sw_if3, sw_if4, sw_if5, m2_if1, m2_if2, m2_if3, \
- m2_if4, m2_if5, m3_if1 = ifaces
+ m1_if1, sw_if1, sw_if2, sw_if3, m2_if1, m2_if2, m2_if3, m3_if1 = ifaces
- ecmp_sw_ifaces = [sw_if2, sw_if3, sw_if4, sw_if5]
- ecmp_m_ifaces = [m2_if1, m2_if2, m2_if3, m2_if4]
+ ecmp_sw_ifaces = [sw_if2, sw_if3]
+ ecmp_m_ifaces = [m2_if1, m2_if2]
m2.config("/proc/sys/net/ipv4/ip_forward", "1")
ecmp_common.create_topology(m1_if1, sw_if1, ecmp_sw_ifaces, ecmp_m_ifaces,
- m2_if5, m3_if1)
+ m2_if3, m3_if1)
sleep(30)
tl = TestLib(ctl, aliases)
@@ -90,12 +89,8 @@ do_task(ctl, [ctl.get_host("machine1"),
ctl.get_host("switch").get_interface("if1"),
ctl.get_host("switch").get_interface("if2"),
ctl.get_host("switch").get_interface("if3"),
- ctl.get_host("switch").get_interface("if4"),
- ctl.get_host("switch").get_interface("if5"),
ctl.get_host("machine2").get_interface("if1"),
ctl.get_host("machine2").get_interface("if2"),
- ctl.get_host("machine2").get_interface("if3"),
- ctl.get_host("machine2").get_interface("if4"),
ctl.get_host("machine2").get_interface("veth0"),
ctl.get_host("machine2").get_interface("veth1")],
ctl.get_aliases())
diff --git a/recipes/switchdev/l3-006-ecmp-linkdown.xml
b/recipes/switchdev/l3-006-ecmp-linkdown.xml
index 27a5184..33e93f6 100644
--- a/recipes/switchdev/l3-006-ecmp-linkdown.xml
+++ b/recipes/switchdev/l3-006-ecmp-linkdown.xml
@@ -11,16 +11,12 @@
<eth id="if1" label="X" />
<eth id="if2" label="A" />
<eth id="if3" label="B" />
- <eth id="if4" label="C" />
- <eth id="if5" label="D" />
</interfaces>
</host>
<host id="machine2">
<interfaces>
<eth id="if1" label="A" />
<eth id="if2" label="B" />
- <eth id="if3" label="C" />
- <eth id="if4" label="D" />
<veth_pair>
<veth id="veth0"/>
<veth id="veth1" netns="nsif">
diff --git a/recipes/switchdev/l3-007-ecmp-maxsize.py
b/recipes/switchdev/l3-007-ecmp-maxsize.py
index 64d750a..5936c5e 100644
--- a/recipes/switchdev/l3-007-ecmp-maxsize.py
+++ b/recipes/switchdev/l3-007-ecmp-maxsize.py
@@ -27,16 +27,15 @@ def ipv4(test_ip):
def do_task(ctl, hosts, ifaces, aliases):
m1, sw, m2 = hosts
- m1_if1, sw_if1, sw_if2, sw_if3, sw_if4, sw_if5, m2_if1, m2_if2, m2_if3, \
- m2_if4, m2_if5, m3_if1 = ifaces
+ m1_if1, sw_if1, sw_if2, sw_if3, m2_if1, m2_if2, m2_if3, m3_if1 = ifaces
- ecmp_sw_ifaces = [sw_if2, sw_if3, sw_if4, sw_if5]
- ecmp_m_ifaces = [m2_if1, m2_if2, m2_if3, m2_if4]
+ ecmp_sw_ifaces = [sw_if2, sw_if3]
+ ecmp_m_ifaces = [m2_if1, m2_if2]
m2.config("/proc/sys/net/ipv4/ip_forward", "1")
ecmp_common.create_topology(m1_if1, sw_if1, ecmp_sw_ifaces, ecmp_m_ifaces,
- m2_if5, m3_if1, num_nexthops = MAX_NEXTHOPS)
+ m2_if3, m3_if1, num_nexthops = MAX_NEXTHOPS)
sleep(30)
tl = TestLib(ctl, aliases)
@@ -60,12 +59,8 @@ do_task(ctl, [ctl.get_host("machine1"),
ctl.get_host("switch").get_interface("if1"),
ctl.get_host("switch").get_interface("if2"),
ctl.get_host("switch").get_interface("if3"),
- ctl.get_host("switch").get_interface("if4"),
- ctl.get_host("switch").get_interface("if5"),
ctl.get_host("machine2").get_interface("if1"),
ctl.get_host("machine2").get_interface("if2"),
- ctl.get_host("machine2").get_interface("if3"),
- ctl.get_host("machine2").get_interface("if4"),
ctl.get_host("machine2").get_interface("veth0"),
ctl.get_host("machine2").get_interface("veth1")],
ctl.get_aliases())
diff --git a/recipes/switchdev/l3-007-ecmp-maxsize.xml
b/recipes/switchdev/l3-007-ecmp-maxsize.xml
index a6b1bad..8d4391b 100644
--- a/recipes/switchdev/l3-007-ecmp-maxsize.xml
+++ b/recipes/switchdev/l3-007-ecmp-maxsize.xml
@@ -11,16 +11,12 @@
<eth id="if1" label="X" />
<eth id="if2" label="A" />
<eth id="if3" label="B" />
- <eth id="if4" label="C" />
- <eth id="if5" label="D" />
</interfaces>
</host>
<host id="machine2">
<interfaces>
<eth id="if1" label="A" />
<eth id="if2" label="B" />
- <eth id="if3" label="C" />
- <eth id="if4" label="D" />
<veth_pair>
<veth id="veth0"/>
<veth id="veth1" netns="nsif">
--
2.4.3