From 3e930ff13c6aa70aab57a6ff60ba9f441a281a48 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Thu, 8 Dec 2016 16:35:29 +0200 Subject: Regression: change trex14 config Doc: add readme file on how to build Change-Id: I2d3765ad90c99e6c7bd839d8c824b6c1fada9c88 Signed-off-by: Yaroslav Brustinov --- .../regression/setups/trex14/BU/benchmark.yaml | 245 +++++++++++++++++++++ .../regression/setups/trex14/BU/config.yaml | 67 ++++++ .../regression/setups/trex14/benchmark.yaml | 21 +- .../regression/setups/trex14/config.yaml | 15 +- 4 files changed, 329 insertions(+), 19 deletions(-) create mode 100644 scripts/automation/regression/setups/trex14/BU/benchmark.yaml create mode 100644 scripts/automation/regression/setups/trex14/BU/config.yaml (limited to 'scripts') diff --git a/scripts/automation/regression/setups/trex14/BU/benchmark.yaml b/scripts/automation/regression/setups/trex14/BU/benchmark.yaml new file mode 100644 index 00000000..04f13e79 --- /dev/null +++ b/scripts/automation/regression/setups/trex14/BU/benchmark.yaml @@ -0,0 +1,245 @@ +############################################################### +#### TRex benchmark configuration file #### +############################################################### + +#### common templates ### + +stat_route_dict: &stat_route_dict + clients_start : 16.0.0.1 + servers_start : 48.0.0.1 + dual_port_mask : 1.0.0.0 + client_destination_mask : 255.0.0.0 + server_destination_mask : 255.0.0.0 + +nat_dict: &nat_dict + clients_net_start : 16.0.0.0 + client_acl_wildcard_mask : 0.0.0.255 + dual_port_mask : 1.0.0.0 + pool_start : 200.0.0.0 + pool_netmask : 255.255.255.0 + + +### stateful ### + +test_jumbo: + multiplier : 17 + cores : 1 + bw_per_core : 543.232 + + +test_routing_imix: + multiplier : 10 + cores : 1 + bw_per_core : 34.128 + + +test_routing_imix_64: + multiplier : 430 + cores : 1 + bw_per_core : 5.893 + + +test_static_routing_imix: &test_static_routing_imix + stat_route_dict : *stat_route_dict + multiplier : 8 + cores : 1 + bw_per_core : 34.339 + +test_static_routing_imix_asymmetric: *test_static_routing_imix + + +test_ipv6_simple: + multiplier : 9 + cores : 2 + bw_per_core : 19.064 + + +test_nat_simple_mode1: &test_nat_simple + stat_route_dict : *stat_route_dict + nat_dict : *nat_dict + multiplier : 6000 + cores : 1 + nat_opened : 500000 + allow_timeout_dev : True + bw_per_core : 44.445 + +test_nat_simple_mode2: *test_nat_simple + +test_nat_simple_mode3: *test_nat_simple + +test_nat_learning: *test_nat_simple + + +test_nbar_simple: + multiplier : 7.5 + cores : 2 + bw_per_core : 17.174 + nbar_classification: + http : 32.58 + rtp-audio : 21.21 + oracle_sqlnet : 11.41 + exchange : 11.22 + rtp : 11.2 + citrix : 5.65 + rtsp : 2.87 + dns : 1.96 + smtp : 0.57 + pop3 : 0.37 + ssl : 0.28 + sctp : 0.13 + sip : 0.09 + unknown : 0.45 + + +test_rx_check_http: &rx_http + multiplier : 15000 + cores : 1 + rx_sample_rate : 16 + bw_per_core : 39.560 + +test_rx_check_http_ipv6: + << : *rx_http + bw_per_core : 49.237 + +test_rx_check_http_negative_disabled: + << : *rx_http + stat_route_dict : *stat_route_dict + nat_dict : *nat_dict + + +test_rx_check_sfr: &rx_sfr + multiplier : 10 + cores : 3 + rx_sample_rate : 16 + bw_per_core : 16.082 + +test_rx_check_sfr_ipv6: + << : *rx_sfr + bw_per_core : 19.198 + + + +### stateless ### + +test_CPU_benchmark: + profiles: + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 64} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 64, stream_count: 10} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 64, stream_count: 100} + cpu_util : 1 + bw_per_core : 1 + +# causes queue full +# - name : stl/udp_for_benchmarks.py +# kwargs : {packet_len: 64, stream_count: 1000} +# cpu_util : 1 +# bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 128} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 256} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 512} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 1500} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 4000} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 9000} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 9000, stream_count: 10} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_for_benchmarks.py + kwargs : {packet_len: 9000, stream_count: 100} + cpu_util : 1 + bw_per_core : 1 + +# not enough memory + queue full if memory increase +# - name : stl/udp_for_benchmarks.py +# kwargs : {packet_len: 9000, stream_count: 1000} +# cpu_util : 1 +# bw_per_core : 1 + + - name : stl/imix.py + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_1pkt_tuple_gen.py + kwargs : {packet_len: 64} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_1pkt_tuple_gen.py + kwargs : {packet_len: 128} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_1pkt_tuple_gen.py + kwargs : {packet_len: 256} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_1pkt_tuple_gen.py + kwargs : {packet_len: 512} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_1pkt_tuple_gen.py + kwargs : {packet_len: 1500} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_1pkt_tuple_gen.py + kwargs : {packet_len: 4000} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_1pkt_tuple_gen.py + kwargs : {packet_len: 9000} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/pcap.py + kwargs : {ipg_usec: 2, loop_count: 0} + cpu_util : 1 + bw_per_core : 1 + + - name : stl/udp_rand_len_9k.py + cpu_util : 1 + bw_per_core : 1 + + - name : stl/hlt/hlt_udp_rand_len_9k.py + cpu_util : 1 + bw_per_core : 1 + + diff --git a/scripts/automation/regression/setups/trex14/BU/config.yaml b/scripts/automation/regression/setups/trex14/BU/config.yaml new file mode 100644 index 00000000..0fd6b70e --- /dev/null +++ b/scripts/automation/regression/setups/trex14/BU/config.yaml @@ -0,0 +1,67 @@ +################################################################ +#### TRex nightly test configuration file #### +################################################################ + + +### TRex configuration: +# hostname - can be DNS name or IP for the TRex machine for ssh to the box +# password - root password for TRex machine +# is_dual - should the TRex inject with -p ? +# version_path - path to the TRex version and executable +# cores - how many cores should be used +# latency - rate of latency packets injected by the TRex +# modes - list of modes (tagging) of this setup (loopback etc.) +# * loopback - Trex works via loopback. Router and TFTP configurations may be skipped. +# * VM - Virtual OS (accept low CPU utilization in tests, latency can get spikes) +# * virt_nics - NICs are virtual (VMXNET3 etc.) + +### Router configuration: +# hostname - the router hostname as apears in ______# cli prefix +# ip_address - the router's ip that can be used to communicate with +# image - the desired imaged wished to be loaded as the router's running config +# line_password - router password when access via Telent +# en_password - router password when changing to "enable" mode +# interfaces - an array of client-server pairs, representing the interfaces configurations of the router +# configurations - an array of configurations that could possibly loaded into the router during the test. +# The "clean" configuration is a mandatory configuration the router will load with to run the basic test bench + +### TFTP configuration: +# hostname - the tftp hostname +# ip_address - the tftp's ip address +# images_path - the tftp's relative path in which the router's images are located + +### Test_misc configuration: +# expected_bw - the "golden" bandwidth (in Gbps) results planned on receiving from the test + +trex: + hostname : csi-trex-14 + cores : 4 + modes : [] + +router: + model : ASR1001x + hostname : csi-asr-01 + ip_address : 10.56.216.103 + image : asr1001x-universalk9.03.17.00.S.156-1.S-std.SPA.bin + line_password : cisco + en_password : cisco + mgmt_interface : GigabitEthernet0 + clean_config : /Configurations/danklei/asr1001_TRex_clean_config.cfg + intf_masking : 255.255.255.0 + ipv6_mask : 64 + interfaces : + - client : + name : Te0/0/0 + src_mac_addr : 0000.0001.0000 + dest_mac_addr : 0000.0001.0000 + server : + name : Te0/0/1 + src_mac_addr : 0000.0001.0000 + dest_mac_addr : 0000.0001.0000 + vrf_name : null + +tftp: + hostname : ats-asr-srv-1 + ip_address : 10.56.217.7 + root_dir : /scratch/tftp/ + images_path : /asr1001x/ diff --git a/scripts/automation/regression/setups/trex14/benchmark.yaml b/scripts/automation/regression/setups/trex14/benchmark.yaml index 04f13e79..0dc340b0 100644 --- a/scripts/automation/regression/setups/trex14/benchmark.yaml +++ b/scripts/automation/regression/setups/trex14/benchmark.yaml @@ -75,20 +75,19 @@ test_nbar_simple: cores : 2 bw_per_core : 17.174 nbar_classification: - http : 32.58 - rtp-audio : 21.21 - oracle_sqlnet : 11.41 - exchange : 11.22 - rtp : 11.2 - citrix : 5.65 - rtsp : 2.87 - dns : 1.96 + rtp : 32.57 + http : 30.25 + oracle_sqlnet : 11.23 + exchange : 10.80 + citrix : 5.62 + rtsp : 2.84 + dns : 1.95 smtp : 0.57 - pop3 : 0.37 - ssl : 0.28 + pop3 : 0.36 + ssl : 0.17 sctp : 0.13 sip : 0.09 - unknown : 0.45 + unknown : 3.41 test_rx_check_http: &rx_http diff --git a/scripts/automation/regression/setups/trex14/config.yaml b/scripts/automation/regression/setups/trex14/config.yaml index 0fd6b70e..ffb61763 100644 --- a/scripts/automation/regression/setups/trex14/config.yaml +++ b/scripts/automation/regression/setups/trex14/config.yaml @@ -36,28 +36,27 @@ trex: hostname : csi-trex-14 cores : 4 - modes : [] router: model : ASR1001x hostname : csi-asr-01 - ip_address : 10.56.216.103 - image : asr1001x-universalk9.03.17.00.S.156-1.S-std.SPA.bin + ip_address : 10.56.216.120 + image : asr1001x-universalk9.03.13.02.S.154-3.S2-ext.SPA.bin line_password : cisco en_password : cisco mgmt_interface : GigabitEthernet0 - clean_config : /Configurations/danklei/asr1001_TRex_clean_config.cfg + clean_config : clean_config.cfg intf_masking : 255.255.255.0 ipv6_mask : 64 interfaces : - client : name : Te0/0/0 - src_mac_addr : 0000.0001.0000 - dest_mac_addr : 0000.0001.0000 + src_mac_addr : 0000.0001.0002 + dest_mac_addr : 0000.0001.0001 server : name : Te0/0/1 - src_mac_addr : 0000.0001.0000 - dest_mac_addr : 0000.0001.0000 + src_mac_addr : 0000.0002.0002 + dest_mac_addr : 0000.0002.0001 vrf_name : null tftp: -- cgit From 64660f1ff4d245e96eb93da54e94825e37b2c115 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Fri, 9 Dec 2016 11:18:13 +0200 Subject: add CentOS7 .ko + add automatic try to compile the .ko Change-Id: I467aabb0efa8e50d779257b2a3e7ca8adf25221f Signed-off-by: Yaroslav Brustinov --- scripts/ko/3.10.0-327.el7.x86_64/igb_uio.ko | Bin 0 -> 236751 bytes scripts/trex-cfg | 24 +++++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 scripts/ko/3.10.0-327.el7.x86_64/igb_uio.ko (limited to 'scripts') diff --git a/scripts/ko/3.10.0-327.el7.x86_64/igb_uio.ko b/scripts/ko/3.10.0-327.el7.x86_64/igb_uio.ko new file mode 100644 index 00000000..a85b9add Binary files /dev/null and b/scripts/ko/3.10.0-327.el7.x86_64/igb_uio.ko differ diff --git a/scripts/trex-cfg b/scripts/trex-cfg index 714aea6c..c6f12a7e 100755 --- a/scripts/trex-cfg +++ b/scripts/trex-cfg @@ -55,13 +55,23 @@ if ! lsmod | grep -q igb_uio ; then fi else echo "ERROR: We don't have precompiled igb_uio.ko module for your kernel version" - echo "You can try compiling yourself, using the following commands:" - echo "\$cd ko/src " - echo "\$make " - echo "\$make install " - echo "\$cd - " - echo "Then try to run Trex again" - exit 1 + echo Will try compiling automatically. + { + cd ko/src && + make && + make install && + cd - + } &> /dev/null || { + echo Automatic compilation failed. + echo "You can try compiling yourself, using the following commands:" + echo "\$cd ko/src " + echo "\$make " + echo "\$make install " + echo "\$cd - " + echo "Then try to run TRex again" + exit 1 + } + echo Success. fi fi -- cgit From 85a7f31e2122b52a913a36a8af66f393e99e9bf0 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Sat, 10 Dec 2016 12:11:19 +0200 Subject: Limit ZMQ RPC requests to 999999 bytes at CPP side. TODO: split requests at Python to smaller chunks. Change-Id: Ieaf477d2ed8264e30a8275a75d597fdc8858da79 Signed-off-by: Yaroslav Brustinov --- .../stl/trex_stl_lib/trex_stl_jsonrpc_client.py | 4 ++-- .../trex_control_plane/stl/trex_stl_lib/utils/zipmsg.py | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py index 93a930e4..ce430e2b 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py @@ -130,13 +130,13 @@ class JsonRpcClient(object): if self.zipper.check_threshold(buffer): response = self.send_raw_msg(self.zipper.compress(buffer)) - if response: - response = self.zipper.decompress(response) else: response = self.send_raw_msg(buffer) if not response: return response + elif self.zipper.is_compressed(response): + response = self.zipper.decompress(response) # return to string response = response.decode() diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/zipmsg.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/zipmsg.py index 397ada16..a2a47927 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/zipmsg.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/zipmsg.py @@ -6,7 +6,7 @@ class ZippedMsg: MSG_COMPRESS_THRESHOLD = 256 MSG_COMPRESS_HEADER_MAGIC = 0xABE85CEA - def check_threshold (self, msg): + def check_threshold(self, msg): return len(msg) >= self.MSG_COMPRESS_THRESHOLD def compress (self, msg): @@ -16,7 +16,7 @@ class ZippedMsg: return new_msg - def decompress (self, msg): + def decompress(self, msg): if len(msg) < 8: return None @@ -30,3 +30,15 @@ class ZippedMsg: return x + + def is_compressed(self, msg): + if len(msg) < 8: + return False + + t = struct.unpack(">II", msg[:8]) + if (t[0] != self.MSG_COMPRESS_HEADER_MAGIC): + return False + + return True + + -- cgit From 392ca5baf8c50c90e656981bde1571feaebc7a5a Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Sat, 10 Dec 2016 22:23:31 +0200 Subject: Stateless API: send batches by chunks Change-Id: If551b474c4b6be58dfc3ed19e5c14a4ccd387afd Signed-off-by: Yaroslav Brustinov --- .../stl/trex_stl_lib/trex_stl_jsonrpc_client.py | 31 +++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py index ce430e2b..fbad9f7f 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py @@ -32,13 +32,36 @@ class BatchMessage(object): id, msg = self.rpc_client.create_jsonrpc_v2(method_name, params, api_class, encode = False) self.batch_list.append(msg) - def invoke(self, block = False): + def invoke(self, block = False, chunk_size = 500000): if not self.rpc_client.connected: return RC_ERR("Not connected to server") - msg = json.dumps(self.batch_list) - - return self.rpc_client.send_msg(msg) + if chunk_size: + response_batch = RC() + size = 0 + new_batch = [] + for msg in self.batch_list: + if size < chunk_size: + size += len(json.dumps(msg)) + new_batch.append(msg) + else: + batch_json = json.dumps(new_batch) + response = self.rpc_client.send_msg(batch_json) + if not response: + return response + response_batch.add(response) + size = 0 + new_batch = [] + if new_batch: + batch_json = json.dumps(new_batch) + response = self.rpc_client.send_msg(batch_json) + if not response: + return response + response_batch.add(response) + return response_batch + else: + batch_json = json.dumps(self.batch_list) + return self.rpc_client.send_msg(batch_json) # JSON RPC v2.0 client -- cgit From 266ac2d8209e9f63170e3ff32eefb331fca53300 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Sun, 11 Dec 2016 10:30:22 +0200 Subject: STL API: fix split batch to chunks - one packet not being sent Change-Id: Id2e96f2fe6a6c1bb0438198675a61f3c73d53072 Signed-off-by: Yaroslav Brustinov --- .../trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py index fbad9f7f..51e93f5a 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py @@ -41,10 +41,9 @@ class BatchMessage(object): size = 0 new_batch = [] for msg in self.batch_list: - if size < chunk_size: - size += len(json.dumps(msg)) - new_batch.append(msg) - else: + size += len(json.dumps(msg)) + new_batch.append(msg) + if size > chunk_size: batch_json = json.dumps(new_batch) response = self.rpc_client.send_msg(batch_json) if not response: -- cgit From 568d62a95612dd3210497c870be3d57eb728f45c Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Sun, 11 Dec 2016 09:52:48 +0200 Subject: more flexiable OFED version check Signed-off-by: Hanoh Haim --- scripts/dpdk_setup_ports.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py index 8475bdee..e445a402 100755 --- a/scripts/dpdk_setup_ports.py +++ b/scripts/dpdk_setup_ports.py @@ -352,7 +352,9 @@ Other network devices def check_ofe_version (self): ofed_info='/usr/bin/ofed_info' - ofed_ver= 'MLNX_OFED_LINUX-3.4-1.0.0.0' + ofed_ver= '-3.4-' + ofed_ver_show= '3.4-1' + if not os.path.isfile(ofed_info): print("OFED %s is not installed on this setup" % ofed_info) @@ -368,7 +370,7 @@ Other network devices if len(lines)>1: if not (ofed_ver in str(lines[0])): - print("installed OFED version is '%s' should be '%s' " % (lines[0],ofed_ver)) + print("installed OFED version is '%s' should be at least '%s' and up" % (lines[0],ofed_ver_show)) exit(-1); @@ -989,6 +991,8 @@ def main (): print(e) exit(-1) + + if __name__ == '__main__': main() -- cgit From c8410413e0c7aea0aa353b7d5dd85b0d96766197 Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Sun, 11 Dec 2016 17:05:18 +0200 Subject: Cantos MTU is printed in a different way Signed-off-by: Hanoh Haim --- scripts/dpdk_setup_ports.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py index e445a402..ce6d2b2f 100755 --- a/scripts/dpdk_setup_ports.py +++ b/scripts/dpdk_setup_ports.py @@ -324,7 +324,11 @@ Other network devices if obj: return int(obj.group(1)); else: - return -1 + obj=re.search(r'mtu (\d+)',out,flags=re.MULTILINE|re.DOTALL); + if obj: + return int(obj.group(1)); + else: + return -1 def set_mtu_mlx5 (self,dev_id,new_mtu): if len(dev_id)>0: -- cgit From 91cccaebfee5d9bcb8d33a52522a28307748482f Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Mon, 12 Dec 2016 14:46:03 +0200 Subject: tune trex-09 results Signed-off-by: Hanoh Haim --- scripts/automation/regression/setups/trex09/benchmark.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/automation/regression/setups/trex09/benchmark.yaml b/scripts/automation/regression/setups/trex09/benchmark.yaml index 1d2b57c8..9fece63f 100644 --- a/scripts/automation/regression/setups/trex09/benchmark.yaml +++ b/scripts/automation/regression/setups/trex09/benchmark.yaml @@ -221,7 +221,7 @@ test_performance_vm_multi_cpus_cached: core_count : 2 mult : "90%" mpps_per_core_golden : - min: 28.8 + min: 26.8 max: 29.5 test_performance_syn_attack_multi_cpus: -- cgit From 6c31c0534acf57fc3e0e26fe964bbc67d9d7d63c Mon Sep 17 00:00:00 2001 From: Ido Barnea Date: Mon, 12 Dec 2016 18:11:49 +0200 Subject: Added VIC tests + VIC small fix + fail tests if latency packets fail Signed-off-by: Ido Barnea --- scripts/automation/regression/setups/trex11/benchmark.yaml | 13 +++++++++++++ .../regression/stateful_tests/trex_general_test.py | 13 +++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/automation/regression/setups/trex11/benchmark.yaml b/scripts/automation/regression/setups/trex11/benchmark.yaml index a4969d2d..5ebcdd55 100644 --- a/scripts/automation/regression/setups/trex11/benchmark.yaml +++ b/scripts/automation/regression/setups/trex11/benchmark.yaml @@ -40,6 +40,19 @@ test_rx_check_http: &rx_http rx_sample_rate : 128 bw_per_core : 49.464 +test_rx_check_http_ipv6: + << : *rx_http + bw_per_core : 49.237 + +test_rx_check_sfr: &rx_sfr + multiplier : 8 + cores : 1 + rx_sample_rate : 128 + bw_per_core : 20.9 + +test_rx_check_sfr_ipv6: + << : *rx_sfr + bw_per_core : 23.9 ### stateless ### diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py index 1843af00..5c1649e7 100755 --- a/scripts/automation/regression/stateful_tests/trex_general_test.py +++ b/scripts/automation/regression/stateful_tests/trex_general_test.py @@ -257,7 +257,7 @@ class CTRexGeneral_Test(unittest.TestCase): allowed_latency = 1000 if max(trex_res.get_max_latency().values()) > allowed_latency: self.fail('LatencyError: Maximal latency exceeds %s (usec)' % allowed_latency) - + # check that avg latency does not exceed 1 msec if self.is_VM: allowed_latency = 9999999 @@ -266,6 +266,15 @@ class CTRexGeneral_Test(unittest.TestCase): if max(trex_res.get_avg_latency().values()) > allowed_latency: self.fail('LatencyError: Average latency exceeds %s (usec)' % allowed_latency) + ports_names = trex_res.get_last_value('trex-latecny-v2.data', 'port\-\d+') + if not ports_names: + raise AbnormalResultError('Could not find ports info in TRex results, path: trex-latecny-v2.data.port-*') + for port_name in ports_names: + path = 'trex-latecny-v2.data.%s.hist.cont' % port_name + lat_count = trex_res.get_last_value(path) + if lat_count == 0: + self.fail('LatencyError: Number of latency packets received on %s is 0' % port_name) + if not self.is_loopback: # check router number of drops --> deliberately masked- need to be figured out!!!!! pkt_drop_stats = self.router.get_drop_stats() @@ -359,7 +368,7 @@ class CTRexGeneral_Test(unittest.TestCase): print("Can't get TRex log:", e) if len(self.fail_reasons): sys.stdout.flush() - raise Exception('The test is failed, reasons:\n%s' % '\n'.join(self.fail_reasons)) + raise Exception('Test failed. Reasons:\n%s' % '\n'.join(self.fail_reasons)) sys.stdout.flush() def check_for_trex_crash(self): -- cgit From fe755604ec04ed7f8622394f99f0048901dad4e1 Mon Sep 17 00:00:00 2001 From: Ido Barnea Date: Tue, 13 Dec 2016 16:33:25 +0200 Subject: Small fix left out in 6c31c0534acf57fc3e0e26fe964bbc67d9d7d63c Signed-off-by: Ido Barnea --- scripts/automation/regression/stateful_tests/trex_general_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py index 5c1649e7..fe38ed34 100755 --- a/scripts/automation/regression/stateful_tests/trex_general_test.py +++ b/scripts/automation/regression/stateful_tests/trex_general_test.py @@ -270,7 +270,7 @@ class CTRexGeneral_Test(unittest.TestCase): if not ports_names: raise AbnormalResultError('Could not find ports info in TRex results, path: trex-latecny-v2.data.port-*') for port_name in ports_names: - path = 'trex-latecny-v2.data.%s.hist.cont' % port_name + path = 'trex-latecny-v2.data.%s.hist.cnt' % port_name lat_count = trex_res.get_last_value(path) if lat_count == 0: self.fail('LatencyError: Number of latency packets received on %s is 0' % port_name) -- cgit