diff options
-rw-r--r-- | draft_trex_stateless.asciidoc | 26 | ||||
-rwxr-xr-x | images/passthrough_adding.png | bin | 0 -> 3678 bytes | |||
-rwxr-xr-x | images/passthrough_marking.png | bin | 0 -> 21375 bytes | |||
-rwxr-xr-x | images/vSwitch_loopback.png | bin | 0 -> 3578 bytes | |||
-rwxr-xr-x | images/vSwitch_main.png | bin | 0 -> 4880 bytes | |||
-rwxr-xr-x | images/vSwitch_networks.png | bin | 0 -> 2400 bytes | |||
-rwxr-xr-x | trex_book.asciidoc | 24 |
7 files changed, 39 insertions, 11 deletions
diff --git a/draft_trex_stateless.asciidoc b/draft_trex_stateless.asciidoc index 0a6f7d3c..8884a89c 100644 --- a/draft_trex_stateless.asciidoc +++ b/draft_trex_stateless.asciidoc @@ -2485,16 +2485,22 @@ In this example, change the fsize to 1500 bytes ==== Tutorial: Per stream statistics -* Per stream statistic is implemented using hardware assist on the X710/XL710 Intel NIC using flow director rules -* With I350/82599 it is implemented in software. +* Per stream statistics is implemented using hardware assist when possible (X710/XL710 Intel NICs flow director rules for example). +* With other NICs (Intel I350, 82599) it is implemented in software. +* Implementation works as follows: +1. User chooses 32 bit packet group id (pg_id). +1. IPv4 Identification field of the stream is changed to a value with in a reserved range (0xff00 to 0xffff). Notice that if a stream for which +no statistics is needed has IPv4 Identification in the reserved range, it is changed (left bit becomes 0). +1. In the software implementation, hardware rules are used to direct packets from relevant streams to rx thread, where they are counted. +In the hardware implementation, HW rules are inserted to count packets from relevant streams. +1. Summed up statistics (per stream, per port) are sent using ZMQ async channel to clients. - [TODO IDO] +* Limitations: -1. Works only for IPv4 (with or without VLAN) -2. IPv4 Identification field is changed to a reserve values. -3. All users acquire interfaces is configured with a rule to count this stream id (base on IPV4.id) -4. Client sum the counter per stream (it is sent on ZMQ async channel) -5. Number of RX stats are 128 +1. Currently, the feature supports only two packet types: +a. IPv4 over ethernet +b. IPv4 with one vlan tag +2. Number of concurrent streams you can get statistics for is 128. [source,python] @@ -2507,11 +2513,11 @@ class STLS1(object): STLPktBuilder( pkt ="stl/yaml/udp_64B_no_crc.pcap"), mode = STLTXCont(pps=10), - rx_stats = STLRxStats(user_id = 7)) <1> + rx_stats = STLRxStats(pg_id = 7)) <1> ] ---- -<1> Configure this stream to be count on all RX ports as user_id=7 +<1> Configure this stream to be counted on all RX ports as packet group id 7 * TUI should show Tx/Rx stats [TODO] * Python API to get the info [TODO] diff --git a/images/passthrough_adding.png b/images/passthrough_adding.png Binary files differnew file mode 100755 index 00000000..4b2c3167 --- /dev/null +++ b/images/passthrough_adding.png diff --git a/images/passthrough_marking.png b/images/passthrough_marking.png Binary files differnew file mode 100755 index 00000000..f3d4ac7b --- /dev/null +++ b/images/passthrough_marking.png diff --git a/images/vSwitch_loopback.png b/images/vSwitch_loopback.png Binary files differnew file mode 100755 index 00000000..6becc4d7 --- /dev/null +++ b/images/vSwitch_loopback.png diff --git a/images/vSwitch_main.png b/images/vSwitch_main.png Binary files differnew file mode 100755 index 00000000..37e0b08e --- /dev/null +++ b/images/vSwitch_main.png diff --git a/images/vSwitch_networks.png b/images/vSwitch_networks.png Binary files differnew file mode 100755 index 00000000..eca79142 --- /dev/null +++ b/images/vSwitch_networks.png diff --git a/trex_book.asciidoc b/trex_book.asciidoc index f0ef132b..3c7b30fd 100755 --- a/trex_book.asciidoc +++ b/trex_book.asciidoc @@ -441,7 +441,21 @@ zmq publisher at: tcp://*:4500 WARNING: If you don't see rx packets, revisit your MAC address configuration. -==== Running TRex for the first time with virtual NICs + vSwitch +==== Running TRex for the first time with ESXi: + +* Virtual NICs can be used to bridge between TRex and non-supported NICs or get some basic impression/testing. Bandwidth is limited by vSwitch, has ipv6 issues. + +1. Click on the host machine, enter Configuration -> Networking. + +a. One of the NICs should be connected to the main vSwitch network to get "outside" connection, for the TRex client and ssh: + +image:images/vSwitch_main.png[title="vSwitch_main"] + +b. Other NICs that are used for TRex traffic should be in distinguish vSwitch: + +image:images/vSwitch_loopback.png[title="vSwitch_loopback"] + +2. Right click on guest machine -> Edit settings -> Ensure the NICs are set to their networks: + +image:images/vSwitch_networks.png[title="vSwitch_networks"] + [NOTE] ===================================================================== @@ -452,6 +466,14 @@ sudo ./t-rex-64 -f cap2/dns.yaml --lm 1 --lo -l 1000 -d 100 vSwitch can't know where to "route" the packet, it supposed to be fixed once TRex supports ARP ===================================================================== +* Pass-through is the way to use directly the NICs from host machine inside the VM. Has no limitations except the NIC/hardware itself. The only difference via bare-metal OS is seldom spikes of latency (~10ms). Passthrough settings can't be saved to OVA. + +1. Click on the host machine, enter Configuration -> Advanced settings -> Edit. Mark the wanted NICs. Reboot the ESXi to apply. + +image:images/passthrough_marking.png[title="passthrough_marking"] + +2. Right click on guest machine -> Edit settings -> Add -> *PCI device* -> Choose the NICs one by one. + +image:images/passthrough_adding.png[title="passthrough_adding"] + ==== Running TRex for the first time with router You can follow this presentation link:trex_config_guide.html[first time TRex configuration] |