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
17 $ sudo -E -S sh -c 'cat << EOF > /etc/trex_cfg.yaml
21 interfaces: ["${pci1}","${pci2}"]
23 - dest_mac: [${dest_mac1}]
24 src_mac: [${src_mac1}]
25 - dest_mac: [${dest_mac2}]
26 src_mac: [${src_mac2}]
32 threads: [1, 2, 3, 4, 5, 6, 7, 8]
35 - TRex is started in the interactive mode as a background service
39 $ sh -c 'cd <t-rex-install-dir>/scripts/ && \
40 sudo nohup ./t-rex-64 -i --prefix $(hostname) --hdrh --no-scapy-server \
41 > /tmp/trex.log 2>&1 &' > /dev/null
43 - There are traffic streams dynamically prepared for each test, based on traffic
44 profiles. The traffic is sent and the statistics obtained using API
45 :command:`trex.stl.api.STLClient`.
50 Following sequence is followed to measure packet loss:
52 - Create an instance of STLClient.
53 - Connect to the client.
56 - Send the traffic for defined time.
59 If there is a warm-up phase required, the traffic is sent also before
60 test and the statistics are ignored.
65 If measurement of latency is requested, two more packet streams are
66 created (one for each direction) with TRex flow_stats parameter set to
67 STLFlowLatencyStats. In that case, returned statistics will also include
68 min/avg/max latency values and encoded HDRHistogram data.