diff options
Diffstat (limited to 'scripts/automation/regression')
-rw-r--r-- | scripts/automation/regression/setups/trex24/benchmark.yaml | 155 | ||||
-rw-r--r-- | scripts/automation/regression/setups/trex24/config.yaml | 39 | ||||
-rwxr-xr-x | scripts/automation/regression/trex_unit_test.py | 16 |
3 files changed, 204 insertions, 6 deletions
diff --git a/scripts/automation/regression/setups/trex24/benchmark.yaml b/scripts/automation/regression/setups/trex24/benchmark.yaml new file mode 100644 index 00000000..96d27981 --- /dev/null +++ b/scripts/automation/regression/setups/trex24/benchmark.yaml @@ -0,0 +1,155 @@ +############################################################### +#### TRex benchmark configuration file #### +############################################################### + +### stateful ### + +test_jumbo: + multiplier : 2.8 + cores : 1 + bw_per_core : 67.030 + + +test_routing_imix: + multiplier : 1 + cores : 1 + bw_per_core : 3.979 + + +test_routing_imix_64: + multiplier : 50 + cores : 1 + bw_per_core : .681 + + +test_static_routing_imix_asymmetric: + multiplier : 0.8 + cores : 1 + bw_per_core : 13.742 + + + +### 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/trex24/config.yaml b/scripts/automation/regression/setups/trex24/config.yaml new file mode 100644 index 00000000..f4eecdf9 --- /dev/null +++ b/scripts/automation/regression/setups/trex24/config.yaml @@ -0,0 +1,39 @@ +################################################################ +#### TRex nightly test configuration file #### +################################################################ + + +### TRex configuration: +# hostname - can be DNS name or IP for the TRex machine for ssh to the box +# 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, virtual 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-24 + cores : 1 + modes : [VM, virt_nics, loopback] + diff --git a/scripts/automation/regression/trex_unit_test.py b/scripts/automation/regression/trex_unit_test.py index 4f13a50f..7c2e317b 100755 --- a/scripts/automation/regression/trex_unit_test.py +++ b/scripts/automation/regression/trex_unit_test.py @@ -224,9 +224,13 @@ class CTRexTestConfiguringPlugin(Plugin): def begin (self): - if self.pkg and self.kill_running and not CTRexScenario.is_copied: + client = CTRexScenario.trex + if self.pkg and not CTRexScenario.is_copied: + if client.master_daemon.is_trex_daemon_running() and client.get_trex_cmds() and not self.kill_running: + print("Can't update TRex, it's running") + sys.exit(-1) print('Updating TRex to %s' % self.pkg) - if not CTRexScenario.trex.master_daemon.update_trex(self.pkg): + if not client.master_daemon.update_trex(self.pkg): print('Failed updating TRex') sys.exit(-1) else: @@ -236,16 +240,16 @@ class CTRexTestConfiguringPlugin(Plugin): return if not self.no_daemon: print('Restarting TRex daemon server') - res = CTRexScenario.trex.restart_trex_daemon() + res = client.restart_trex_daemon() if not res: print('Could not restart TRex daemon server') sys.exit(-1) print('Restarted.') if self.kill_running: - CTRexScenario.trex.kill_all_trexes() + client.kill_all_trexes() else: - if CTRexScenario.trex.get_trex_cmds(): + if client.get_trex_cmds(): print('TRex is already running') sys.exit(-1) @@ -254,7 +258,7 @@ class CTRexTestConfiguringPlugin(Plugin): if 'virt_nics' in self.modes and cores > 1: raise Exception('Number of cores should be 1 with virtual NICs') if not self.no_daemon: - CTRexScenario.trex.start_stateless(c = cores) + client.start_stateless(c = cores) CTRexScenario.stl_trex = STLClient(username = 'TRexRegression', server = self.configuration.trex['trex_name'], verbose_level = self.json_verbose) |