7 `TRex traffic generator <https://trex-tgn.cisco.com>`_ is used for majority of
8 CSIT performance tests. TRex stateless mode is used to measure NDR and PDR
9 throughputs using MLRsearch and to measure maximum transfer rate in MRR tests.
11 TRex is installed and run on the TG compute node. The typical procedure is:
13 - TRex configuration is set in its configuration file
16 $ sudo -E -S sh -c 'cat << EOF > /etc/trex_cfg.yaml
20 interfaces: ["${pci1}","${pci2}"]
22 - dest_mac: [${dest_mac1}]
23 src_mac: [${src_mac1}]
24 - dest_mac: [${dest_mac2}]
25 src_mac: [${src_mac2}]
31 threads: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
34 - TRex is started in the interactive mode as a background service
37 $ sh -c 'cd <t-rex-install-dir>/scripts/ && \
38 sudo nohup ./t-rex-64 -i --prefix $(hostname) --hdrh --no-scapy-server \
39 > /tmp/trex.log 2>&1 &' > /dev/null
41 - There are traffic streams dynamically prepared for each test, based on traffic
42 profiles. The traffic is sent and the statistics obtained using API
43 :command:`trex.stl.api.STLClient`.
48 Following sequence is followed to measure packet loss:
50 - Create an instance of STLClient.
51 - Connect to the client.
54 - Send the traffic for defined time.
57 If there is a warm-up phase required, the traffic is sent also before
58 test and the statistics are ignored.
63 If measurement of latency is requested, two more packet streams are
64 created (one for each direction) with TRex flow_stats parameter set to
65 STLFlowLatencyStats. In that case, returned statistics will also include
66 min/avg/max latency values and encoded HDRHistogram data.