script for creating trex_cfg.yaml info
authorYaroslav Brustinov <[email protected]>
Thu, 18 Aug 2016 23:37:28 +0000 (02:37 +0300)
committerYaroslav Brustinov <[email protected]>
Thu, 18 Aug 2016 23:37:28 +0000 (02:37 +0300)
release_notes.asciidoc
trex_book.asciidoc

index 0877be9..e2c8385 100755 (executable)
@@ -27,7 +27,7 @@ endif::backend-docbook[]
 
 * Scapy JSON-RPC server for GUI packet crafting, see  link:trex_scapy_rpc_server.html[trex_scapy_rpc_server]
 * Client.start Python API supports Core mask  - significantly improve the Stateless performance. link:cp_stl_docs/_modules/trex_stl_lib/trex_stl_client.html#STLClient.start[start API],  *TBD*- Itay to update the pointer here  
-* Upgrade the ./dpdk_setup_ports.py script. It simplifies the way to create first time *optimized* config file (/etc/trex_cfg.yaml)
+* Upgrade the ./dpdk_setup_ports.py script. It simplifies the way to create first time *optimized* config file (/etc/trex_cfg.yaml). More info at the manual: link:trex_manual.html#_script_for_creating_config_file[Script for creating config file]
 
 [source,bash]
 ----
@@ -35,8 +35,6 @@ $sudo ./dpdk_setup_ports.py script -t            # show the list of ports
 $sudo ./dpdk_setup_ports.py  -c  03:00.0 03:00.1 # create optimum /etc/trex_cfg.yaml file 
 ----
 
-*Yaroslav* TBD 
-
 * Basic Cisco VIC functionality works now. Advanced Stateless/Stateful functionality is still not supported.
 * Enforce latest firmware for XL710/X710 (5.04)
 * Add a way to stop/close NICS at TRex termination (link would be down) `-close-at-end`
index 0c621d8..b8de9f3 100755 (executable)
@@ -438,6 +438,58 @@ and example
 
 // where can we describe this limitation (TRex supports only one type of NIC at a time. You cannot mix different NIC types in one config file.) and other limitations?
 
+==== Script for creating config file
+
+We provide a script to create configuration file by specifying as input desired interfaces.
+Examples of using:
+
+* Get view of all ports as table:
+
+[source,bash]
+----
+sudo ./dpdk_setup_ports.py -t
+----
+
+* Create config file with given interfaces. You can use PCI addresses or Linux IF (eth1 etc.):
+
+[source,bash]
+----
+sudo ./dpdk_setup_ports.py -c 13:00.0 eth3 --dump -o /etc/trex_cfg.yaml
+### Config file generated by dpdk_setup_ports.py ###
+
+- port_limit: 2
+  version: 2
+  interfaces: ['13:00.0', '1b:00.0']
+  port_info:
+      - dest_mac: [0x00, 0x0c, 0x29, 0x2a, 0x99, 0xda] # MAC OF LOOPBACK TO IT'S DUAL INTERFACE
+        src_mac:  [0x00, 0x0c, 0x29, 0x2a, 0x99, 0xd0]
+      - dest_mac: [0x00, 0x0c, 0x29, 0x2a, 0x99, 0xd0] # MAC OF LOOPBACK TO IT'S DUAL INTERFACE
+        src_mac:  [0x00, 0x0c, 0x29, 0x2a, 0x99, 0xda]
+
+  platform:
+      master_thread_id: 0
+      latency_thread_id: 1
+      dual_if:
+        - socket: 0
+          threads: [2]
+----
+
+.Arguments of dpdk_setup_ports.py script
+[options="header",cols="2,5,3",width="100%"]
+|=================
+| Arg | Description | Example
+| -c  | Create a configuration file by specified interfaces (PCI address or Linux names: eth1 etc.) | -c 03:00.1 eth1 eth4 84:00.0
+| --dump | Dump created config to screen. |
+| -o | Output the config to this file. | -o /etc/trex_cfg.yaml
+| --dest-macs | Destination MACs to be used in created yaml file per each interface. Without specifying the option, will be assumed loopback (0&#8660;1, 2&#8660;3 etc.) | --dest-macs 11:11:11:11:11:11 22:22:22:22:22:22
+| --ci | Cores include: White list of cores to use. Make sure there is enough for each NUMA. | --ci 0 2 4 5 6
+| --ce | Cores exclude: Black list of cores to exclude. Make sure there will be enough for each NUMA. | --ci 10 11 12
+| --no-ht | No HyperThreading: Use only one thread of each Core in created config yaml. |
+| --prefix | Advanced option: prefix to be used in TRex config in case of parallel instances. | --prefix first_instance
+| --zmq-pub-port | Advanced option: ZMQ Publisher port to be used in TRex config in case of parallel instances. | --zmq-pub-port 4000
+| --zmq-rpc-port | Advanced option: ZMQ RPC port to be used in TRex config in case of parallel instances. | --zmq-rpc-port
+| --ignore-numa | Advanced option: Ignore NUMAs for config creation. Use this option only if you have to, as it might reduce performance. For example, if you have pair of interfaces at different NUMAs |
+|=================
 
 ==== Run TRex