stl benchmark: step by step config creation
authorYaroslav Brustinov <[email protected]>
Sun, 16 Oct 2016 06:26:14 +0000 (09:26 +0300)
committerYaroslav Brustinov <[email protected]>
Sun, 16 Oct 2016 06:26:14 +0000 (09:26 +0300)
trex_stateless_bench.asciidoc

index fc55e77..d4bd536 100755 (executable)
@@ -1,5 +1,5 @@
-XL710 Statless benchmark
-========================
+TRex Stateless support
+======================
 :email: [email protected] 
 :quotes.++:
 :numbered:
@@ -68,8 +68,6 @@ TRex port 1 &#8596; Switch port Eth1/50 (vlan 1005) &#8596; Switch port Eth1/52
 <1> Extrapolated L1 bandwidth per 1 core @ 100% CPU utilization.
 <2> Extrapolated amount of MPPS per 1 core @ 100% CPU utilization.
 
-INFO: XL710 NIC does not support linerate for 64B by design. only 128B is supported.  
-
 == Appendix
 
 === Preparing setup and running the tests.
@@ -89,10 +87,9 @@ Bare Intel NICs don't work with Cisco QSFP+ optics, for such case you will need
 * Obtain the latest TRex package: wget https://trex-tgn.cisco.com/trex/release/latest
 * Untar the package: tar -xzf latest
 * Change dir to unzipped TRex
-* Create config file using command: sudo python dpdk_setup_ports.py -i  *TBD more info here*
+* Create config file using command: sudo python dpdk_setup_ports.py -i
 ** In case of Ubuntu 16 need python3
-** The script by default produces config for loopback or L2 Switch as DUT (ports connection 1&#8596;2, 3&#8596;4 etc.). +
-If you have router or L3 switch, change the destination MACs of TRex interfaces to match the DUT one's.
+** See paragraph link:trex_stateless_bench.html#_config_creation[config creation] for detailed step-by-step
 
 ==== The tests
 
@@ -107,6 +104,100 @@ If you have router or L3 switch, change the destination MACs of TRex interfaces
 ** start -f stl/bench.py -m 30mpps --port 0 -t size=64,vm=cached
 ** start -f stl/bench.py -m 100% -t size=1514,vm=random --force
 
+==== Config creation
+
+In our setup we will not use hyper-threading. +
+We will start with command: +
+sudo ./dpdk_setup_ports.py -i --no-ht +
+ +
+Printed table with interfaces info:
+
+[cols="4,6,9,19,33,9,10,10", options="header"]
+|=================
+^| ID ^| NUMA ^|   PCI   ^|        MAC        ^|              Name               ^| Driver  ^| Linux IF ^|  Active
+| 0  | 0    | 02:00.0 | 68:05:ca:32:15:b0 | Device 1583                     | i40e    | p1p1     |
+| 1  | 0    | 02:00.1 | 68:05:ca:32:15:b1 | Device 1583                     | i40e    | p1p2     |
+| 2  | 0    | 05:00.0 | 00:E0:ED:5D:82:D1 | Device 1583                     | igb_uio |          |
+| 3  | 0    | 05:00.1 | 00:E0:ED:5D:82:D2 | Device 1583                     | igb_uio |          |
+| 4  | 0    | 0a:00.0 | 04:62:73:5f:e8:a8 | I350 Gigabit Network Connection | igb     | p4p1     | \*Active*
+| 5  | 0    | 0a:00.1 | 04:62:73:5f:e8:a9 | I350 Gigabit Network Connection | igb     | p4p2     |
+| 6  | 1    | 84:00.0 | 68:05:CA:32:0C:38 | Device 1583                     | igb_uio |          |
+| 7  | 1    | 84:00.1 | 68:05:CA:32:0C:39 | Device 1583                     | igb_uio |          |d
+|=================
+
+We will be asked to specify interfaces for TRex usage:
+
+==========================
+Please choose even number of interfaces either by ID or PCI or Linux IF (look at columns above). +
+Stateful will use order of interfaces: Client1 Server1 Client2 Server2 etc. for flows. +
+Stateless can be in any order. +
+Try to choose each pair of interfaces to be on same NUMA within the pair for performance. +
+Enter list of interfaces in line (for example: 1 3) : *2 3 6 7*
+==========================
+
+In our setup we have used 2, 3, 6, 7. +
+Next, we need to specify destination MAC addresses for given interfaces. +
+By default assumed loopback or L2 Switch with ports connection: 1^st^ port&#8596;2^nd^ port, 3^rd^ port&#8596;4^th^ port etc. +
+If you have router or L3 switch or some different connection, change the destination MACs accordingly. +
+In our case, ports are connected 2&#8596;7, 3&#8596;6. +
+We will give proper MACs as destination by clicking "y" and copy-paste MAC:
+
+==========================
+For interface 2, assuming loopback to it's dual interface 3. +
+Destination MAC is 00:E0:ED:5D:82:D2. Change it to MAC of DUT? (y/N).*y* +
+Please enter new destination MAC of interface 2: *68:05:CA:32:0C:39* +
+For interface 3, assuming loopback to it's dual interface 2. +
+Destination MAC is 00:E0:ED:5D:82:D1. Change it to MAC of DUT? (y/N).*y* +
+Please enter new destination MAC of interface 3: *68:05:CA:32:0C:38* +
+For interface 6, assuming loopback to it's dual interface 7. +
+Destination MAC is 68:05:CA:32:0C:39. Change it to MAC of DUT? (y/N).*y* +
+Please enter new destination MAC of interface 6: *00:E0:ED:5D:82:D2* +
+For interface 7, assuming loopback to it's dual interface 6. +
+Destination MAC is 68:05:CA:32:0C:38. Change it to MAC of DUT? (y/N).*y* +
+Please enter new destination MAC of interface 7: *00:E0:ED:5D:82:D1*
+==========================
+
+Finally, you can print generated config and save it to file:
+
+==========================
+Print preview of generated config? (Y/n) +
+++++
+<pre>### Config file generated by dpdk_setup_ports.py ###
+
+- port_limit: 4
+  version: 2
+  interfaces: ['05:00.0', '05:00.1', '84:00.0', '84:00.1']
+  port_info:
+      - dest_mac: [0x68, 0x05, 0xca, 0x32, 0x0c, 0x39]
+        src_mac:  [0x00, 0xe0, 0xed, 0x5d, 0x82, 0xd1]
+      - dest_mac: [0x68, 0x05, 0xca, 0x32, 0x0c, 0x38]
+        src_mac:  [0x00, 0xe0, 0xed, 0x5d, 0x82, 0xd2]
+
+      - dest_mac: [0x00, 0xe0, 0xed, 0x5d, 0x82, 0xd2]
+        src_mac:  [0x68, 0x05, 0xca, 0x32, 0x0c, 0x38]
+      - dest_mac: [0x00, 0xe0, 0xed, 0x5d, 0x82, 0xd1]
+        src_mac:  [0x68, 0x05, 0xca, 0x32, 0x0c, 0x39]
+
+  platform:
+      master_thread_id: 0
+      latency_thread_id: 15
+      dual_if:
+        - socket: 0
+          threads: [1,2,3,4,5,6,7] +
+
+        - socket: 1
+          threads: [8,9,10,11,12,13,14]
+
+</pre>
+++++
+Save the config to file? (Y/n) +
+Default filename is /etc/trex_cfg.yaml +
+Press ENTER to confirm or enter new file: +
+File /etc/trex_cfg.yaml already exist, overwrite? (y/N)*y* +
+Saved.
+==========================
+
+
 === Some of screenshots of console with commands
 
 ==== 64 bytes