aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2016-06-20 13:13:02 +0100
committerMiroslav Miklus <mmiklus@cisco.com>2016-08-01 14:41:46 +0000
commit8fa8590c30540f53edb02c223a6de616cbe149da (patch)
treeaffd629efc2ce42dc7a39c9f3d5ae93725544f35 /resources/tools
parentfeef56fdb844e82997e8665557762a004f0d1922 (diff)
CSIT-179 IPv6 Scale - performance
- Add libraries for ipv6 scale setup - Add test cases for testing 10k/100k/1M fib entries - Add t-rex profiles for large scale testing Change-Id: I4260405c960afe659db7e0764a68a87b9e8de0b2 Signed-off-by: pmikus <pmikus@cisco.com>
Diffstat (limited to 'resources/tools')
-rwxr-xr-xresources/tools/t-rex/t-rex-stateless.py74
1 files changed, 50 insertions, 24 deletions
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)