In the above figure we would like to that stream S3 will start on all the thread after S2 was finished by all the threads
-==== Tutorial: Pcap file to *one* stream
+==== Tutorial: Pcap file to one stream
-There is a way to load *one* packet data into a stream. There is an assumption that this pcap. only the first packet from this pcap is taken.
+*Goal*:: Load stream template packet from pcap file instaed of scapy.
+
+There is an assumption that this pcap has one packet. In case it has more only the first packet is loaded.
*file*:: link:{github_stl_path}/udp_1pkt_pcap.py[stl/udp_1pkt_pcap.py]
----
<1> packet is taken from pcap file relative to *profile* file location
-==== Tutorial: Pcap file to many streams
+==== Tutorial: Pcap file conversion to many streams
-The following example demonstrates a way to load pcap with *number* of packets and for each packet create a stream with burst of 1.
+*Goal*:: Demonstrates a way to load pcap with *number* of packets and for each packet create a stream with burst of 1. the ISG for each stream is the inter packet gap (IPG)
*file*:: link:{github_stl_path}/pcap.py[pcap.py]
----
<1> The inter stream gap in usec
<2> How many times to loop
-<3> the pcap file
-
+<3> The input pcap file
image::images/stl_tut_pcap_file1.png[title="pcap file",align="left",width=300, link="images/stl_tut_pcap_file1.png"]
-This figure illustrates how the streams look like for pcap file with 3 packet.
+This figure illustrates how the streams look like for pcap file with 3 packets.
* Each stream is configured to burst with one packet
* Each stream point to the next stream.
* The last stream point to the first with action_loop=loop_count in case it was asked (>1)
-The profile will run on only one DP thread because it has burst with one packet (see Split example)
+The profile will run on one DP thread because it has burst with one packet (Split can work in this case)
Running this example
instructions: []
split_by_var: ''
----
-<1> each stream point to the next stream
-<2> last point to the first
-<3> the number of loop is given in `action_count: 1`
-<4> self_start is disabled for all the streams except the first one
-
+<1> Each stream point to the next stream
+<2> Last point to the first
+<3> The number of loop is given in `action_count: 1`
+<4> Self_start is disabled for all the streams except the first one
==== Tutorial: Pcap file to many streams and Field Engine
==== Tutorial: Mask instruction
-The STLVmWrMaskFlowVar is a handy command. The pseudocode is a folow
+The STLVmWrMaskFlowVar is a handy instruction. The pseudocode is as follows:
.Pseudocode
[source,bash]
----
-===== Example 1
+*Example 1*::
[source,python]
----
This will cast stream variable with 2 byte to be 1 byte
-===== Example 2
+*Example 2*::
[source,python]
----
0x0300
|=================
-===== Example 3
+*Example 3*::
[source,python]
----
0x01
|=================
-
==== Tutorial: Advance traffic profile - platform [TODO]
-
-===== Direction
+*Direction*::
To make the traffic profile more usable, the traffic profile support per direction/interface.
So rate will be changed accordingly.
-===== Per Interface
+*Per Interface*::
In this case there is a different profile base on interface ID
The Console will give the port/direction and will get the right stream in each interface
-===== Tunable
+*Tunable*::
[source,python]
----
-=== Tutorials HLT profile
+==== Tutorial: HLT traffic profile
-HLTAPI is a Cisco standard API for traffic generation.IXIA and Spirent support this standard. traffic_config API has set of arguments for specifying the packet, how to send it and what field to change while sending it.
-We created a Python module that you can specify the traffic profile in HLT like format and load it as native profile for smooth transition .
+traffic_config API has set of arguments for specifying stream. In particular the packet template and which field and how to send it.
+It is possible to define a traffic profile using HTTAPI arguments .
Under the hood there is a compiler that converts it to native scapy/field engine instruction
-The support is limited to [TBD] this argument.
-
+The support is limited, see xref:altapi-support[here].
*file*:: link:{github_stl_path}/hlt/hlt_udp_inc_dec_len_9k.py[stl/hlt/hlt_udp_inc_dec_len_9k.py]
----
-
-
to run it using using the TRex Console
[source,bash]
TRex>start -f stl/hlt/hlt_udp_inc_dec_len_9k.py -m 10mbps -a
----
-
more profiles and example can be found in `stl/hlt` folder
| WORK (pause) -> PAUSE (resume )---
| |
| |
- ------------------------------------
+ --------------------------------------
-----
=== Appendix
-==== HLT supported Arguments
+==== HLT supported Arguments anchor:altapi-support[]
[source,python]