aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/TrafficGenerator.py45
-rw-r--r--resources/libraries/python/VppConfigGenerator.py6
-rw-r--r--resources/libraries/robot/performance.robot40
-rwxr-xr-xresources/tools/t-rex/t-rex-stateless.py74
4 files changed, 141 insertions, 24 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index a640c1d80a..28a75669b2 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -406,6 +406,51 @@ class TrafficGenerator(object):
_p0, _p1, _async, _latency,
warmup_time),
timeout=int(duration)+60)
+ elif traffic_type in ["3-node-IPv6-dst-10000"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} -6 "
+ "--p{4}_src_start_ip 2001:1::1 "
+ "--p{4}_dst_start_ip 2001:2::0 "
+ "--p{4}_dst_end_ip 2001:2::270F "
+ "--p{5}_src_start_ip 2001:2::1 "
+ "--p{5}_dst_start_ip 2001:1::0 "
+ "--p{5}_dst_end_ip 2001:1::270F "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+ elif traffic_type in ["3-node-IPv6-dst-100000"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} -6 "
+ "--p{4}_src_start_ip 2001:1::1 "
+ "--p{4}_dst_start_ip 2001:2::0 "
+ "--p{4}_dst_end_ip 2001:2::1:869F "
+ "--p{5}_src_start_ip 2001:2::1 "
+ "--p{5}_dst_start_ip 2001:1::0 "
+ "--p{5}_dst_end_ip 2001:1::1:869F "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
+ elif traffic_type in ["3-node-IPv6-dst-1000000"]:
+ (ret, stdout, stderr) = ssh.exec_command(
+ "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
+ "--duration={1} -r {2} -s {3} -6 "
+ "--p{4}_src_start_ip 2001:1::1 "
+ "--p{4}_dst_start_ip 2001:2::0 "
+ "--p{4}_dst_end_ip 2001:2::F:423F "
+ "--p{5}_src_start_ip 2001:2::1 "
+ "--p{5}_dst_start_ip 2001:1::0 "
+ "--p{5}_dst_end_ip 2001:1::F:423F "
+ "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
+ duration, rate, framesize,
+ _p0, _p1, _async, _latency,
+ warmup_time),
+ timeout=int(duration)+60)
else:
raise NotImplementedError('Unsupported traffic type')
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py
index de1f0c7e5c..ad3f23483e 100644
--- a/resources/libraries/python/VppConfigGenerator.py
+++ b/resources/libraries/python/VppConfigGenerator.py
@@ -60,6 +60,12 @@ dpdk {{
{nomultiseg}
{enablevhostuser}
}}
+
+ip6 {{
+ hash-buckets 2000000
+ heap-size 500m
+}}
+
"""
# End VPP configuration template.
diff --git a/resources/libraries/robot/performance.robot b/resources/libraries/robot/performance.robot
index 78cdd8b845..bb9e8ab135 100644
--- a/resources/libraries/robot/performance.robot
+++ b/resources/libraries/robot/performance.robot
@@ -386,6 +386,46 @@
| | Vpp Route Add | ${dut1} | 2001:2::0 | ${prefix} | 2001:3::2 | ${dut1_if2}
| | Vpp Route Add | ${dut2} | 2001:1::0 | ${prefix} | 2001:3::1 | ${dut2_if1}
+| Scale IPv6 forwarding initialized in a 3-node circular topology
+| | [Documentation]
+| | ... | Custom setup of IPv6 topology with scalability of ip routes on all
+| | ... | DUT nodes in 3-node circular topology
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${count} - IP route count. Type: integer
+| | ...
+| | ... | *Return:*
+| | ... | - No value returned
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Scale IPv6 forwarding initialized in a 3-node circular topology \
+| | ... | \| 100000 \|
+| | [Arguments] | ${count}
+| | ${subn_prefix}= | Set Variable | 64
+| | ${host_prefix}= | Set Variable | 128
+| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | 2001:3::1 | ${subn_prefix}
+| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | 2001:4::1 | ${subn_prefix}
+| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | 2001:4::2 | ${subn_prefix}
+| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | 2001:5::1 | ${subn_prefix}
+| | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
+| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
+| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2}
+| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1}
+| | Vpp nodes ra suppress link layer | ${nodes}
+| | Add Ip Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg1_if1_mac}
+| | Add Ip Neighbor | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
+| | Add Ip Neighbor | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
+| | Add Ip Neighbor | ${dut2} | ${dut2_if2} | 2001:5::2 | ${tg1_if2_mac}
+| | Vpp Route Add | ${dut1} | 2001:2::0 | ${host_prefix} | 2001:4::2
+| | ... | interface=${dut1_if2} | count=${count}
+| | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | 2001:3::2
+| | ... | interface=${dut1_if1} | count=${count}
+| | Vpp Route Add | ${dut2} | 2001:1::0 | ${host_prefix} | 2001:4::1
+| | ... | interface=${dut2_if2} | count=${count}
+| | Vpp Route Add | ${dut2} | 2001:2::0 | ${host_prefix} | 2001:5::2
+| | ... | interface=${dut2_if1} | count=${count}
+
| L2 xconnect initialized in a 3-node circular topology
| | [Documentation]
| | ... | Setup L2 xconnect topology by cross connecting two interfaces on
diff --git a/resources/tools/t-rex/t-rex-stateless.py b/resources/tools/t-rex/t-rex-stateless.py
index 9ee34f6c22..6c7579d0c3 100755
--- a/resources/tools/t-rex/t-rex-stateless.py
+++ b/resources/tools/t-rex/t-rex-stateless.py
@@ -96,7 +96,7 @@ def get_start_end_ipv6(start_ip, end_ip):
print "IPv6: start_ip is greater then end_ip"
sys.exit(2)
- max_p1 = abs(int(lo1) - int(lo2)) + 1
+ max_p1 = abs(int(lo1) - int(lo2))
base_p1 = lo1
except AddressValueError as ex_error:
print ex_error
@@ -259,33 +259,59 @@ def create_streams_v6(traffic_options, frame_size=78):
p2_src_end_ip = traffic_options['p2_src_end_ip']
p2_dst_start_ip = traffic_options['p2_dst_start_ip']
- base_p1, max_p1 = get_start_end_ipv6(p1_src_start_ip, p1_src_end_ip)
- base_p2, max_p2 = get_start_end_ipv6(p2_src_start_ip, p2_src_end_ip)
+ p1_dst_end_ip = traffic_options['p1_dst_end_ip']
+ p2_dst_end_ip = traffic_options['p2_dst_end_ip']
base_pkt_a = Ether()/IPv6(src=p1_src_start_ip, dst=p1_dst_start_ip)
base_pkt_b = Ether()/IPv6(src=p2_src_start_ip, dst=p2_dst_start_ip)
- # The following code applies raw instructions to packet (IP src increment).
- # It splits the generated traffic by "ip_src" variable to cores
- vm1 = STLScVmRaw([STLVmFlowVar(name="ipv6_src",
- min_value=base_p1,
- max_value=max_p1+base_p1,
- size=8, op="inc"),
- STLVmWrFlowVar(fv_name="ipv6_src", pkt_offset="IPv6.src",
- offset_fixup=8)
- ]
- , split_by_field="ipv6_src")
-
- # The following code applies raw instructions to packet (IP src increment).
- # It splits the generated traffic by "ip_src" variable to cores
- vm2 = STLScVmRaw([STLVmFlowVar(name="ipv6_src",
- min_value=base_p2,
- max_value=max_p2+base_p2,
- size=8, op="inc"),
- STLVmWrFlowVar(fv_name="ipv6_src", pkt_offset="IPv6.src",
- offset_fixup=8)
- ]
- , split_by_field="ipv6_src")
+ # The following code applies raw instructions to packet (IP src/dst
+ # increment). It splits the generated traffic by "ip_src"/"ip_dst" variable
+ # to cores.
+ if p1_dst_end_ip and p2_dst_end_ip:
+ base_p1, max_p1 = get_start_end_ipv6(p1_dst_start_ip, p1_dst_end_ip)
+ base_p2, max_p2 = get_start_end_ipv6(p2_dst_start_ip, p2_dst_end_ip)
+
+ vm1 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
+ min_value=base_p1,
+ max_value=max_p1+base_p1,
+ size=8, op="inc"),
+ STLVmWrFlowVar(fv_name="ipv6_dst",
+ pkt_offset="IPv6.dst",
+ offset_fixup=8)
+ ]
+ , split_by_field="ipv6_dst")
+ vm2 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
+ min_value=base_p2,
+ max_value=max_p2+base_p2,
+ size=8, op="inc"),
+ STLVmWrFlowVar(fv_name="ipv6_dst",
+ pkt_offset="IPv6.dst",
+ offset_fixup=8)
+ ]
+ , split_by_field="ipv6_dst")
+ else:
+ base_p1, max_p1 = get_start_end_ipv6(p1_src_start_ip, p1_src_end_ip)
+ base_p2, max_p2 = get_start_end_ipv6(p2_src_start_ip, p2_src_end_ip)
+
+ vm1 = STLScVmRaw([STLVmFlowVar(name="ipv6_src",
+ min_value=base_p1,
+ max_value=max_p1+base_p1,
+ size=8, op="inc"),
+ STLVmWrFlowVar(fv_name="ipv6_src",
+ pkt_offset="IPv6.src",
+ offset_fixup=8)
+ ]
+ , split_by_field="ipv6_src")
+ vm2 = STLScVmRaw([STLVmFlowVar(name="ipv6_src",
+ min_value=base_p2,
+ max_value=max_p2+base_p2,
+ size=8, op="inc"),
+ STLVmWrFlowVar(fv_name="ipv6_src",
+ pkt_offset="IPv6.src",
+ offset_fixup=8)
+ ]
+ , split_by_field="ipv6_src")
return create_streams_v46(base_pkt_a, base_pkt_b, vm1, vm2, frame_size)