From 7b3c33b9769bac4ec62f330f8f54338cd7d28d2d Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Tue, 15 Nov 2016 15:26:23 +0200 Subject: backup old trex-07 setup config Signed-off-by: Hanoh Haim --- linux_dpdk/ws_main.py | 4 +- .../regression/setups/trex07/backup/benchmark.yaml | 244 +++++++++++++++++++++ .../regression/setups/trex07/backup/config.yaml | 66 ++++++ .../regression/setups/trex07/benchmark.yaml | 167 +++++++------- .../regression/setups/trex07/config.yaml | 29 +-- .../regression/stateless_tests/stl_rx_test.py | 16 +- scripts/dpdk_setup_ports.py | 27 +++ src/flow_stat_parser.cpp | 1 + 8 files changed, 432 insertions(+), 122 deletions(-) create mode 100644 scripts/automation/regression/setups/trex07/backup/benchmark.yaml create mode 100644 scripts/automation/regression/setups/trex07/backup/config.yaml diff --git a/linux_dpdk/ws_main.py b/linux_dpdk/ws_main.py index ce877d6d..9c4c877f 100755 --- a/linux_dpdk/ws_main.py +++ b/linux_dpdk/ws_main.py @@ -764,8 +764,8 @@ def build_prog (bld, build_obj): # add electric fence only for debug image debug_file_list=''; - if not build_obj.isRelease (): - debug_file_list +=ef_src.file_list(top) + #if not build_obj.isRelease (): + # debug_file_list +=ef_src.file_list(top) bld.objects( diff --git a/scripts/automation/regression/setups/trex07/backup/benchmark.yaml b/scripts/automation/regression/setups/trex07/backup/benchmark.yaml new file mode 100644 index 00000000..0dc340b0 --- /dev/null +++ b/scripts/automation/regression/setups/trex07/backup/benchmark.yaml @@ -0,0 +1,244 @@ +############################################################### +#### 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: + 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.36 + ssl : 0.17 + sctp : 0.13 + sip : 0.09 + unknown : 3.41 + + +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/trex07/backup/config.yaml b/scripts/automation/regression/setups/trex07/backup/config.yaml new file mode 100644 index 00000000..db6e9bf8 --- /dev/null +++ b/scripts/automation/regression/setups/trex07/backup/config.yaml @@ -0,0 +1,66 @@ +################################################################ +#### 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-07 + cores : 4 + +router: + model : ASR1001x + hostname : csi-asr-01 + 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 : clean_config.cfg + intf_masking : 255.255.255.0 + ipv6_mask : 64 + interfaces : + - client : + name : Te0/0/0 + src_mac_addr : 0000.0001.0002 + dest_mac_addr : 0000.0001.0001 + server : + name : Te0/0/1 + src_mac_addr : 0000.0002.0002 + dest_mac_addr : 0000.0002.0001 + 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/trex07/benchmark.yaml b/scripts/automation/regression/setups/trex07/benchmark.yaml index 0dc340b0..04cda4aa 100644 --- a/scripts/automation/regression/setups/trex07/benchmark.yaml +++ b/scripts/automation/regression/setups/trex07/benchmark.yaml @@ -4,120 +4,57 @@ #### 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 + multiplier : 150 + cores : 2 + bw_per_core : 962.464 test_routing_imix: - multiplier : 10 - cores : 1 - bw_per_core : 34.128 + multiplier : 80 + cores : 4 + bw_per_core : 55.130 test_routing_imix_64: - multiplier : 430 - cores : 1 - bw_per_core : 5.893 + multiplier : 8000 + cores : 7 + bw_per_core : 11.699 -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_static_routing_imix_asymmetric: + multiplier : 70 + cores : 3 + bw_per_core : 50.561 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: - 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.36 - ssl : 0.17 - sctp : 0.13 - sip : 0.09 - unknown : 3.41 + multiplier : 80 + cores : 7 + bw_per_core : 25.948 test_rx_check_http: &rx_http - multiplier : 15000 - cores : 1 - rx_sample_rate : 16 - bw_per_core : 39.560 + multiplier : 99000 + cores : 3 + rx_sample_rate : 128 + bw_per_core : 49.464 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 + multiplier : 80 + cores : 7 + rx_sample_rate : 128 + bw_per_core : 20.871 test_rx_check_sfr_ipv6: << : *rx_sfr bw_per_core : 19.198 - ### stateless ### test_CPU_benchmark: @@ -178,10 +115,10 @@ test_CPU_benchmark: 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 + #- 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 @@ -241,4 +178,52 @@ test_CPU_benchmark: cpu_util : 1 bw_per_core : 1 +test_performance_vm_single_cpu: + cfg: + mult : "90%" + mpps_per_core_golden : + min: 16.2 + max: 17.3 + + +test_performance_vm_single_cpu_cached: + cfg: + mult : "90%" + mpps_per_core_golden : + min: 29.5 + max: 31.2 + + + +test_performance_syn_attack_single_cpu: + cfg: + mult : "90%" + mpps_per_core_golden : + min: 12.9 + max: 14.5 + +test_performance_vm_multi_cpus: + cfg: + core_count : 2 + mult : "90%" + mpps_per_core_golden : + min: 15.2 + max: 16.3 + + +test_performance_vm_multi_cpus_cached: + cfg: + core_count : 2 + mult : "90%" + mpps_per_core_golden : + min: 28.8 + max: 29.5 + +test_performance_syn_attack_multi_cpus: + cfg: + core_count : 2 + mult : "90%" + mpps_per_core_golden : + min: 13.0 + max: 13.8 diff --git a/scripts/automation/regression/setups/trex07/config.yaml b/scripts/automation/regression/setups/trex07/config.yaml index db6e9bf8..10472c4f 100644 --- a/scripts/automation/regression/setups/trex07/config.yaml +++ b/scripts/automation/regression/setups/trex07/config.yaml @@ -35,32 +35,7 @@ trex: hostname : csi-trex-07 - cores : 4 + cores : 8 + modes : ['loopback'] -router: - model : ASR1001x - hostname : csi-asr-01 - 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 : clean_config.cfg - intf_masking : 255.255.255.0 - ipv6_mask : 64 - interfaces : - - client : - name : Te0/0/0 - src_mac_addr : 0000.0001.0002 - dest_mac_addr : 0000.0001.0001 - server : - name : Te0/0/1 - src_mac_addr : 0000.0002.0002 - dest_mac_addr : 0000.0002.0001 - 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/stateless_tests/stl_rx_test.py b/scripts/automation/regression/stateless_tests/stl_rx_test.py index 524ad4bf..14fcbd0f 100644 --- a/scripts/automation/regression/stateless_tests/stl_rx_test.py +++ b/scripts/automation/regression/stateless_tests/stl_rx_test.py @@ -51,6 +51,17 @@ class STLRX_Test(CStlGeneral_Test): 'latency_9k_enable': False, 'allow_packets_drop_num': 1, # allow 1 pkt drop }, + + 'librte_pmd_mlx5': { + 'rate_percent': 80, + 'total_pkts': 1000, + 'rate_latency': 1, + 'latency_9k_enable': True, + 'latency_9k_max_average': 100, + 'latency_9k_max_latency': 250, + }, + + } CStlGeneral_Test.setUp(self) @@ -63,7 +74,6 @@ class STLRX_Test(CStlGeneral_Test): port_info = self.c.get_port_info(ports = self.rx_port)[0] self.speed = port_info['speed'] - cap = port_info['rx']['caps'] if "flow_stats" not in cap or "latency" not in cap: self.skip('port {0} does not support RX'.format(self.rx_port)) @@ -400,12 +410,14 @@ class STLRX_Test(CStlGeneral_Test): s_port=random.sample(all_ports, random.randint(1, len(all_ports)) ) s_port=sorted(s_port) - if self.speed == 40 : + print s_port + if self.speed == 40 || self.speed == 100: # the NIC does not support all full rate in case both port works let's filter odd ports s_port=list(filter(lambda x: x % 2==0, s_port)) if len(s_port)==0: s_port=[0]; + error=1; for j in range(0,5): print(" {4} - duration {0} pgid {1} pkt_size {2} s_port {3} ".format(duration,pgid,pkt_size,s_port,j)); diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py index d3b65c5b..2f06b78f 100755 --- a/scripts/dpdk_setup_ports.py +++ b/scripts/dpdk_setup_ports.py @@ -291,6 +291,32 @@ Other network devices self.write_pci (pci_id,68,val) assert(self.read_pci (pci_id,68)==val); + def get_mtu_mlx5 (self,dev_id): + if len(dev_id)>0: + out=subprocess.check_output(['ifconfig', dev_id]) + out=out.decode(errors='replace'); + 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: + out=subprocess.check_output(['ifconfig', dev_id,'mtu',str(new_mtu)]) + out=out.decode(errors='replace'); + + + def set_max_mtu_mlx5_device(self,dev_id): + mtu=9*1024+22 + dev_mtu=self.get_mtu_mlx5 (dev_id); + if (dev_mtu>0) and (dev_mtu!=mtu): + self.set_mtu_mlx5(dev_id,mtu); + if self.get_mtu_mlx5(dev_id) != mtu: + print("Could not set MTU to %d" % mtu) + exit(-1); + + def disable_flow_control_mlx5_device (self,dev_id): if len(dev_id)>0: @@ -440,6 +466,7 @@ Other network devices if 'Interface' in self.m_devices[key]: dev_id=self.m_devices[key]['Interface'] self.disable_flow_control_mlx5_device (dev_id) + self.set_max_mtu_mlx5_device(dev_id) if only_check_all_mlx: diff --git a/src/flow_stat_parser.cpp b/src/flow_stat_parser.cpp index c0813c3e..4a6722e6 100644 --- a/src/flow_stat_parser.cpp +++ b/src/flow_stat_parser.cpp @@ -129,6 +129,7 @@ int CFlowStatParser::set_ip_id(uint32_t new_id) { } if (m_ipv6) { + m_ipv6->setTrafficClass(m_ipv6->getTrafficClass()|TOS_TTL_RESERVE_DUPLICATE); m_ipv6->setFlowLabel(new_id); return 0; } -- cgit 1.2.3-korg