aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2016-06-17 08:08:08 +0100
committerMiroslav Miklus <mmiklus@cisco.com>2016-07-28 11:02:14 +0000
commite3f6b21b75b5d579ce3080a1f173828fc59270bf (patch)
tree7c66e02c30243e0b4e7a4c9474836996628c5c12 /resources
parent2eb74f5c5cb58fcb072af765ea67dd80ee6d8755 (diff)
CSIT-169 IPv4 Scale - performance
- Add libraries for ipv4 scale setup - Add test cases for testing 10k/100k/1M fib entries - Add t-rex profiles for large scale testing Change-Id: If085e0d834e5ffe5538ba76756e8b9d0e8255cb2 Signed-off-by: pmikus <pmikus@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/TrafficGenerator.py45
-rw-r--r--resources/libraries/robot/performance.robot42
-rwxr-xr-xresources/tools/t-rex/t-rex-stateless.py72
3 files changed, 133 insertions, 26 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index 6f642c72d0..a640c1d80a 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -346,6 +346,51 @@ class TrafficGenerator(object):
_p0, _p1, _async, _latency,
warmup_time),
timeout=int(duration)+60)
+ elif traffic_type in ["3-node-IPv4-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} "
+ "--p{4}_src_start_ip 10.0.0.1 "
+ "--p{4}_dst_start_ip 20.0.0.0 "
+ "--p{4}_dst_end_ip 20.0.39.15 "
+ "--p{5}_src_start_ip 20.0.0.1 "
+ "--p{5}_dst_start_ip 10.0.0.0 "
+ "--p{5}_dst_end_ip 10.0.39.15 "
+ "{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-IPv4-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} "
+ "--p{4}_src_start_ip 10.0.0.1 "
+ "--p{4}_dst_start_ip 20.0.0.0 "
+ "--p{4}_dst_end_ip 20.1.134.159 "
+ "--p{5}_src_start_ip 20.0.0.1 "
+ "--p{5}_dst_start_ip 10.0.0.0 "
+ "--p{5}_dst_end_ip 10.1.134.159 "
+ "{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-IPv4-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} "
+ "--p{4}_src_start_ip 10.0.0.1 "
+ "--p{4}_dst_start_ip 20.0.0.0 "
+ "--p{4}_dst_end_ip 20.15.66.63 "
+ "--p{5}_src_start_ip 20.0.0.1 "
+ "--p{5}_dst_start_ip 10.0.0.0 "
+ "--p{5}_dst_end_ip 10.15.66.63 "
+ "{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"]:
(ret, stdout, stderr) = ssh.exec_command(
"sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
diff --git a/resources/libraries/robot/performance.robot b/resources/libraries/robot/performance.robot
index f9fbfc7b5b..78cdd8b845 100644
--- a/resources/libraries/robot/performance.robot
+++ b/resources/libraries/robot/performance.robot
@@ -319,6 +319,48 @@
| | dut2_v4.set_route | 10.10.10.0 | 24 | 1.1.1.1 | ${dut2_if1}
| | All Vpp Interfaces Ready Wait | ${nodes}
+| Scale IPv4 forwarding initialized in a 3-node circular topology
+| | [Documentation]
+| | ... | Custom setup of IPv4 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 IPv4 forwarding initialized in a 3-node circular topology \
+| | ... | \| 100000 \|
+| | [Arguments] | ${count}
+| | Set Interface State | ${dut1} | ${dut1_if1} | up
+| | Set Interface State | ${dut1} | ${dut1_if2} | up
+| | Set Interface State | ${dut2} | ${dut2_if1} | up
+| | Set Interface State | ${dut2} | ${dut2_if2} | up
+| | ${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}
+| | Add arp on dut | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg1_if1_mac}
+| | Add arp on dut | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
+| | Add arp on dut | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
+| | Add arp on dut | ${dut2} | ${dut2_if2} | 3.3.3.1 | ${tg1_if2_mac}
+| | IP addresses are set on interfaces | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
+| | IP addresses are set on interfaces | ${dut1} | ${dut1_if2} | 2.2.2.1 | 30
+| | IP addresses are set on interfaces | ${dut2} | ${dut2_if1} | 2.2.2.2 | 30
+| | IP addresses are set on interfaces | ${dut2} | ${dut2_if2} | 3.3.3.2 | 30
+| | Vpp Route Add | ${dut1} | 10.0.0.0 | 32 | 1.1.1.1 | ${dut1_if1}
+| | ... | count=${count}
+| | Vpp Route Add | ${dut1} | 20.0.0.0 | 32 | 2.2.2.2 | ${dut1_if2}
+| | ... | count=${count}
+| | Vpp Route Add | ${dut2} | 10.0.0.0 | 32 | 2.2.2.1 | ${dut2_if1}
+| | ... | count=${count}
+| | Vpp Route Add | ${dut2} | 20.0.0.0 | 32 | 3.3.3.1 | ${dut2_if2}
+| | ... | count=${count}
+| | All Vpp Interfaces Ready Wait | ${nodes}
+
| IPv6 forwarding initialized in a 3-node circular topology
| | [Documentation]
| | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular
diff --git a/resources/tools/t-rex/t-rex-stateless.py b/resources/tools/t-rex/t-rex-stateless.py
index 04f7a25294..9ee34f6c22 100755
--- a/resources/tools/t-rex/t-rex-stateless.py
+++ b/resources/tools/t-rex/t-rex-stateless.py
@@ -194,29 +194,45 @@ def create_streams(traffic_options, frame_size=64):
p2_src_end_ip = traffic_options['p2_src_end_ip']
p2_dst_start_ip = traffic_options['p2_dst_start_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()/IP(src=p1_src_start_ip, dst=p1_dst_start_ip, proto=61)
base_pkt_b = Ether()/IP(src=p2_src_start_ip, dst=p2_dst_start_ip, proto=61)
- # The following code applies raw instructions to packet (IP src increment).
- # It splits the generated traffic by "ip_src" variable to cores and fix
- # IPv4 header checksum.
- vm1 = STLScVmRaw([STLVmFlowVar(name="src",
- min_value=p1_src_start_ip,
- max_value=p1_src_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
- STLVmFixIpv4(offset="IP"),
- ], split_by_field="src")
- # The following code applies raw instructions to packet (IP src increment).
- # It splits the generated traffic by "ip_src" variable to cores and fix
- # IPv4 header checksum.
- vm2 = STLScVmRaw([STLVmFlowVar(name="src",
- min_value=p2_src_start_ip,
- max_value=p2_src_end_ip,
- size=4, op="inc"),
- STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
- STLVmFixIpv4(offset="IP"),
- ], split_by_field="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 and fix IPv4 header checksum.
+ if p1_dst_end_ip and p2_dst_end_ip:
+ vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+ min_value=p1_dst_start_ip,
+ max_value=p1_dst_end_ip,
+ size=4, op="inc"),
+ STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+ STLVmFixIpv4(offset="IP"),
+ ], split_by_field="dst")
+ vm2 = STLScVmRaw([STLVmFlowVar(name="dst",
+ min_value=p2_dst_start_ip,
+ max_value=p2_dst_end_ip,
+ size=4, op="inc"),
+ STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+ STLVmFixIpv4(offset="IP"),
+ ], split_by_field="dst")
+ else:
+ vm1 = STLScVmRaw([STLVmFlowVar(name="src",
+ min_value=p1_src_start_ip,
+ max_value=p1_src_end_ip,
+ size=4, op="inc"),
+ STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
+ STLVmFixIpv4(offset="IP"),
+ ], split_by_field="src")
+ vm2 = STLScVmRaw([STLVmFlowVar(name="src",
+ min_value=p2_src_start_ip,
+ max_value=p2_src_end_ip,
+ size=4, op="inc"),
+ STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
+ STLVmFixIpv4(offset="IP"),
+ ], split_by_field="src")
return create_streams_v46(base_pkt_a, base_pkt_b, vm1, vm2, frame_size)
@@ -451,24 +467,28 @@ def parse_args():
# help="Port 1 destination MAC address")
parser.add_argument("--p1_src_start_ip", required=True,
help="Port 1 source start IP address")
- parser.add_argument("--p1_src_end_ip", required=True,
+ parser.add_argument("--p1_src_end_ip",
+ default=False,
help="Port 1 source end IP address")
parser.add_argument("--p1_dst_start_ip", required=True,
help="Port 1 destination start IP address")
-# parser.add_argument("--p1_dst_end_ip",
-# help="Port 1 destination end IP address")
+ parser.add_argument("--p1_dst_end_ip",
+ default=False,
+ help="Port 1 destination end IP address")
# parser.add_argument("--p2_src_mac",
# help="Port 2 source MAC address")
# parser.add_argument("--p2_dst_mac",
# help="Port 2 destination MAC address")
parser.add_argument("--p2_src_start_ip", required=True,
help="Port 2 source start IP address")
- parser.add_argument("--p2_src_end_ip", required=True,
+ parser.add_argument("--p2_src_end_ip",
+ default=False,
help="Port 2 source end IP address")
parser.add_argument("--p2_dst_start_ip", required=True,
help="Port 2 destination start IP address")
-# parser.add_argument("--p2_dst_end_ip",
-# help="Port 2 destination end IP address")
+ parser.add_argument("--p2_dst_end_ip",
+ default=False,
+ help="Port 2 destination end IP address")
return parser.parse_args()