CSIT-524: Traffic generator using python profiles 19/6019/63
authorTibor Frank <tifrank@cisco.com>
Tue, 4 Apr 2017 08:06:00 +0000 (10:06 +0200)
committerTibor Frank <tifrank@cisco.com>
Mon, 5 Jun 2017 05:40:28 +0000 (07:40 +0200)
Profile name structure:
   [trex|ixia]-[sl|sf]-[topo]-[packet structure]-[scale]

   - Traffic generator - T-rex (trex) or Ixia (ixia)
   - Stateless (sl) or statefull (sf)
   - Topology - 2-node topology (2n) or 3-node topology (3n)
   - Packet structure - eth | ip4/6 | udp
   - Scale - e.g. ip4dst1, ip6dst10000, 4000u15p

Traffic types changed to stream profiles:

 - From: 2-node-bridge
   To:   trex-sl-2n-ethip4-ip4src253

 - From: 3-node-bridge
   To:   trex-sl-3n-ethip4-ip4src254

 - From: 3-node-IPv4-dst-1000000
   To:   trex-sl-3n-ethip4-ip4dst1000000

 - From: 3-node-IPv4-dst-100000
   To:   trex-sl-3n-ethip4-ip4dst100000

 - From: 3-node-IPv4-dst-10000
   To:   trex-sl-3n-ethip4-ip4dst10000

 - From: 3-node-IPv4-dst-1000
   To:   trex-sl-3n-ethip4-ip4dst1000

 - From: 3-node-IPv4-dst-100
   To:   trex-sl-3n-ethip4-ip4dst100

 - From: 3-node-IPv4-dst-1
   To:   trex-sl-3n-ethip4-ip4dst1

 - From: 3-node-IPv4
   To:   trex-sl-3n-ethip4-ip4src253

 - From: 3-node-IPv6-dst-1000000
   To:   trex-sl-3n-ethip6-ip6dst1000000

 - From: 3-node-IPv6-dst-100000
   To:   trex-sl-3n-ethip6-ip6dst100000

 - From: 3-node-IPv6-dst-10000
   To:   trex-sl-3n-ethip6-ip6dst10000

 - From: 3-node-IPv6
   To:   trex-sl-3n-ethip6-ip6src253

 - From: 3-node-xconnect
   To:   trex-sl-3n-ethip4-ip4src254

 - From: 3-node-IPv4-SNAT-1000u-15p
   To:   trex-sl-3n-ethip4udp-1000u15p

 - From: 3-node-IPv4-SNAT-100u-15p
   To:   trex-sl-3n-ethip4udp-100u15p

 - From: 3-node-IPv4-SNAT-10u-15p
   To:   trex-sl-3n-ethip4udp-10u15p

 - From: 3-node-IPv4-SNAT-1u-15p
   To:   trex-sl-3n-ethip4udp-1u15p

 - From: 3-node-IPv4-SNAT-1u-1p
   To:   trex-sl-3n-ethip4udp-1u1p

 - From: 3-node-IPv4-SNAT-2000u-15p
   To:   trex-sl-3n-ethip4udp-2000u15p

 - From: 3-node-IPv4-SNAT-4000u-15p
   To:   trex-sl-3n-ethip4udp-4000u15p

Change-Id: If6a3cf204c93ff9f2cdccc5fd395e26b05483b58
Signed-off-by: Tibor Frank <tifrank@cisco.com>
113 files changed:
dpdk-tests/perf/10ge2p1x520-eth-l2xcbase-testpmd-ndrpdrdisc.robot
dpdk-tests/perf/10ge2p1x520-ethip4-ip4base-l3fwd-ndrpdrdisc.robot
dpdk-tests/perf/10ge2p1x710-eth-l2xcbase-testpmd-ndrpdrdisc.robot
dpdk-tests/perf/40ge2p1xl710-eth-l2xcbase-testpmd-ndrpdrdisc.robot
resources/libraries/python/TrafficGenerator.py
resources/tools/report_gen/conf.py
resources/tools/t-rex/stream_profiles/profile_trex_stateless_base_class.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-2n-ethip4-ip4src253.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst1.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst100.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst1000.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst10000.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst100000.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst1000000.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst253.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4src253.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4src254.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-1000u15p.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-100u15p.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-10u15p.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-1u15p.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-1u1p.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-2000u15p.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-4000u15p.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6dst10000.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6dst100000.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6dst1000000.py [new file with mode: 0755]
resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6src253.py [new file with mode: 0755]
resources/tools/t-rex/t-rex-stateless-profile.py [new file with mode: 0755]
resources/tools/t-rex/t-rex-stateless-stop.py
resources/tools/t-rex/t-rex-stateless.py [deleted file]
tests/perf/10ge2p1vic1227-eth-l2bdbasemaclrn-ndrpdrdisc.robot
tests/perf/10ge2p1x520-dot1ad-l2xcbase-ndrchk.robot
tests/perf/10ge2p1x520-dot1ad-l2xcbase-ndrpdrdisc.robot
tests/perf/10ge2p1x520-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrpdrdisc.robot
tests/perf/10ge2p1x520-dot1q-l2xcbase-eth-2vhost-1vm-ndrpdrdisc.robot
tests/perf/10ge2p1x520-dot1q-l2xcbase-ndrchk.robot
tests/perf/10ge2p1x520-dot1q-l2xcbase-ndrpdrdisc.robot
tests/perf/10ge2p1x520-eth-l2bdbasemaclrn-eth-2vhost-1vm-ndrpdrdisc.robot
tests/perf/10ge2p1x520-eth-l2bdbasemaclrn-eth-4vhost-2vm-ndrpdrdisc.robot
tests/perf/10ge2p1x520-eth-l2bdbasemaclrn-ndrchk.robot
tests/perf/10ge2p1x520-eth-l2bdbasemaclrn-ndrpdrdisc.robot
tests/perf/10ge2p1x520-eth-l2xcbase-eth-2vhost-1vm-ndrpdrdisc.robot
tests/perf/10ge2p1x520-eth-l2xcbase-eth-4vhost-2vm-ndrpdrdisc.robot
tests/perf/10ge2p1x520-eth-l2xcbase-ndrchk.robot
tests/perf/10ge2p1x520-eth-l2xcbase-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4base-copwhtlistbase-ndrchk.robot
tests/perf/10ge2p1x520-ethip4-ip4base-copwhtlistbase-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4base-eth-2vhost-1vm-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4base-eth-4vhost-2vm-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4base-iacldstbase-ndrchk.robot
tests/perf/10ge2p1x520-ethip4-ip4base-iacldstbase-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4base-ipolicemarkbase-ndrchk.robot
tests/perf/10ge2p1x520-ethip4-ip4base-ipolicemarkbase-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4base-ndrchk.robot
tests/perf/10ge2p1x520-ethip4-ip4base-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4base-snat-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4scale200k-ndrchk.robot
tests/perf/10ge2p1x520-ethip4-ip4scale200k-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4scale20k-ndrchk.robot
tests/perf/10ge2p1x520-ethip4-ip4scale20k-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4-ip4scale2m-ndrchk.robot
tests/perf/10ge2p1x520-ethip4-ip4scale2m-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4lispip4-ip4base-ndrchk.robot
tests/perf/10ge2p1x520-ethip4lispip4-ip4base-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4lispip6-ip4base-ndrchk.robot
tests/perf/10ge2p1x520-ethip4lispip6-ip4base-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4udp-ip4base-udpsrcscale15-snat-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4udp-ip4scale10-udpsrcscale15-snat-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4udp-ip4scale100-udpsrcscale15-snat-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4udp-ip4scale1000-udpsrcscale15-snat-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4udp-ip4scale2000-udpsrcscale15-snat-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4udp-ip4scale4000-udpsrcscale15-snat-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4vxlan-l2bdbasemaclrn-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip4vxlan-l2xcbase-ndrchk.robot
tests/perf/10ge2p1x520-ethip4vxlan-l2xcbase-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip6-ip6base-copwhtlistbase-ndrchk.robot
tests/perf/10ge2p1x520-ethip6-ip6base-copwhtlistbase-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip6-ip6base-iacldstbase-ndrchk.robot
tests/perf/10ge2p1x520-ethip6-ip6base-iacldstbase-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip6-ip6base-ndrchk.robot
tests/perf/10ge2p1x520-ethip6-ip6base-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip6-ip6scale200k-ndrchk.robot
tests/perf/10ge2p1x520-ethip6-ip6scale200k-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip6-ip6scale20k-ndrchk.robot
tests/perf/10ge2p1x520-ethip6-ip6scale20k-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip6-ip6scale2m-ndrchk.robot
tests/perf/10ge2p1x520-ethip6-ip6scale2m-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip6lispip4-ip6base-ndrchk.robot
tests/perf/10ge2p1x520-ethip6lispip4-ip6base-ndrpdrdisc.robot
tests/perf/10ge2p1x520-ethip6lispip6-ip6base-ndrchk.robot
tests/perf/10ge2p1x520-ethip6lispip6-ip6base-ndrpdrdisc.robot
tests/perf/10ge2p1x710-eth-l2bdbasemaclrn-eth-2vhost-1vm-ndrpdrdisc.robot
tests/perf/10ge2p1x710-eth-l2bdbasemaclrn-ndrpdrdisc.robot
tests/perf/40ge2p1vic1385-eth-l2bdbasemaclrn-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-eth-l2bdbasemaclrn-eth-2vhost-1vm-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-eth-l2bdbasemaclrn-eth-4vhost-2vm-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-eth-l2bdbasemaclrn-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-eth-l2xcbase-eth-4vhost-2vm-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-eth-l2xcbase-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4-ip4base-eth-4vhost-2vm-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4-ip4base-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4ipsecbasetnl-ip4base-int-aes-gcm-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4ipsecbasetnl-ip4base-int-cbc-sha1-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4ipsecbasetnl-ip4base-tnl-aes-gcm-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4ipsecbasetnl-ip4base-tnl-cbc-sha1-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4ipsecscale1000tnl-ip4base-int-aes-gcm-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4ipsecscale1000tnl-ip4base-int-cbc-sha1-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4ipsecscale1000tnl-ip4base-tnl-aes-gcm-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4ipsecscale1000tnl-ip4base-tnl-cbc-sha1-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip4ipsectptlispgpe-ip4base-cbc-sha1-ndrpdrdisc.robot
tests/perf/40ge2p1xl710-ethip6-ip6base-ndrpdrdisc.robot

index 7be3f97..5bdf58c 100644 (file)
@@ -48,6 +48,8 @@
 *** Variables ***
 # X520-DA2 bandwidth limit
 | ${s_limit} | ${10000000000}
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Test Cases ***
 | tc01-64B-1t1c-eth-l2xcbase-testpmd-ndrdisc
@@ -64,8 +66,8 @@
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc02-64B-1t1c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
@@ -81,8 +83,8 @@
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc03-1518B-1t1c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc04-1518B-1t1c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc05-9000B-1t1c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc06-9000B-1t1c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc07-64B-2t2c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc08-64B-2t2c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc09-1518B-2t2c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc10-1518B-2t2c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc11-9000B-2t2c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc12-9000B-2t2c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc13-64B-4t4c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc14-64B-4t4c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc15-1518B-4t4c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc16-1518B-4t4c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc17-9000B-4t4c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc18-9000B-4t4c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
index 3d1167b..cbfd5a8 100644 (file)
 | ... | *[Ref] Applicable standard specifications:* RFC2544.
 
 *** Variables ***
-#X520-DA2 bandwidth limit
+# X520-DA2 bandwidth limit
 | ${s_limit} | ${10000000000}
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4dst253
 
 *** Test Cases ***
 | tc01-64B-1t1c-ethip4-ip4base-l3fwd-ndrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing  config with 1 thread, 1 phy core, \
-| | ... | 1 receive queue per NIC port. [Ver] Find NDR for 64 Byte frames
-| | ... | using binary search start at 10GE linerate, step 100kpps.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 100kpps.
+| | ...
 | | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
 | | ${framesize}= | Set Variable | ${64}
 | | ${min_rate}= | Set Variable | ${100000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
 
 | tc02-64B-1t1c-ethip4-ip4base-l3fwd-pdrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core, \
-| | ... | 1 receive queue per NIC port. [Ver] Find PDR for 64 Byte frames
-| | ... | using binary search start at 10GE linerate, step 100kpps, LT=0.5%.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 100kpps, LT=0.5%.
+| | ...
 | | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${64}
 | | ${min_rate}= | Set Variable | ${100000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
-| | ...                        | ${perf_pdr_loss_acceptance}
-| | ...                        | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc03-1518B-1t1c-ethip4-ip4base-l3fwd-ndrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core, \
-| | ... | 1 receive queue per NIC port. [Ver] Find NDR for 1518 Byte frames
-| | ... | using binary search start at 10GE linerate, step 10kpps.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find NDR for 1518 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 10kpps.
+| | ...
 | | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
 | | ${framesize}= | Set Variable | ${1518}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
 
 | tc04-1518B-1t1c-ethip4-ip4base-l3fwd-pdrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core, \
-| | ... | 1 receive queue per NIC port. [Ver] Find PDR for 1518 Byte frames
-| | ... | using binary search start at 10GE linerate, step 10kpps, LT=0.5%.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find PDR for 1518 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 10kpps, LT=0.5%.
+| | ...
 | | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${1518}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
-| | ...                        | ${perf_pdr_loss_acceptance}
-| | ...                        | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc05-9000B-1t1c-ethip4-ip4base-l3fwd-ndrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core, \
-| | ... | 1 receive queue per NIC port. [Ver] Find NDR for 9000 Byte frames
-| | ... | using binary search start at 10GE linerate, step 5kpps.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find NDR for 9000 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 5kpps.
+| | ...
 | | [Tags] | 1T1C | STHREAD | NDRDISC
+| | ...
 | | ${framesize}= | Set Variable | ${9000}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '1' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
 
 | tc06-9000B-1t1c-ethip4-ip4base-l3fwd-pdrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core, \
-| | ... | 1 receive queue per NIC port. [Ver] Find PDR for 9000 Byte frames
-| | ... | using binary search start at 10GE linerate, step 5kpps, LT=0.5%.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 1 thread, 1 phy core,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find PDR for 9000 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 5kpps, LT=0.5%.
+| | ...
 | | [Tags] | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${9000}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '1' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
-| | ...                        | ${perf_pdr_loss_acceptance}
-| | ...                        | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc07-64B-2t2c-ethip4-ip4base-l3fwd-ndrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores, \
-| | ... | 1 receive queue per NIC port. [Ver] Find NDR for 64 Byte frames
-| | ... | using binary search start at 10GE linerate, step 100kpps.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 100kpps.
+| | ...
 | | [Tags] | 2T2C | MTHREAD | NDRDISC
+| | ...
 | | ${framesize}= | Set Variable | ${64}
 | | ${min_rate}= | Set Variable | ${100000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
 
 | tc08-64B-2t2c-ethip4-ip4base-l3fwd-pdrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores, \
-| | ... | 1 receive queue per NIC port. [Ver] Find PDR for 64 Byte frames
-| | ... | using binary search start at 10GE linerate, step 100kpps, LT=0.5%.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 100kpps, LT=0.5%.
+| | ...
 | | [Tags] | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${64}
 | | ${min_rate}= | Set Variable | ${100000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
-| | ...                        | ${perf_pdr_loss_acceptance}
-| | ...                        | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc09-1518B-2t2c-ethip4-ip4base-l3fwd-ndrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores, \
-| | ... | 1 receive queue per NIC port. [Ver] Find NDR for 1518 Byte frames
-| | ... | using binary search start at 10GE linerate, step 10kpps.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find NDR for 1518 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 10kpps.
+| | ...
 | | [Tags] | 2T2C | MTHREAD | NDRDISC
+| | ...
 | | ${framesize}= | Set Variable | ${1518}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
 
 | tc10-1518B-2t2c-ethip4-ip4base-l3fwd-pdrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores, \
-| | ... | 1 receive queue per NIC port. [Ver] Find PDR for 1518 Byte frames
-| | ... | using binary search start at 10GE linerate, step 10kpps, LT=0.5%.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find PDR for 1518 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 10kpps, LT=0.5%.
+| | ...
 | | [Tags] | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${1518}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
-| | ...                        | ${perf_pdr_loss_acceptance}
-| | ...                        | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc11-9000B-2t2c-ethip4-ip4base-l3fwd-ndrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores, \
-| | ... | 1 receive queue per NIC port. [Ver] Find NDR for 9000 Byte frames
-| | ... | using binary search start at 10GE linerate, step 5kpps.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find NDR for 9000 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 5kpps.
+| | ...
 | | [Tags] | 2T2C | MTHREAD | NDRDISC
+| | ...
 | | ${framesize}= | Set Variable | ${9000}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '2' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
 
 | tc12-9000B-2t2c-ethip4-ip4base-l3fwd-pdrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores, \
-| | ... | 1 receive queue per NIC port. [Ver] Find PDR for 9000 Byte frames
-| | ... | using binary search start at 10GE linerate, step 5kpps, LT=0.5%.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 2 threads, 2 phy cores,\
+| | ... | 1 receive queue per NIC port.
+| | ... | [Ver] Find PDR for 9000 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 5kpps, LT=0.5%.
+| | ...
 | | [Tags] | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${9000}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '2' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
-| | ...                        | ${perf_pdr_loss_acceptance}
-| | ...                        | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc13-64B-4t4c-ethip4-ip4base-l3fwd-ndrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores, \
-| | ... | 2 receive queues per NIC port. [Ver] Find NDR for 64 Byte frames
-| | ... | using binary search start at 10GE linerate, step 100kpps.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores,\
+| | ... | 2 receive queues per NIC port.
+| | ... | [Ver] Find NDR for 64 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 100kpps.
+| | ...
 | | [Tags] | 4T4C | MTHREAD | NDRDISC
+| | ...
 | | ${framesize}= | Set Variable | ${64}
 | | ${min_rate}= | Set Variable | ${100000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
 
 | tc14-64B-4t4c-ethip4-ip4base-l3fwd-pdrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores, \
-| | ... | 2 receive queues per NIC port. [Ver] Find PDR for 64 Byte frames
-| | ... | using binary search start at 10GE linerate, step 100kpps, LT=0.5%.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores,\
+| | ... | 2 receive queues per NIC port.
+| | ... | [Ver] Find PDR for 64 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 100kpps, LT=0.5%.
+| | ...
 | | [Tags] | 4T4C | MTHREAD | PDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${64}
 | | ${min_rate}= | Set Variable | ${100000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
-| | ...                        | ${perf_pdr_loss_acceptance}
-| | ...                        | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc15-1518B-4t4c-ethip4-ip4base-l3fwd-ndrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores, \
-| | ... | 2 receive queues per NIC port. [Ver] Find NDR for 1518 Byte frames
-| | ... | using binary search start at 10GE linerate, step 10kpps.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores,\
+| | ... | 2 receive queues per NIC port.
+| | ... | [Ver] Find NDR for 1518 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 10kpps.
+| | ...
 | | [Tags] | 4T4C | MTHREAD | NDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${1518}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
 
 | tc16-1518B-4t4c-ethip4-ip4base-l3fwd-pdrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores, \
-| | ... | 2 receive queues per NIC port. [Ver] Find PDR for 1518 Byte frames
-| | ... | using binary search start at 10GE linerate, step 10kpps, LT=0.5%.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores,\
+| | ... | 2 receive queues per NIC port.
+| | ... | [Ver] Find PDR for 1518 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 10kpps, LT=0.5%.
+| | ...
 | | [Tags] | 4T4C | MTHREAD | PDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${1518}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
-| | ...                        | ${perf_pdr_loss_acceptance}
-| | ...                        | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc17-9000B-4t4c-ethip4-ip4base-l3fwd-ndrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores, \
-| | ... | 2 receive queues per NIC port. [Ver] Find NDR for 9000 Byte frames
-| | ... | using binary search start at 10GE linerate, step 5kpps.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores,\
+| | ... | 2 receive queues per NIC port.
+| | ... | [Ver] Find NDR for 9000 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 5kpps.
+| | ...
 | | [Tags] | 4T4C | MTHREAD | NDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${9000}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '4' worker threads and rxqueues '2' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold}
 
 | tc18-9000B-4t4c-ethip4-ip4base-l3fwd-pdrdisc
 | | [Documentation]
-| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores, \
-| | ... | 2 receive queues per NIC port. [Ver] Find PDR for 9000 Byte frames
-| | ... | using binary search start at 10GE linerate, step 5kpps, LT=0.5%.
+| | ... | [Cfg] DUT runs L3 IPv4 routing config with 4 threads, 4 phy cores,\
+| | ... | 2 receive queues per NIC port.
+| | ... | [Ver] Find PDR for 9000 Byte frames using binary search start\
+| | ... | at 10GE linerate, step 5kpps, LT=0.5%.
+| | ...
 | | [Tags] | 4T4C | MTHREAD | PDRDISC | SKIP_PATCH
+| | ...
 | | ${framesize}= | Set Variable | ${9000}
 | | ${min_rate}= | Set Variable | ${10000}
 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L3FWD '4' worker threads and rxqueues '2' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                        | ${binary_max} | 3-node-IPv4-l3fwd
-| | ...                        | ${min_rate} | ${max_rate}
-| | ...                        | ${threshold}
-| | ...                        | ${perf_pdr_loss_acceptance}
-| | ...                        | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile} | ${min_rate} | ${max_rate}
+| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${perf_pdr_loss_acceptance_type}
index b7db75c..861f75a 100644 (file)
@@ -48,6 +48,8 @@
 *** Variables ***
 # X520-DA2 bandwidth limit
 | ${s_limit} | ${10000000000}
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Test Cases ***
 | tc01-64B-1t1c-eth-l2xcbase-testpmd-ndrdisc
@@ -67,8 +69,8 @@
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc02-64B-1t1c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
@@ -87,8 +89,8 @@
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc03-1518B-1t1c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc04-1518B-1t1c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc05-9000B-1t1c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc06-9000B-1t1c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc07-64B-2t2c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc08-64B-2t2c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc09-1518B-2t2c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc10-1518B-2t2c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc11-9000B-2t2c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc12-9000B-2t2c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc13-64B-4t4c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc14-64B-4t4c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc15-1518B-4t4c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc16-1518B-4t4c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc17-9000B-4t4c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc18-9000B-4t4c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
\ No newline at end of file
index d77018f..b07e4bb 100644 (file)
@@ -50,6 +50,8 @@
 | ${s_24.5G} | ${24500000000}
 # XL710-DA2 Mpps limit 37.5Mpps/2=18.75Mpps
 | ${s_18.75Mpps} | ${18750000}
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Test Cases ***
 | tc01-64B-1t1c-eth-l2xcbase-testpmd-ndrdisc
@@ -69,8 +71,8 @@
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc02-64B-1t1c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
@@ -89,8 +91,8 @@
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc03-1518B-1t1c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc04-1518B-1t1c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc05-9000B-1t1c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc06-9000B-1t1c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '1' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc07-64B-2t2c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc08-64B-2t2c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc09-1518B-2t2c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc10-1518B-2t2c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc11-9000B-2t2c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc12-9000B-2t2c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '2' worker threads and rxqueues '1' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc13-64B-4t4c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc14-64B-4t4c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc15-1518B-4t4c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc16-1518B-4t4c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'no'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc17-9000B-4t4c-eth-l2xcbase-testpmd-ndrdisc
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'yes'
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc18-9000B-4t4c-eth-l2xcbase-testpmd-pdrdisc
 | | [Documentation]
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Start L2FWD '4' worker threads and rxqueues '2' with jumbo frames 'yes'
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-xconnect | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
\ No newline at end of file
index 8fb9191..0f25ebe 100644 (file)
@@ -103,7 +103,7 @@ class TrafficGenerator(object):
         self._received = None
         self._node = None
         # T-REX interface order mapping
-        self._ifaces_reordered = 0
+        self._ifaces_reordered = False
 
     @property
     def node(self):
@@ -222,7 +222,7 @@ class TrafficGenerator(object):
                 if1_mac, if2_mac = if2_mac, if1_mac
                 if1_pci, if2_pci = if2_pci, if1_pci
                 if1_adj_mac, if2_adj_mac = if2_adj_mac, if1_adj_mac
-                self._ifaces_reordered = 1
+                self._ifaces_reordered = True
 
             if1_mac_hex = "0x"+if1_mac.replace(":", ",0x")
             if2_mac_hex = "0x"+if2_mac.replace(":", ",0x")
@@ -283,7 +283,7 @@ class TrafficGenerator(object):
                 # try again
                 max_startup_retries -= 1
             # after max retries T-rex is still not responding to API
-            # critical error occured
+            # critical error occurred
             raise RuntimeError('t-rex-64 startup failed')
 
     @staticmethod
@@ -319,7 +319,7 @@ class TrafficGenerator(object):
         ssh = SSH()
         ssh.connect(node)
 
-        (ret, stdout, stderr) = ssh.exec_command(
+        (ret, _, _) = ssh.exec_command(
             "sh -c '{}/resources/tools/t-rex/"
             "t-rex-stateless-stop.py'".format(Constants.REMOTE_FW_DIR))
 
@@ -340,395 +340,39 @@ class TrafficGenerator(object):
         :param warmup_time: Warmup time period.
         :type duration: int
         :type rate: str
-        :type framesize: int
+        :type framesize: str
         :type traffic_type: str
         :type async_call: bool
         :type latency: bool
         :type warmup_time: int
         :returns: Nothing
-        :raises: NotImplementedError if traffic type is not supported.
         :raises: RuntimeError in case of TG driver issue.
         """
         ssh = SSH()
         ssh.connect(self._node)
 
-        _p0 = 1
-        _p1 = 2
         _async = "--async" if async_call else ""
         _latency = "--latency" if latency else ""
-
-        if self._ifaces_reordered != 0:
-            _p0, _p1 = _p1, _p0
-
-        if traffic_type in ["3-node-xconnect", "3-node-bridge"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 10.10.10.1 "
-                "--p{4}_src_end_ip 10.10.10.254 "
-                "--p{4}_dst_start_ip 20.20.20.1 "
-                "--p{5}_src_start_ip 20.20.20.1 "
-                "--p{5}_src_end_ip 20.20.20.254 "
-                "--p{5}_dst_start_ip 10.10.10.1 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv4"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 10.10.10.2 "
-                "--p{4}_src_end_ip 10.10.10.254 "
-                "--p{4}_dst_start_ip 20.20.20.2 "
-                "--p{5}_src_start_ip 20.20.20.2 "
-                "--p{5}_src_end_ip 20.20.20.254 "
-                "--p{5}_dst_start_ip 10.10.10.2 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv4-dst-1"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 10.0.0.1 "
-                "--p{4}_dst_start_ip 20.0.0.0 "
-                "--p{4}_dst_end_ip 20.0.0.0 "
-                "--p{5}_src_start_ip 20.0.0.1 "
-                "--p{5}_dst_start_ip 10.0.0.0 "
-                "--p{5}_dst_end_ip 10.0.0.0 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv4-dst-100"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 10.0.0.1 "
-                "--p{4}_dst_start_ip 20.0.0.0 "
-                "--p{4}_dst_end_ip 20.0.0.99 "
-                "--p{5}_src_start_ip 20.0.0.1 "
-                "--p{5}_dst_start_ip 10.0.0.0 "
-                "--p{5}_dst_end_ip 10.0.0.99 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv4-dst-1000"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 10.0.0.1 "
-                "--p{4}_dst_start_ip 20.0.0.0 "
-                "--p{4}_dst_end_ip 20.0.3.231 "
-                "--p{5}_src_start_ip 20.0.0.1 "
-                "--p{5}_dst_start_ip 10.0.0.0 "
-                "--p{5}_dst_end_ip 10.0.3.231 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-
-        elif traffic_type in ["3-node-IPv4-SNAT-1u-1p"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 20.0.0.0 "
-                "--p{4}_src_end_ip 20.0.0.0 "
-                "--p{4}_dst_start_ip 12.0.0.2 "
-                "--p{5}_src_start_ip 12.0.0.2 "
-                "--p{5}_src_end_ip 12.0.0.2 "
-                "--p{5}_dst_start_ip 200.0.0.0 "
-                "--p{4}_src_start_udp_port 1024 "
-                "--p{4}_src_end_udp_port 1024 "
-                "--p{4}_dst_start_udp_port 1024 "
-                "--p{5}_src_start_udp_port 1024 "
-                "--p{5}_dst_start_udp_port 1028 "
-                "--p{5}_dst_end_udp_port 1028 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-
-        elif traffic_type in ["3-node-IPv4-SNAT-1u-15p"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 20.0.0.0 "
-                "--p{4}_src_end_ip 20.0.0.0 "
-                "--p{4}_dst_start_ip 12.0.0.2 "
-                "--p{5}_src_start_ip 12.0.0.2 "
-                "--p{5}_src_end_ip 12.0.0.2 "
-                "--p{5}_dst_start_ip 200.0.0.0 "
-                "--p{4}_src_start_udp_port 1024 "
-                "--p{4}_src_end_udp_port 1038 "
-                "--p{4}_dst_start_udp_port 1024 "
-                "--p{5}_src_start_udp_port 1024 "
-                "--p{5}_dst_start_udp_port 1024 "
-                "--p{5}_dst_end_udp_port 1038 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-
-        elif traffic_type in ["3-node-IPv4-SNAT-10u-15p"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 20.0.0.0 "
-                "--p{4}_src_end_ip 20.0.0.9 "
-                "--p{4}_dst_start_ip 12.0.0.2 "
-                "--p{5}_src_start_ip 12.0.0.2 "
-                "--p{5}_src_end_ip 12.0.0.2 "
-                "--p{5}_dst_start_ip 200.0.0.0 "
-                "--p{4}_src_start_udp_port 1024 "
-                "--p{4}_src_end_udp_port 1038 "
-                "--p{4}_dst_start_udp_port 1024 "
-                "--p{5}_src_start_udp_port 1024 "
-                "--p{5}_dst_start_udp_port 1024 "
-                "--p{5}_dst_end_udp_port 1173 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-
-        elif traffic_type in ["3-node-IPv4-SNAT-100u-15p"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 20.0.0.0 "
-                "--p{4}_src_end_ip 20.0.0.99 "
-                "--p{4}_dst_start_ip 12.0.0.2 "
-                "--p{5}_src_start_ip 12.0.0.2 "
-                "--p{5}_src_end_ip 12.0.0.2 "
-                "--p{5}_dst_start_ip 200.0.0.0 "
-                "--p{4}_src_start_udp_port 1024 "
-                "--p{4}_src_end_udp_port 1038 "
-                "--p{4}_dst_start_udp_port 1024 "
-                "--p{5}_src_start_udp_port 1024 "
-                "--p{5}_dst_start_udp_port 1024 "
-                "--p{5}_dst_end_udp_port 2523 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration) + 60)
-
-        elif traffic_type in ["3-node-IPv4-SNAT-1000u-15p"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 20.0.0.0 "
-                "--p{4}_src_end_ip 20.0.3.231 "
-                "--p{4}_dst_start_ip 12.0.0.2 "
-                "--p{5}_src_start_ip 12.0.0.2 "
-                "--p{5}_src_end_ip 12.0.0.2 "
-                "--p{5}_dst_start_ip 200.0.0.0 "
-                "--p{4}_src_start_udp_port 1024 "
-                "--p{4}_src_end_udp_port 1038 "
-                "--p{4}_dst_start_udp_port 1024 "
-                "--p{5}_src_start_udp_port 1024 "
-                "--p{5}_dst_start_udp_port 1024 "
-                "--p{5}_dst_end_udp_port 16023 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-
-        elif traffic_type in ["3-node-IPv4-SNAT-2000u-15p"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 20.0.0.0 "
-                "--p{4}_src_end_ip 20.0.7.207 "
-                "--p{4}_dst_start_ip 12.0.0.2 "
-                "--p{5}_src_start_ip 12.0.0.2 "
-                "--p{5}_src_end_ip 12.0.0.2 "
-                "--p{5}_dst_start_ip 200.0.0.0 "
-                "--p{4}_src_start_udp_port 1024 "
-                "--p{4}_src_end_udp_port 1038 "
-                "--p{4}_dst_start_udp_port 1024 "
-                "--p{5}_src_start_udp_port 1024 "
-                "--p{5}_dst_start_udp_port 1024 "
-                "--p{5}_dst_end_udp_port 31022 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-
-        elif traffic_type in ["3-node-IPv4-SNAT-4000u-15p"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 20.0.0.0 "
-                "--p{4}_src_end_ip 20.0.15.159 "
-                "--p{4}_dst_start_ip 12.0.0.2 "
-                "--p{5}_src_start_ip 12.0.0.2 "
-                "--p{5}_src_end_ip 12.0.0.2 "
-                "--p{5}_dst_start_ip 200.0.0.0 "
-                "--p{4}_src_start_udp_port 1024 "
-                "--p{4}_src_end_udp_port 1038 "
-                "--p{4}_dst_start_udp_port 1024 "
-                "--p{5}_src_start_udp_port 1024 "
-                "--p{5}_dst_start_udp_port 1024 "
-                "--p{5}_dst_end_udp_port 61022 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-
-        elif traffic_type in ["3-node-IPv4-dst-10000"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 10.0.0.1 "
-                "--p{4}_dst_start_ip 20.0.0.0 "
-                "--p{4}_dst_end_ip 20.0.39.15 "
-                "--p{5}_src_start_ip 20.0.0.1 "
-                "--p{5}_dst_start_ip 10.0.0.0 "
-                "--p{5}_dst_end_ip 10.0.39.15 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv4-dst-100000"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 10.0.0.1 "
-                "--p{4}_dst_start_ip 20.0.0.0 "
-                "--p{4}_dst_end_ip 20.1.134.159 "
-                "--p{5}_src_start_ip 20.0.0.1 "
-                "--p{5}_dst_start_ip 10.0.0.0 "
-                "--p{5}_dst_end_ip 10.1.134.159 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv4-dst-1000000"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 10.0.0.1 "
-                "--p{4}_dst_start_ip 20.0.0.0 "
-                "--p{4}_dst_end_ip 20.15.66.63 "
-                "--p{5}_src_start_ip 20.0.0.1 "
-                "--p{5}_dst_start_ip 10.0.0.0 "
-                "--p{5}_dst_end_ip 10.15.66.63 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv6"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} -6 "
-                "--p{4}_src_start_ip 2001:1::2 "
-                "--p{4}_src_end_ip 2001:1::FE "
-                "--p{4}_dst_start_ip 2001:2::2 "
-                "--p{5}_src_start_ip 2001:2::2 "
-                "--p{5}_src_end_ip 2001:2::FE "
-                "--p{5}_dst_start_ip 2001:1::2 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv6-dst-10000"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} -6 "
-                "--p{4}_src_start_ip 2001:1::1 "
-                "--p{4}_dst_start_ip 2001:2::0 "
-                "--p{4}_dst_end_ip 2001:2::270F "
-                "--p{5}_src_start_ip 2001:2::1 "
-                "--p{5}_dst_start_ip 2001:1::0 "
-                "--p{5}_dst_end_ip 2001:1::270F "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv6-dst-100000"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} -6 "
-                "--p{4}_src_start_ip 2001:1::1 "
-                "--p{4}_dst_start_ip 2001:2::0 "
-                "--p{4}_dst_end_ip 2001:2::1:869F "
-                "--p{5}_src_start_ip 2001:2::1 "
-                "--p{5}_dst_start_ip 2001:1::0 "
-                "--p{5}_dst_end_ip 2001:1::1:869F "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["3-node-IPv6-dst-1000000"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} -6 "
-                "--p{4}_src_start_ip 2001:1::1 "
-                "--p{4}_dst_start_ip 2001:2::0 "
-                "--p{4}_dst_end_ip 2001:2::F:423F "
-                "--p{5}_src_start_ip 2001:2::1 "
-                "--p{5}_dst_start_ip 2001:1::0 "
-                "--p{5}_dst_end_ip 2001:1::F:423F "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        elif traffic_type in ["2-node-bridge"]:
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_src_start_ip 10.10.10.2 "
-                "--p{4}_src_end_ip 10.10.10.254 "
-                "--p{4}_dst_start_ip 20.20.20.2 "
-                "--p{5}_src_start_ip 20.20.20.2 "
-                "--p{5}_src_end_ip 20.20.20.254 "
-                "--p{5}_dst_start_ip 10.10.10.2 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout = int(duration) + 60)
-        elif traffic_type in ["3-node-IPv4-l3fwd"]:
-            # add for the DPDK l3fwd routing test
-            # please make sure the TG port 0 connect to the DUT port 0
-            (ret, stdout, stderr) = ssh.exec_command(
-                "sh -c '{0}/resources/tools/t-rex/t-rex-stateless.py "
-                "--duration={1} -r {2} -s {3} "
-                "--p{4}_dst_start_ip 2.1.1.2 "
-                "--p{4}_dst_end_ip 2.1.1.254 "
-                "--p{4}_src_start_ip 20.20.20.2 "
-                "--p{5}_dst_start_ip 1.1.1.2 "
-                "--p{5}_dst_end_ip 1.1.1.254 "
-                "--p{5}_src_start_ip 10.10.10.2 "
-                "{6} {7} --warmup_time={8}'".format(Constants.REMOTE_FW_DIR,
-                                                    duration, rate, framesize,
-                                                    _p0, _p1, _async, _latency,
-                                                    warmup_time),
-                timeout=int(duration)+60)
-        else:
-            raise NotImplementedError('Unsupported traffic type')
+        _p0, _p1 = (2, 1) if self._ifaces_reordered else (1, 2)
+
+        profile_path = ("{0}/resources/tools/t-rex/stream_profiles/"
+                        "{1}.py".format(Constants.REMOTE_FW_DIR,
+                                        traffic_type))
+        (ret, stdout, _) = ssh.exec_command(
+            "sh -c "
+            "'{0}/resources/tools/t-rex/t-rex-stateless-profile.py "
+            "--profile {1} "
+            "--duration {2} "
+            "--frame_size {3} "
+            "--rate {4} "
+            "--warmup_time {5} "
+            "--port_0 {6} "
+            "--port_1 {7} "
+            "{8} "   # --async
+            "{9}'".  # --latency
+            format(Constants.REMOTE_FW_DIR, profile_path, duration, framesize,
+                   rate, warmup_time, _p0 - 1, _p1 - 1, _async, _latency),
+            timeout=int(duration) + 60)
 
         if int(ret) != 0:
             raise RuntimeError('T-rex stateless runtime error')
@@ -800,7 +444,7 @@ class TrafficGenerator(object):
         if node['subtype'] is None:
             raise RuntimeError('TG subtype not defined')
         elif node['subtype'] == NodeSubTypeTG.TREX:
-            self.trex_stl_start_remote_exec(duration, rate, framesize,
+            self.trex_stl_start_remote_exec(int(duration), rate, framesize,
                                             traffic_type, async_call, latency,
                                             warmup_time=warmup_time)
         else:
index 50523d4..c28c404 100644 (file)
@@ -68,7 +68,7 @@ rst_epilog = """
 
 .. _tag documentation rst file: https://git.fd.io/csit/tree/docs/tag_documentation.rst?h=rls1704
 .. _TRex intallation: https://git.fd.io/csit/tree/resources/tools/t-rex/t-rex-installer.sh?h=rls1704
-.. _TRex driver: https://git.fd.io/csit/tree/resources/tools/t-rex/t-rex-stateless.py?h=rls1704
+.. _TRex driver: https://git.fd.io/csit/tree/resources/tools/t-rex/t-rex-stateless-profile.py?h=rls1704
 .. _CSIT Honeycomb Functional Tests Documentation: https://docs.fd.io/csit/rls1704/doc/tests.func.html
 .. _CSIT Testpmd Performance Tests Documentation: https://docs.fd.io/csit/rls1704/doc/tests.perf.html
 .. _CSIT VPP Functional Tests Documentation: https://docs.fd.io/csit/rls1704/doc/tests.func.html
@@ -97,7 +97,7 @@ pygments_style = 'sphinx'
 # If true, `todo` and `todoList` produce output, else they produce nothing.
 todo_include_todos = False
 
-#pdf_documents = [('index', u'rst2pdf', u'Sample rst2pdf doc', u'Your Name'),]
+# pdf_documents = [('index', u'rst2pdf', u'Sample rst2pdf doc', u'Your Name'),]
 
 
 # -- Options for HTML output ----------------------------------------------
diff --git a/resources/tools/t-rex/stream_profiles/profile_trex_stateless_base_class.py b/resources/tools/t-rex/stream_profiles/profile_trex_stateless_base_class.py
new file mode 100755 (executable)
index 0000000..2d07e7f
--- /dev/null
@@ -0,0 +1,211 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Base class for stream profiles for T-rex traffic generator.
+"""
+
+import sys
+import socket
+import struct
+
+from random import choice
+from string import letters
+
+from trex_stl_lib.api import *
+
+
+class TrafficStreamsBaseClass(object):
+    """Base class for stream profiles for T-rex traffic generator.
+    """
+
+    STREAM_TABLE = {
+        'IMIX_v4': [
+            {'size': 60, 'pps': 28, 'isg': 0},
+            {'size': 590, 'pps': 20, 'isg': 0.1},
+            {'size': 1514, 'pps': 4, 'isg': 0.2}
+        ],
+        'IMIX_v4_1': [
+            {'size': 64, 'pps': 28, 'isg': 0},
+            {'size': 570, 'pps': 16, 'isg': 0.1},
+            {'size': 1518, 'pps': 4, 'isg': 0.2}
+        ]
+    }
+
+    def __init__(self):
+
+        # Default value of frame size, it will be overwritten by the value of
+        # "framesize" parameter of "get_streams" method.
+        self.framesize = 64
+
+        # If needed, add your own parameters.
+
+    def _gen_payload(self, length):
+        """Generate payload.
+
+        If needed, implement your own algorithm.
+
+        :param length: Length of generated payload.
+        :type length: int
+        :returns: The generated payload.
+        :rtype: str
+        """
+
+        payload = ""
+        for _ in range(length):
+            payload += choice(letters)
+
+        return payload
+
+    def _get_start_end_ipv6(self, start_ip, end_ip):
+        """Get start host and number of hosts from IPv6 as integer.
+
+        :param start_ip: Start IPv6.
+        :param end_ip: End IPv6.
+        :type start_ip: string
+        :type end_ip: string
+        :return: Start host, number of hosts.
+        :rtype tuple of int
+        :raises: ValueError if start_ip is greater then end_ip.
+        :raises: socket.error if the IP addresses are not valid IPv6 addresses.
+        """
+
+        try:
+            ip1 = socket.inet_pton(socket.AF_INET6, start_ip)
+            ip2 = socket.inet_pton(socket.AF_INET6, end_ip)
+
+            hi1, lo1 = struct.unpack('!QQ', ip1)
+            hi2, lo2 = struct.unpack('!QQ', ip2)
+
+            if ((hi1 << 64) | lo1) > ((hi2 << 64) | lo2):
+                raise ValueError("IPv6: start_ip is greater then end_ip")
+
+            return lo1, abs(int(lo1) - int(lo2))
+
+        except socket.error as err:
+            print(err)
+            raise
+
+    def define_packets(self):
+        """Define the packets to be sent from the traffic generator.
+
+        This method MUST return:
+
+            return base_pkt_a, base_pkt_b, vm1, vm2
+
+            vm1 and vm2 CAN be None.
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+        raise NotImplementedError
+
+    def create_streams(self):
+        """Create traffic streams.
+
+        Implement your own traffic streams.
+
+        :returns: Traffic streams.
+        :rtype: list
+        """
+
+        base_pkt_a, base_pkt_b, vm1, vm2 = self.define_packets()
+
+        # In most cases you will not have to change the code below:
+
+        # Frame size is defined as an integer, e.g. 64, 1518:
+        if isinstance(self.framesize, int):
+
+            # Create a base packet and pad it to size
+            payload_len = max(0, self.framesize - len(base_pkt_a) - 4)  # No FCS
+
+            # Direction 0 --> 1
+            pkt_a = STLPktBuilder(
+                pkt=base_pkt_a / self._gen_payload(payload_len),
+                vm=vm1)
+            # Direction 1 --> 0
+            pkt_b = STLPktBuilder(
+                pkt=base_pkt_a / self._gen_payload(payload_len),
+                vm=vm2)
+
+            # Packets for latency measurement:
+            # Direction 0 --> 1
+            pkt_lat_a = STLPktBuilder(
+                pkt=base_pkt_a / self._gen_payload(payload_len))
+            # Direction 1 --> 0
+            pkt_lat_b = STLPktBuilder(
+                pkt=base_pkt_a / self._gen_payload(payload_len))
+
+            # Create the streams:
+            # Direction 0 --> 1
+            stream1 = STLStream(packet=pkt_a, mode=STLTXCont(pps=9000))
+            # Direction 1 --> 0
+            # second traffic stream with a phase of 10ns (inter-stream gap)
+            stream2 = STLStream(packet=pkt_b, isg=10.0,
+                                mode=STLTXCont(pps=9000))
+
+            # Streams for latency measurement:
+            # Direction 0 --> 1
+            lat_stream1 = STLStream(packet=pkt_lat_a,
+                                    flow_stats=STLFlowLatencyStats(pg_id=0),
+                                    mode=STLTXCont(pps=9000))
+            # Direction 1 --> 0
+            # second traffic stream with a phase of 10ns (inter-stream gap)
+            lat_stream2 = STLStream(packet=pkt_lat_b, isg=10.0,
+                                    flow_stats=STLFlowLatencyStats(pg_id=1),
+                                    mode=STLTXCont(pps=9000))
+
+            return [stream1, stream2, lat_stream1, lat_stream2]
+
+        # Frame size is defined as a string, e.g.IMIX_v4_1:
+        elif isinstance(self.framesize, str):
+
+            stream1 = []
+            stream2 = []
+
+            for stream in self.STREAM_TABLE[self.framesize]:
+                payload_len = max(0, stream['size'] - len(base_pkt_a) - 4)
+                # Create a base packet and pad it to size
+                pkt_a = STLPktBuilder(
+                    pkt=base_pkt_a / self._gen_payload(payload_len),
+                    vm=vm1)
+                pkt_b = STLPktBuilder(
+                    pkt=base_pkt_b / self._gen_payload(payload_len),
+                    vm=vm2)
+
+                # Create the streams:
+                stream1.append(STLStream(packet=pkt_a,
+                                         isg=stream['isg'],
+                                         mode=STLTXCont(pps=stream['pps'])))
+                stream2.append(STLStream(packet=pkt_b,
+                                         isg=stream['isg'],
+                                         mode=STLTXCont(pps=stream['pps'])))
+            streams = list()
+            streams.extend(stream1)
+            streams.extend(stream2)
+
+            return streams
+
+    def get_streams(self, **kwargs):
+        """Get traffic streams created by "create_streams" method.
+
+        If needed, add your own parameters.
+
+        :param kwargs: Key-value pairs used by "create_streams" method while
+        creating streams.
+        :returns: Traffic streams.
+        :rtype: list
+        """
+
+        self.framesize = kwargs['framesize']
+
+        return self.create_streams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-2n-ethip4-ip4src253.py b/resources/tools/t-rex/stream_profiles/trex-sl-2n-ethip4-ip4src253.py
new file mode 100755 (executable)
index 0000000..f9a030b
--- /dev/null
@@ -0,0 +1,94 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      10.10.10.2 - 10.10.10.254
+   - Destination IP address range: 20.20.20.2
+ - Direction 1 --> 0:
+   - Source IP address range:      20.20.20.2 - 20.20.20.254
+   - Destination IP address range: 10.10.10.2
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '10.10.10.2'
+        self.p1_src_end_ip = '10.10.10.254'
+        self.p1_dst_start_ip = '20.20.20.2'
+
+        self.p2_src_start_ip = '20.20.20.2'
+        self.p2_src_end_ip = '20.20.20.254'
+        self.p2_dst_start_ip = '10.10.10.2'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = Ether() / IP(src=self.p1_src_start_ip,
+                                  dst=self.p1_dst_start_ip,
+                                  proto=61)
+        # Direction 1 --> 0
+        base_pkt_b = Ether() / IP(src=self.p2_src_start_ip,
+                                  dst=self.p2_dst_start_ip,
+                                  proto=61)
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="src",
+                                       min_value=self.p1_src_start_ip,
+                                       max_value=self.p1_src_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="src")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="src",
+                                       min_value=self.p2_src_start_ip,
+                                       max_value=self.p2_src_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="src")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst1.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst1.py
new file mode 100755 (executable)
index 0000000..68b4921
--- /dev/null
@@ -0,0 +1,73 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      10.0.0.1
+   - Destination IP address range: 20.0.0.0
+ - Direction 1 --> 0:
+   - Source IP address range:      20.0.0.1
+   - Destination IP address range: 10.0.0.0
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_ip = '10.0.0.1'
+        self.p1_dst_ip = '20.0.0.0'
+
+        self.p2_src_ip = '20.0.0.1'
+        self.p2_dst_ip = '10.0.0.0'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_ip, dst=self.p1_dst_ip, proto=61))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_ip, dst=self.p2_dst_ip, proto=61))
+
+        return base_pkt_a, base_pkt_b, None, None
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst100.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst100.py
new file mode 100755 (executable)
index 0000000..86f423a
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      10.0.0.1
+   - Destination IP address range: 20.0.0.0 - 20.0.0.99
+ - Direction 1 --> 0:
+   - Source IP address range:      20.0.0.1
+   - Destination IP address range: 10.0.0.0 - 10.0.0.99
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '10.0.0.1'
+        self.p1_dst_start_ip = '20.0.0.0'
+        self.p1_dst_end_ip = '20.0.0.99'
+
+        self.p2_src_start_ip = '20.0.0.1'
+        self.p2_dst_start_ip = '10.0.0.0'
+        self.p2_dst_end_ip = '10.0.0.99'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=61))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=61))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p1_dst_start_ip,
+                                       max_value=self.p1_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p2_dst_start_ip,
+                                       max_value=self.p2_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst1000.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst1000.py
new file mode 100755 (executable)
index 0000000..569c063
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      10.0.0.1
+   - Destination IP address range: 20.0.0.0 - 20.0.3.231
+ - Direction 1 --> 0:
+   - Source IP address range:      20.0.0.1
+   - Destination IP address range: 10.0.0.0 - 10.0.3.231
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '10.0.0.1'
+        self.p1_dst_start_ip = '20.0.0.0'
+        self.p1_dst_end_ip = '20.0.3.231'
+
+        self.p2_src_start_ip = '20.0.0.1'
+        self.p2_dst_start_ip = '10.0.0.0'
+        self.p2_dst_end_ip = '10.0.3.231'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=61))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=61))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p1_dst_start_ip,
+                                       max_value=self.p1_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p2_dst_start_ip,
+                                       max_value=self.p2_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst10000.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst10000.py
new file mode 100755 (executable)
index 0000000..373076f
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      10.0.0.1
+   - Destination IP address range: 20.0.0.0 - 20.0.39.15
+ - Direction 1 --> 0:
+   - Source IP address range:      20.0.0.1
+   - Destination IP address range: 10.0.0.0 - 10.0.39.15
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '10.0.0.1'
+        self.p1_dst_start_ip = '20.0.0.0'
+        self.p1_dst_end_ip = '20.0.39.15'
+
+        self.p2_src_start_ip = '20.0.0.1'
+        self.p2_dst_start_ip = '10.0.0.0'
+        self.p2_dst_end_ip = '10.0.39.15'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=61))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=61))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p1_dst_start_ip,
+                                       max_value=self.p1_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p2_dst_start_ip,
+                                       max_value=self.p2_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst100000.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst100000.py
new file mode 100755 (executable)
index 0000000..3b27e9a
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      10.0.0.1
+   - Destination IP address range: 20.0.0.0 - 20.1.134.159
+ - Direction 1 --> 0:
+   - Source IP address range:      20.0.0.1
+   - Destination IP address range: 10.0.0.0 - 10.1.134.159
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '10.0.0.1'
+        self.p1_dst_start_ip = '20.0.0.0'
+        self.p1_dst_end_ip = '20.1.134.159'
+
+        self.p2_src_start_ip = '20.0.0.1'
+        self.p2_dst_start_ip = '10.0.0.0'
+        self.p2_dst_end_ip = '10.1.134.159'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=61))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=61))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p1_dst_start_ip,
+                                       max_value=self.p1_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p2_dst_start_ip,
+                                       max_value=self.p2_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst1000000.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst1000000.py
new file mode 100755 (executable)
index 0000000..076951b
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      10.0.0.1
+   - Destination IP address range: 20.0.0.0 - 20.15.66.63
+ - Direction 1 --> 0:
+   - Source IP address range:      20.0.0.1
+   - Destination IP address range: 10.0.0.0 - 10.15.66.63
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '10.0.0.1'
+        self.p1_dst_start_ip = '20.0.0.0'
+        self.p1_dst_end_ip = '20.15.66.63'
+
+        self.p2_src_start_ip = '20.0.0.1'
+        self.p2_dst_start_ip = '10.0.0.0'
+        self.p2_dst_end_ip = '10.15.66.63'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=61))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=61))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p1_dst_start_ip,
+                                       max_value=self.p1_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p2_dst_start_ip,
+                                       max_value=self.p2_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst253.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4dst253.py
new file mode 100755 (executable)
index 0000000..684af82
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      20.20.20.2
+   - Destination IP address range: 2.1.1.2 - 2.1.1.254
+ - Direction 1 --> 0:
+   - Source IP address range:      10.10.10.2
+   - Destination IP address range: 1.1.1.2 - 1.1.1.254
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '20.20.20.2'
+        self.p1_dst_start_ip = '2.1.1.2'
+        self.p1_dst_end_ip = '2.1.1.254'
+
+        self.p2_src_start_ip = '10.10.10.2'
+        self.p2_dst_start_ip = '1.1.1.2'
+        self.p2_dst_end_ip = '1.1.1.254'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=61))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=61))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p1_dst_start_ip,
+                                       max_value=self.p1_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="dst",
+                                       min_value=self.p2_dst_start_ip,
+                                       max_value=self.p2_dst_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="dst")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4src253.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4src253.py
new file mode 100755 (executable)
index 0000000..f9a030b
--- /dev/null
@@ -0,0 +1,94 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      10.10.10.2 - 10.10.10.254
+   - Destination IP address range: 20.20.20.2
+ - Direction 1 --> 0:
+   - Source IP address range:      20.20.20.2 - 20.20.20.254
+   - Destination IP address range: 10.10.10.2
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '10.10.10.2'
+        self.p1_src_end_ip = '10.10.10.254'
+        self.p1_dst_start_ip = '20.20.20.2'
+
+        self.p2_src_start_ip = '20.20.20.2'
+        self.p2_src_end_ip = '20.20.20.254'
+        self.p2_dst_start_ip = '10.10.10.2'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = Ether() / IP(src=self.p1_src_start_ip,
+                                  dst=self.p1_dst_start_ip,
+                                  proto=61)
+        # Direction 1 --> 0
+        base_pkt_b = Ether() / IP(src=self.p2_src_start_ip,
+                                  dst=self.p2_dst_start_ip,
+                                  proto=61)
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="src",
+                                       min_value=self.p1_src_start_ip,
+                                       max_value=self.p1_src_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="src")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="src",
+                                       min_value=self.p2_src_start_ip,
+                                       max_value=self.p2_src_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="src")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4src254.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4-ip4src254.py
new file mode 100755 (executable)
index 0000000..0a2a4a4
--- /dev/null
@@ -0,0 +1,94 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP /
+ - Direction 0 --> 1:
+   - Source IP address range:      10.10.10.1 - 10.10.10.254
+   - Destination IP address range: 20.20.20.1
+ - Direction 1 --> 0:
+   - Source IP address range:      20.20.20.1 - 20.20.20.254
+   - Destination IP address range: 10.10.10.1
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '10.10.10.1'
+        self.p1_src_end_ip = '10.10.10.254'
+        self.p1_dst_start_ip = '20.20.20.1'
+
+        self.p2_src_start_ip = '20.20.20.1'
+        self.p2_src_end_ip = '20.20.20.254'
+        self.p2_dst_start_ip = '10.10.10.1'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = Ether() / IP(src=self.p1_src_start_ip,
+                                  dst=self.p1_dst_start_ip,
+                                  proto=61)
+        # Direction 1 --> 0
+        base_pkt_b = Ether() / IP(src=self.p2_src_start_ip,
+                                  dst=self.p2_dst_start_ip,
+                                  proto=61)
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="src",
+                                       min_value=self.p1_src_start_ip,
+                                       max_value=self.p1_src_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="src")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="src",
+                                       min_value=self.p2_src_start_ip,
+                                       max_value=self.p2_src_end_ip,
+                                       size=4, op="inc"),
+                          STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
+                          STLVmFixIpv4(offset="IP")],
+                         split_by_field="src")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-1000u15p.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-1000u15p.py
new file mode 100755 (executable)
index 0000000..c9f6a27
--- /dev/null
@@ -0,0 +1,116 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP / UDP
+ - Direction 0 --> 1:
+   - Source IP address range:      20.0.0.0 - 20.0.3.231
+   - Destination IP address range: 12.0.0.2
+   - Source UDP port range:        1024 - 1038
+   - Destination UDP port range:   1024
+ - Direction 1 --> 0:
+   - Source IP address range:      12.0.0.2
+   - Destination IP address range: 200.0.0.0
+   - Source UDP port range:        1024
+   - Destination UDP port range:   1024 - 16023
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '20.0.0.0'
+        self.p1_src_end_ip = '20.0.3.231'
+        self.p1_dst_start_ip = '12.0.0.2'
+
+        self.p2_src_start_ip = '12.0.0.2'
+        self.p2_src_end_ip = '12.0.0.2'
+        self.p2_dst_start_ip = '200.0.0.0'
+
+        # UDP ports used in packet headers.
+        self.p1_src_start_udp_port = 1024
+        self.p1_src_end_udp_port = 1038
+        self.p1_dst_start_udp_port = 1024
+
+        self.p2_src_start_udp_port = 1024
+        self.p2_dst_start_udp_port = 1024
+        self.p2_dst_end_udp_port = 16023
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP | UDP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p1_src_start_udp_port,
+                          dport=self.p1_dst_start_udp_port))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p2_src_start_udp_port,
+                          dport=self.p2_dst_start_udp_port))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([
+            STLVmTupleGen(ip_min=self.p1_src_start_ip,
+                          ip_max=self.p1_src_end_ip,
+                          port_min=self.p1_src_start_udp_port,
+                          port_max=self.p1_src_end_udp_port,
+                          name="tuple"),
+            STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.src"),
+            STLVmFixIpv4(offset="IP"),
+            STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.sport")
+        ])
+        # Direction 0 --> 1
+        vm2 = STLScVmRaw([
+            STLVmFlowVar(name="dport",
+                         min_value=self.p2_dst_start_udp_port,
+                         max_value=self.p2_dst_end_udp_port,
+                         size=2, op="inc"),
+            STLVmWrFlowVar(fv_name="dport", pkt_offset="UDP.dport")
+        ])
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-100u15p.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-100u15p.py
new file mode 100755 (executable)
index 0000000..87a5d30
--- /dev/null
@@ -0,0 +1,116 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP / UDP
+ - Direction 0 --> 1:
+   - Source IP address range:      20.0.0.0 - 20.0.0.99
+   - Destination IP address range: 12.0.0.2
+   - Source UDP port range:        1024 - 1038
+   - Destination UDP port range:   1024
+ - Direction 1 --> 0:
+   - Source IP address range:      12.0.0.2
+   - Destination IP address range: 200.0.0.0
+   - Source UDP port range:        1024
+   - Destination UDP port range:   1024 - 2523
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '20.0.0.0'
+        self.p1_src_end_ip = '20.0.0.99'
+        self.p1_dst_start_ip = '12.0.0.2'
+
+        self.p2_src_start_ip = '12.0.0.2'
+        self.p2_src_end_ip = '12.0.0.2'
+        self.p2_dst_start_ip = '200.0.0.0'
+
+        # UDP ports used in packet headers.
+        self.p1_src_start_udp_port = 1024
+        self.p1_src_end_udp_port = 1038
+        self.p1_dst_start_udp_port = 1024
+
+        self.p2_src_start_udp_port = 1024
+        self.p2_dst_start_udp_port = 1024
+        self.p2_dst_end_udp_port = 2523
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP | UDP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p1_src_start_udp_port,
+                          dport=self.p1_dst_start_udp_port))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p2_src_start_udp_port,
+                          dport=self.p2_dst_start_udp_port))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([
+            STLVmTupleGen(ip_min=self.p1_src_start_ip,
+                          ip_max=self.p1_src_end_ip,
+                          port_min=self.p1_src_start_udp_port,
+                          port_max=self.p1_src_end_udp_port,
+                          name="tuple"),
+            STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.src"),
+            STLVmFixIpv4(offset="IP"),
+            STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.sport")
+        ])
+        # Direction 0 --> 1
+        vm2 = STLScVmRaw([
+            STLVmFlowVar(name="dport",
+                         min_value=self.p2_dst_start_udp_port,
+                         max_value=self.p2_dst_end_udp_port,
+                         size=2, op="inc"),
+            STLVmWrFlowVar(fv_name="dport", pkt_offset="UDP.dport")
+        ])
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-10u15p.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-10u15p.py
new file mode 100755 (executable)
index 0000000..74f2f0d
--- /dev/null
@@ -0,0 +1,116 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP / UDP
+ - Direction 0 --> 1:
+   - Source IP address range:      20.0.0.0 - 20.0.0.9
+   - Destination IP address range: 12.0.0.2
+   - Source UDP port range:        1024 - 1038
+   - Destination UDP port range:   1024
+ - Direction 1 --> 0:
+   - Source IP address range:      12.0.0.2
+   - Destination IP address range: 200.0.0.0
+   - Source UDP port range:        1024
+   - Destination UDP port range:   1024 - 1173
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '20.0.0.0'
+        self.p1_src_end_ip = '20.0.0.9'
+        self.p1_dst_start_ip = '12.0.0.2'
+
+        self.p2_src_start_ip = '12.0.0.2'
+        #self.p2_src_end_ip = '12.0.0.2'
+        self.p2_dst_start_ip = '200.0.0.0'
+
+        # UDP ports used in packet headers.
+        self.p1_src_start_udp_port = 1024
+        self.p1_src_end_udp_port = 1038
+        self.p1_dst_start_udp_port = 1024
+
+        self.p2_src_start_udp_port = 1024
+        self.p2_dst_start_udp_port = 1024
+        self.p2_dst_end_udp_port = 1173
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP | UDP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p1_src_start_udp_port,
+                          dport=self.p1_dst_start_udp_port))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p2_src_start_udp_port,
+                          dport=self.p2_dst_start_udp_port))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([
+            STLVmTupleGen(ip_min=self.p1_src_start_ip,
+                          ip_max=self.p1_src_end_ip,
+                          port_min=self.p1_src_start_udp_port,
+                          port_max=self.p1_src_end_udp_port,
+                          name="tuple"),
+            STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.src"),
+            STLVmFixIpv4(offset="IP"),
+            STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.sport")
+        ])
+        # Direction 0 --> 1
+        vm2 = STLScVmRaw([
+            STLVmFlowVar(name="dport",
+                         min_value=self.p2_dst_start_udp_port,
+                         max_value=self.p2_dst_end_udp_port,
+                         size=2, op="inc"),
+            STLVmWrFlowVar(fv_name="dport", pkt_offset="UDP.dport")
+        ])
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-1u15p.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-1u15p.py
new file mode 100755 (executable)
index 0000000..220ec05
--- /dev/null
@@ -0,0 +1,113 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP / UDP
+ - Direction 0 --> 1:
+   - Source IP address range:      20.0.0.0
+   - Destination IP address range: 12.0.0.2
+   - Source UDP port range:        1024 - 1038
+   - Destination UDP port range:   1024
+ - Direction 1 --> 0:
+   - Source IP address range:      12.0.0.2
+   - Destination IP address range: 200.0.0.0
+   - Source UDP port range:        1024
+   - Destination UDP port range:   1024 - 1038
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '20.0.0.0'
+        self.p1_src_end_ip = '20.0.0.0'
+        self.p1_dst_start_ip = '12.0.0.2'
+
+        self.p2_src_start_ip = '12.0.0.2'
+        self.p2_src_end_ip = '12.0.0.2'
+        self.p2_dst_start_ip = '200.0.0.0'
+
+        # UDP ports used in packet headers.
+        self.p1_src_start_udp_port = 1024
+        self.p1_src_end_udp_port = 1038
+        self.p1_dst_start_udp_port = 1024
+
+        self.p2_src_start_udp_port = 1024
+        self.p2_dst_start_udp_port = 1024
+        self.p2_dst_end_udp_port = 1038
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP | UDP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p1_src_start_udp_port,
+                          dport=self.p1_dst_start_udp_port))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p2_src_start_udp_port,
+                          dport=self.p2_dst_start_udp_port))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([
+            STLVmFlowVar(name="sport",
+                         min_value=self.p1_src_start_udp_port,
+                         max_value=self.p1_src_end_udp_port,
+                         size=2, op="inc"),
+            STLVmWrFlowVar(fv_name="sport", pkt_offset="UDP.sport")
+        ])
+        # Direction 0 --> 1
+        vm2 = STLScVmRaw([
+            STLVmFlowVar(name="dport",
+                         min_value=self.p2_dst_start_udp_port,
+                         max_value=self.p2_dst_end_udp_port,
+                         size=2, op="inc"),
+            STLVmWrFlowVar(fv_name="dport", pkt_offset="UDP.dport")
+        ])
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-1u1p.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-1u1p.py
new file mode 100755 (executable)
index 0000000..939e4ce
--- /dev/null
@@ -0,0 +1,88 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP / UDP
+ - Direction 0 --> 1:
+   - Source IP address range:      20.0.0.0
+   - Destination IP address range: 12.0.0.2
+   - Source UDP port range:        1024
+   - Destination UDP port range:   1024
+ - Direction 1 --> 0:
+   - Source IP address range:      12.0.0.2
+   - Destination IP address range: 200.0.0.0
+   - Source UDP port range:        1024
+   - Destination UDP port range:   1028
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_ip = '20.0.0.0'
+        self.p1_dst_ip = '12.0.0.2'
+
+        self.p2_src_ip = '12.0.0.2'
+        self.p2_dst_ip = '200.0.0.0'
+
+        # UDP ports used in packet headers.
+        self.p1_src_udp_port = 1024
+        self.p1_dst_udp_port = 1024
+
+        self.p2_src_udp_port = 1024
+        self.p2_dst_udp_port = 1028
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP | UDP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_ip, dst=self.p1_dst_ip, proto=17) /
+                      UDP(sport=self.p1_src_udp_port,
+                          dport=self.p1_dst_udp_port))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_ip, dst=self.p2_dst_ip, proto=17) /
+                      UDP(sport=self.p2_src_udp_port,
+                          dport=self.p2_dst_udp_port))
+
+        return base_pkt_a, base_pkt_b, None, None
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-2000u15p.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-2000u15p.py
new file mode 100755 (executable)
index 0000000..7d56518
--- /dev/null
@@ -0,0 +1,116 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP / UDP
+ - Direction 0 --> 1:
+   - Source IP address range:      20.0.0.0 - 20.0.7.207
+   - Destination IP address range: 12.0.0.2
+   - Source UDP port range:        1024 - 1038
+   - Destination UDP port range:   1024
+ - Direction 1 --> 0:
+   - Source IP address range:      12.0.0.2
+   - Destination IP address range: 200.0.0.0
+   - Source UDP port range:        1024
+   - Destination UDP port range:   1024 - 31022
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '20.0.0.0'
+        self.p1_src_end_ip = '20.0.7.207'
+        self.p1_dst_start_ip = '12.0.0.2'
+
+        self.p2_src_start_ip = '12.0.0.2'
+        self.p2_src_end_ip = '12.0.0.2'
+        self.p2_dst_start_ip = '200.0.0.0'
+
+        # UDP ports used in packet headers.
+        self.p1_src_start_udp_port = 1024
+        self.p1_src_end_udp_port = 1038
+        self.p1_dst_start_udp_port = 1024
+
+        self.p2_src_start_udp_port = 1024
+        self.p2_dst_start_udp_port = 1024
+        self.p2_dst_end_udp_port = 31022
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP | UDP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p1_src_start_udp_port,
+                          dport=self.p1_dst_start_udp_port))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p2_src_start_udp_port,
+                          dport=self.p2_dst_start_udp_port))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([
+            STLVmTupleGen(ip_min=self.p1_src_start_ip,
+                          ip_max=self.p1_src_end_ip,
+                          port_min=self.p1_src_start_udp_port,
+                          port_max=self.p1_src_end_udp_port,
+                          name="tuple"),
+            STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.src"),
+            STLVmFixIpv4(offset="IP"),
+            STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.sport")
+        ])
+        # Direction 0 --> 1
+        vm2 = STLScVmRaw([
+            STLVmFlowVar(name="dport",
+                         min_value=self.p2_dst_start_udp_port,
+                         max_value=self.p2_dst_end_udp_port,
+                         size=2, op="inc"),
+            STLVmWrFlowVar(fv_name="dport", pkt_offset="UDP.dport")
+        ])
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-4000u15p.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip4udp-4000u15p.py
new file mode 100755 (executable)
index 0000000..dab23b8
--- /dev/null
@@ -0,0 +1,116 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IP / UDP
+ - Direction 0 --> 1:
+   - Source IP address range:      20.0.0.0 - 20.0.15.159
+   - Destination IP address range: 12.0.0.2
+   - Source UDP port range:        1024 - 1038
+   - Destination UDP port range:   1024
+ - Direction 1 --> 0:
+   - Source IP address range:      12.0.0.2
+   - Destination IP address range: 200.0.0.0
+   - Source UDP port range:        1024
+   - Destination UDP port range:   1024 - 61022
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '20.0.0.0'
+        self.p1_src_end_ip = '20.0.15.159'
+        self.p1_dst_start_ip = '12.0.0.2'
+
+        self.p2_src_start_ip = '12.0.0.2'
+        self.p2_src_end_ip = '12.0.0.2'
+        self.p2_dst_start_ip = '200.0.0.0'
+
+        # UDP ports used in packet headers.
+        self.p1_src_start_udp_port = 1024
+        self.p1_src_end_udp_port = 1038
+        self.p1_dst_start_udp_port = 1024
+
+        self.p2_src_start_udp_port = 1024
+        self.p2_dst_start_udp_port = 1024
+        self.p2_dst_end_udp_port = 61022
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IP | UDP |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        # Direction 0 --> 1
+        base_pkt_a = (Ether() /
+                      IP(src=self.p1_src_start_ip,
+                         dst=self.p1_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p1_src_start_udp_port,
+                          dport=self.p1_dst_start_udp_port))
+        # Direction 1 --> 0
+        base_pkt_b = (Ether() /
+                      IP(src=self.p2_src_start_ip,
+                         dst=self.p2_dst_start_ip,
+                         proto=17) /
+                      UDP(sport=self.p2_src_start_udp_port,
+                          dport=self.p2_dst_start_udp_port))
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([
+            STLVmTupleGen(ip_min=self.p1_src_start_ip,
+                          ip_max=self.p1_src_end_ip,
+                          port_min=self.p1_src_start_udp_port,
+                          port_max=self.p1_src_end_udp_port,
+                          name="tuple"),
+            STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.src"),
+            STLVmFixIpv4(offset="IP"),
+            STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.sport")
+        ])
+        # Direction 0 --> 1
+        vm2 = STLScVmRaw([
+            STLVmFlowVar(name="dport",
+                         min_value=self.p2_dst_start_udp_port,
+                         max_value=self.p2_dst_end_udp_port,
+                         size=2, op="inc"),
+            STLVmWrFlowVar(fv_name="dport", pkt_offset="UDP.dport")
+        ])
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6dst10000.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6dst10000.py
new file mode 100755 (executable)
index 0000000..7a85ddf
--- /dev/null
@@ -0,0 +1,99 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IPv6 /
+ - Direction 0 --> 1:
+   - Source IP address range:      2001:1::1
+   - Destination IP address range: 2001:2::0 - 2001:2::270F
+ - Direction 1 --> 0:
+   - Source IP address range:      2001:2::1
+   - Destination IP address range: 2001:1::0 - 2001:1::270F
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '2001:1::1'
+        self.p1_dst_start_ip = '2001:2::0'
+        self.p1_dst_end_ip = '2001:2::270F'
+
+        self.p2_src_start_ip = '2001:2::1'
+        self.p2_dst_start_ip = '2001:1::0'
+        self.p2_dst_end_ip = '2001:1::270F'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IPv6 |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        base_p1, count_p1 = self._get_start_end_ipv6(self.p1_dst_start_ip,
+                                                     self.p1_dst_end_ip)
+        base_p2, count_p2 = self._get_start_end_ipv6(self.p2_dst_start_ip,
+                                                     self.p2_dst_end_ip)
+
+        # Direction 0 --> 1
+        base_pkt_a = Ether() / IPv6(src=self.p1_src_start_ip,
+                                    dst=self.p1_dst_start_ip)
+        # Direction 1 --> 0
+        base_pkt_b = Ether() / IPv6(src=self.p2_src_start_ip,
+                                    dst=self.p2_dst_start_ip)
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
+                                       min_value=base_p1,
+                                       max_value=base_p1 + count_p1,
+                                       size=8, op="inc"),
+                          STLVmWrFlowVar(fv_name="ipv6_dst",
+                                         pkt_offset="IPv6.dst",
+                                         offset_fixup=8)],
+                         split_by_field="ipv6_dst")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
+                                       min_value=base_p2,
+                                       max_value=base_p2 + count_p2,
+                                       size=8, op="inc"),
+                          STLVmWrFlowVar(fv_name="ipv6_dst",
+                                         pkt_offset="IPv6.dst",
+                                         offset_fixup=8)],
+                         split_by_field="ipv6_dst")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6dst100000.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6dst100000.py
new file mode 100755 (executable)
index 0000000..b1948c9
--- /dev/null
@@ -0,0 +1,99 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IPv6 /
+ - Direction 0 --> 1:
+   - Source IP address range:      2001:1::1
+   - Destination IP address range: 2001:2::0 - 2001:2::1:869F
+ - Direction 1 --> 0:
+   - Source IP address range:      2001:2::1
+   - Destination IP address range: 2001:1::0 - 2001:1::1:869F
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '2001:1::1'
+        self.p1_dst_start_ip = '2001:2::0'
+        self.p1_dst_end_ip = '2001:2::1:869F'
+
+        self.p2_src_start_ip = '2001:2::1'
+        self.p2_dst_start_ip = '2001:1::0'
+        self.p2_dst_end_ip = '2001:1::1:869F'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IPv6 |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        base_p1, count_p1 = self._get_start_end_ipv6(self.p1_dst_start_ip,
+                                                     self.p1_dst_end_ip)
+        base_p2, count_p2 = self._get_start_end_ipv6(self.p2_dst_start_ip,
+                                                     self.p2_dst_end_ip)
+
+        # Direction 0 --> 1
+        base_pkt_a = Ether() / IPv6(src=self.p1_src_start_ip,
+                                    dst=self.p1_dst_start_ip)
+        # Direction 1 --> 0
+        base_pkt_b = Ether() / IPv6(src=self.p2_src_start_ip,
+                                    dst=self.p2_dst_start_ip)
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
+                                       min_value=base_p1,
+                                       max_value=base_p1 + count_p1,
+                                       size=8, op="inc"),
+                          STLVmWrFlowVar(fv_name="ipv6_dst",
+                                         pkt_offset="IPv6.dst",
+                                         offset_fixup=8)],
+                         split_by_field="ipv6_dst")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
+                                       min_value=base_p2,
+                                       max_value=base_p2 + count_p2,
+                                       size=8, op="inc"),
+                          STLVmWrFlowVar(fv_name="ipv6_dst",
+                                         pkt_offset="IPv6.dst",
+                                         offset_fixup=8)],
+                         split_by_field="ipv6_dst")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6dst1000000.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6dst1000000.py
new file mode 100755 (executable)
index 0000000..ace0dac
--- /dev/null
@@ -0,0 +1,99 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IPv6 /
+ - Direction 0 --> 1:
+   - Source IP address range:      2001:1::1
+   - Destination IP address range: 2001:2::0 - 2001:2::F:423F
+ - Direction 1 --> 0:
+   - Source IP address range:      2001:2::1
+   - Destination IP address range: 2001:1::0 - 2001:1::F:423F
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '2001:1::1'
+        self.p1_dst_start_ip = '2001:2::0'
+        self.p1_dst_end_ip = '2001:2::F:423F'
+
+        self.p2_src_start_ip = '2001:2::1'
+        self.p2_dst_start_ip = '2001:1::0'
+        self.p2_dst_end_ip = '2001:1::F:423F'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IPv6 |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        base_p1, count_p1 = self._get_start_end_ipv6(self.p1_dst_start_ip,
+                                                     self.p1_dst_end_ip)
+        base_p2, count_p2 = self._get_start_end_ipv6(self.p2_dst_start_ip,
+                                                     self.p2_dst_end_ip)
+
+        # Direction 0 --> 1
+        base_pkt_a = Ether() / IPv6(src=self.p1_src_start_ip,
+                                    dst=self.p1_dst_start_ip)
+        # Direction 1 --> 0
+        base_pkt_b = Ether() / IPv6(src=self.p2_src_start_ip,
+                                    dst=self.p2_dst_start_ip)
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
+                                       min_value=base_p1,
+                                       max_value=base_p1 + count_p1,
+                                       size=8, op="inc"),
+                          STLVmWrFlowVar(fv_name="ipv6_dst",
+                                         pkt_offset="IPv6.dst",
+                                         offset_fixup=8)],
+                         split_by_field="ipv6_dst")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
+                                       min_value=base_p2,
+                                       max_value=base_p2 + count_p2,
+                                       size=8, op="inc"),
+                          STLVmWrFlowVar(fv_name="ipv6_dst",
+                                         pkt_offset="IPv6.dst",
+                                         offset_fixup=8)],
+                         split_by_field="ipv6_dst")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6src253.py b/resources/tools/t-rex/stream_profiles/trex-sl-3n-ethip6-ip6src253.py
new file mode 100755 (executable)
index 0000000..be900ce
--- /dev/null
@@ -0,0 +1,99 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Stream profile for T-rex traffic generator.
+
+Stream profile:
+ - Two streams sent in directions 0 --> 1 and 1 --> 0 at the same time.
+ - Packet: ETH / IPv6 /
+ - Direction 0 --> 1:
+   - Source IP address range:      2001:1::2 - 2001:1::FE
+   - Destination IP address range: 2001:2::2
+ - Direction 1 --> 0:
+   - Source IP address range:      2001:2::2 - 2001:2::FE
+   - Destination IP address range: 2001:1::2
+"""
+
+from trex_stl_lib.api import *
+from profile_trex_stateless_base_class import TrafficStreamsBaseClass
+
+
+class TrafficStreams(TrafficStreamsBaseClass):
+    """Stream profile."""
+
+    def __init__(self):
+        """Initialization and setting of streams' parameters."""
+
+        super(TrafficStreamsBaseClass, self).__init__()
+
+        # IPs used in packet headers.
+        self.p1_src_start_ip = '2001:1::2'
+        self.p1_src_end_ip = '2001:1::FE'
+        self.p1_dst_start_ip = '2001:2::2'
+
+        self.p2_src_start_ip = '2001:2::2'
+        self.p2_src_end_ip = '2001:2::FE'
+        self.p2_dst_start_ip = '2001:1::2'
+
+    def define_packets(self):
+        """Defines the packets to be sent from the traffic generator.
+
+        Packet definition: | ETH | IPv6 |
+
+        :returns: Packets to be sent from the traffic generator.
+        :rtype: tuple
+        """
+
+        base_p1, count_p1 = self._get_start_end_ipv6(self.p1_src_start_ip,
+                                                     self.p1_src_end_ip)
+        base_p2, count_p2 = self._get_start_end_ipv6(self.p2_src_start_ip,
+                                                     self.p2_src_end_ip)
+
+        # Direction 0 --> 1
+        base_pkt_a = Ether() / IPv6(src=self.p1_src_start_ip,
+                                    dst=self.p1_dst_start_ip)
+        # Direction 1 --> 0
+        base_pkt_b = Ether() / IPv6(src=self.p2_src_start_ip,
+                                    dst=self.p2_dst_start_ip)
+
+        # Direction 0 --> 1
+        vm1 = STLScVmRaw([STLVmFlowVar(name="ipv6_src",
+                                       min_value=base_p1,
+                                       max_value=base_p1 + count_p1,
+                                       size=8, op="inc"),
+                          STLVmWrFlowVar(fv_name="ipv6_src",
+                                         pkt_offset="IPv6.src",
+                                         offset_fixup=8)],
+                         split_by_field="ipv6_src")
+        # Direction 1 --> 0
+        vm2 = STLScVmRaw([STLVmFlowVar(name="ipv6_src",
+                                       min_value=base_p2,
+                                       max_value=base_p2 + count_p2,
+                                       size=8, op="inc"),
+                          STLVmWrFlowVar(fv_name="ipv6_src",
+                                         pkt_offset="IPv6.src",
+                                         offset_fixup=8)],
+                         split_by_field="ipv6_src")
+
+        return base_pkt_a, base_pkt_b, vm1, vm2
+
+
+def register():
+    """Register this traffic profile to T-rex.
+
+    Do not change this function.
+
+    :return: Traffic streams.
+    :rtype: Object
+    """
+    return TrafficStreams()
diff --git a/resources/tools/t-rex/t-rex-stateless-profile.py b/resources/tools/t-rex/t-rex-stateless-profile.py
new file mode 100755 (executable)
index 0000000..0bbd241
--- /dev/null
@@ -0,0 +1,296 @@
+#!/usr/bin/python
+
+# Copyright (c) 2017 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module gets a traffic profile together with other parameters, reads
+the profile and sends the traffic. At the end, it measures the packet loss and
+latency.
+"""
+
+import sys
+import argparse
+import json
+
+sys.path.insert(0, "/opt/trex-core-2.25/scripts/automation/"
+                   "trex_control_plane/stl/")
+
+from trex_stl_lib.api import *
+
+
+def fmt_latency(lat_min, lat_avg, lat_max):
+    """Return formatted, rounded latency.
+
+    :param lat_min: Min latency
+    :param lat_avg: Average latency
+    :param lat_max: Max latency
+    :type lat_min: string
+    :type lat_avg: string
+    :type lat_max: string
+    :return: Formatted and rounded output "min/avg/max"
+    :rtype: string
+    """
+
+    try:
+        t_min = int(round(float(lat_min)))
+    except ValueError:
+        t_min = int(-1)
+    try:
+        t_avg = int(round(float(lat_avg)))
+    except ValueError:
+        t_avg = int(-1)
+    try:
+        t_max = int(round(float(lat_max)))
+    except ValueError:
+        t_max = int(-1)
+
+    return "/".join(str(tmp) for tmp in (t_min, t_avg, t_max))
+
+
+def simple_burst(profile_file, duration, framesize, rate, warmup_time, port_0,
+                 port_1, latency, async_start=False):
+    """Send the traffic and measure packet loss and latency.
+
+    Procedure:
+     - reads the given traffic profile with streams,
+     - connects to the T-rex client,
+     - resets the ports,
+     - removes all existing streams,
+     - adds streams from the traffic profile to the ports,
+     - if the warm-up time is more than 0, sends the warm-up traffic, reads the
+       statistics,
+     - clears the statistics from the client,
+     - starts the traffic,
+     - waits for the defined time (or runs forever if async mode is defined),
+     - stops the traffic,
+     - reads and displays the statistics and
+     - disconnects from the client.
+
+    :param profile_file: A python module with T-rex traffic profile.
+    :param framesize: Frame size.
+    :param duration: Duration of traffic run in seconds (-1=infinite).
+    :param rate: Traffic rate [percentage, pps, bps].
+    :param warmup_time: Traffic warm-up time in seconds, 0 = disable.
+    :param port_0: Port 0 on the traffic generator.
+    :param port_1: Port 1 on the traffic generator.
+    :param latency: With latency stats.
+    :param async_start: Start the traffic and exit.
+    :type profile_file: str
+    :type framesize: int or str
+    :type duration: int
+    :type rate: str
+    :type warmup_time: int
+    :type port_0: int
+    :type port_1: int
+    :type latency: boo;
+    :type async_start: bool
+    """
+
+    client = None
+    total_rcvd = 0
+    total_sent = 0
+    lost_a = 0
+    lost_b = 0
+    lat_a = "-1/-1/-1"
+    lat_b = "-1/-1/-1"
+
+    # Read the profile:
+    try:
+        print("### Profile file:\n{}".format(profile_file))
+        profile = STLProfile.load(profile_file, direction=0, port_id=0,
+                                  framesize=framesize)
+        print("\n### Profiles ###\n")
+        print(profile.dump_to_yaml())
+        streams = profile.get_streams()
+    except STLError:
+        print("Error while loading profile '{0}'\n".format(profile_file))
+        sys.exit(1)
+
+    try:
+        # Create the client:
+        client = STLClient(verbose_level=LoggerApi.VERBOSE_QUIET)
+        # Connect to server:
+        client.connect()
+        # Prepare our ports (the machine has 0 <--> 1 with static route):
+        client.reset(ports=[port_0, port_1])
+        client.remove_all_streams(ports=[port_0, port_1])
+
+        if isinstance(framesize, int):
+            client.add_streams(streams[0], ports=[port_0])
+            client.add_streams(streams[1], ports=[port_1])
+        elif isinstance(framesize, str):
+            client.add_streams(streams[0:3], ports=[port_0])
+            client.add_streams(streams[3:6], ports=[port_1])
+        if latency:
+            try:
+                if isinstance(framesize, int):
+                    client.add_streams(streams[2], ports=[port_0])
+                    client.add_streams(streams[3], ports=[port_1])
+                elif isinstance(framesize, str):
+                    latency = False
+            except STLError:
+                # Disable latency if NIC does not support requested stream type
+                print("##### FAILED to add latency streams #####")
+                latency = False
+        # Warm-up phase:
+        if warmup_time > 0:
+            # Clear the stats before injecting:
+            client.clear_stats()
+
+            # Choose rate and start traffic:
+            client.start(ports=[port_0, port_1], mult=rate,
+                         duration=warmup_time)
+
+            # Block until done:
+            client.wait_on_traffic(ports=[port_0, port_1],
+                                   timeout=warmup_time+30)
+
+            if client.get_warnings():
+                for warning in client.get_warnings():
+                    print(warning)
+
+            # Read the stats after the test:
+            stats = client.get_stats()
+
+            print("##### Warmup statistics #####")
+            print(json.dumps(stats, indent=4, separators=(',', ': '),
+                             sort_keys=True))
+
+            lost_a = stats[0]["opackets"] - stats[1]["ipackets"]
+            lost_b = stats[1]["opackets"] - stats[0]["ipackets"]
+
+            print("\npackets lost from 0 --> 1: {0} pkts".format(lost_a))
+            print("packets lost from 1 --> 0: {0} pkts".format(lost_b))
+
+        # Clear the stats before injecting:
+        client.clear_stats()
+        lost_a = 0
+        lost_b = 0
+
+        # Choose rate and start traffic:
+        client.start(ports=[port_0, port_1], mult=rate, duration=duration)
+
+        if not async_start:
+            # Block until done:
+            client.wait_on_traffic(ports=[port_0, port_1], timeout=duration+30)
+
+            if client.get_warnings():
+                for warning in client.get_warnings():
+                    print(warning)
+
+            # Read the stats after the test
+            stats = client.get_stats()
+
+            print("##### Statistics #####")
+            print(json.dumps(stats, indent=4, separators=(',', ': '),
+                             sort_keys=True))
+
+            lost_a = stats[0]["opackets"] - stats[1]["ipackets"]
+            lost_b = stats[1]["opackets"] - stats[0]["ipackets"]
+
+            if latency:
+                lat_a = fmt_latency(
+                    str(stats["latency"][0]["latency"]["total_min"]),
+                    str(stats["latency"][0]["latency"]["average"]),
+                    str(stats["latency"][0]["latency"]["total_max"]))
+                lat_b = fmt_latency(
+                    str(stats["latency"][1]["latency"]["total_min"]),
+                    str(stats["latency"][1]["latency"]["average"]),
+                    str(stats["latency"][1]["latency"]["total_max"]))
+
+            total_sent = stats[0]["opackets"] + stats[1]["opackets"]
+            total_rcvd = stats[0]["ipackets"] + stats[1]["ipackets"]
+
+            print("\npackets lost from 0 --> 1:   {0} pkts".format(lost_a))
+            print("packets lost from 1 --> 0:   {0} pkts".format(lost_b))
+
+    except STLError as err:
+        sys.stderr.write("{0}\n".format(err))
+        sys.exit(1)
+
+    finally:
+        if async_start:
+            if client:
+                client.disconnect(stop_traffic=False, release_ports=True)
+        else:
+            if client:
+                client.disconnect()
+            print("rate={0}, totalReceived={1}, totalSent={2}, "
+                  "frameLoss={3}, latencyStream0(usec)={4}, "
+                  "latencyStream1(usec)={5}".
+                  format(rate, total_rcvd, total_sent, lost_a + lost_b,
+                         lat_a, lat_b))
+
+
+def main():
+    """Main function for the traffic generator using T-rex.
+
+    It verifies the given command line arguments and runs "simple_burst"
+    function.
+    """
+
+    parser = argparse.ArgumentParser()
+    parser.add_argument("-p", "--profile",
+                        required=True,
+                        type=str,
+                        help="Python traffic profile.")
+    parser.add_argument("-d", "--duration",
+                        required=True,
+                        type=int,
+                        help="Duration of traffic run.")
+    parser.add_argument("-s", "--frame_size",
+                        required=True,
+                        help="Size of a Frame without padding and IPG.")
+    parser.add_argument("-r", "--rate",
+                        required=True,
+                        help="Traffic rate with included units (%, pps).")
+    parser.add_argument("-w", "--warmup_time",
+                        type=int,
+                        default=5,
+                        help="Traffic warm-up time in seconds, 0 = disable.")
+    parser.add_argument("--port_0",
+                        required=True,
+                        type=int,
+                        help="Port 0 on the traffic generator.")
+    parser.add_argument("--port_1",
+                        required=True,
+                        type=int,
+                        help="Port 1 on the traffic generator.")
+    parser.add_argument("--async",
+                        action="store_true",
+                        default=False,
+                        help="Non-blocking call of the script.")
+    parser.add_argument("--latency",
+                        action="store_true",
+                        default=False,
+                        help="Add latency stream")
+    args = parser.parse_args()
+
+    try:
+        framesize = int(args.frame_size)
+    except ValueError:
+        framesize = args.frame_size
+
+    simple_burst(profile_file=args.profile,
+                 duration=int(args.duration),
+                 framesize=framesize,
+                 rate=args.rate,
+                 warmup_time=int(args.warmup_time),
+                 port_0=int(args.port_0),
+                 port_1=int(args.port_1),
+                 latency=args.latency,
+                 async_start=args.async)
+
+
+if __name__ == '__main__':
+    main()
index 0eee3e8..cc00846 100755 (executable)
@@ -27,6 +27,7 @@ Functionality:
 """
 
 import sys
+import json
 
 sys.path.insert(0, "/opt/trex-core-2.25/scripts/automation/"+\
                    "trex_control_plane/stl/")
@@ -40,12 +41,9 @@ def stop_all_traffic_streams():
     """
 
     # create client
-    client = STLClient()
+    client = STLClient(verbose_level=LoggerApi.VERBOSE_QUIET)
 
     try:
-        # turn this off if too many logs
-        #client.set_verbose("high")
-
         # connect to server
         client.connect()
 
@@ -55,18 +53,15 @@ def stop_all_traffic_streams():
         # read the stats after the test
         stats = client.get_stats()
 
-        print "#####statistics (approx.)#####"
-        print json.dumps(stats, indent=4,
-                         separators=(',', ': '), sort_keys=True)
+        print("#####statistics (approx.)#####")
+        print(json.dumps(stats, indent=4,
+                         separators=(',', ': '), sort_keys=True))
 
         lost_a = stats[0]["opackets"] - stats[1]["ipackets"]
         lost_b = stats[1]["opackets"] - stats[0]["ipackets"]
 
-        total_sent = stats[0]["opackets"] + stats[1]["opackets"]
-        total_rcvd = stats[0]["ipackets"] + stats[1]["ipackets"]
-
-        print "\npackets lost from 0 --> 1:   {0} pkts".format(lost_a)
-        print "packets lost from 1 --> 0:   {0} pkts".format(lost_b)
+        print("\npackets lost from 0 --> 1:   {0} pkts".format(lost_a))
+        print("packets lost from 1 --> 0:   {0} pkts".format(lost_b))
 
     except STLError as ex_error:
         print_error(str(ex_error))
@@ -76,7 +71,6 @@ def stop_all_traffic_streams():
         client.disconnect()
 
 
-
 def print_error(msg):
     """Print error message on stderr.
 
diff --git a/resources/tools/t-rex/t-rex-stateless.py b/resources/tools/t-rex/t-rex-stateless.py
deleted file mode 100755 (executable)
index fdee81d..0000000
+++ /dev/null
@@ -1,698 +0,0 @@
-#!/usr/bin/python
-
-# Copyright (c) 2016 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This script uses T-REX stateless API to drive t-rex instance.
-
-Requirements:
-- T-REX: https://github.com/cisco-system-traffic-generator/trex-core
- - compiled and running T-REX process (eg. ./t-rex-64 -i -c 4)
- - trex_stl_lib.api library
-- Script must be executed on a node with T-REX instance
-- 2 interfaces must be configured in configuretion file /etc/trex_cfg.yaml
-
-##################### Example of /etc/trex_cfg.yaml ##########################
-- port_limit      : 2 # numbers of ports to use
-  version         : 2
-  interfaces      : ["84:00.0","84:00.1"] # PCI address of interfaces
-  port_info       :  # set eth mac addr
-          - dest_mac        :   [0x90,0xe2,0xba,0x1f,0x97,0xd5]  # port 0
-            src_mac         :   [0x90,0xe2,0xba,0x1f,0x97,0xd4]
-          - dest_mac        :   [0x90,0xe2,0xba,0x1f,0x97,0xd4]  # port 1
-            src_mac         :   [0x90,0xe2,0xba,0x1f,0x97,0xd5]
-##############################################################################
-
-Functionality:
-1. Configure traffic on running T-REX instance
-2. Clear statistics on all ports
-3. Ctart traffic with specified duration
-4. Print statistics to stdout
-
-"""
-
-import argparse
-import json
-import socket
-import string
-import struct
-import sys
-
-sys.path.insert(0, "/opt/trex-core-2.25/scripts/automation/"+\
-                   "trex_control_plane/stl/")
-from trex_stl_lib.api import *
-
-stream_table = {'IMIX_v4_1': [{'size': 64, 'pps': 28, 'isg':0},
-                              {'size': 570, 'pps': 16, 'isg':0.1},
-                              {'size': 1518, 'pps': 4, 'isg':0.2}]
-               }
-
-def generate_payload(length):
-    """Generate payload.
-
-    :param length: Length of payload.
-    :type length: int
-    :return: Payload filled with chars.
-    :rtype string
-    """
-
-    word = ''
-    alphabet_size = len(string.letters)
-    for i in range(length):
-        word += string.letters[(i % alphabet_size)]
-
-    return word
-
-
-def get_start_end_ipv6(start_ip, end_ip):
-    """Get start and end host from IPv6 as integer.
-
-    :param start_ip: Start IPv6.
-    :param end_ip: End IPv6.
-    :type start_ip: string
-    :type end_ip: string
-    :return: Start host, end host.
-    :rtype int
-    """
-
-    try:
-        ip1 = socket.inet_pton(socket.AF_INET6, start_ip)
-        ip2 = socket.inet_pton(socket.AF_INET6, end_ip)
-
-        hi1, lo1 = struct.unpack('!QQ', ip1)
-        hi2, lo2 = struct.unpack('!QQ', ip2)
-
-        if ((hi1 << 64) | lo1) > ((hi2 << 64) | lo2):
-            print "IPv6: start_ip is greater then end_ip"
-            sys.exit(2)
-
-        max_p1 = abs(int(lo1) - int(lo2))
-        base_p1 = lo1
-    except AddressValueError as ex_error:
-        print ex_error
-        sys.exit(2)
-
-    return base_p1, max_p1
-
-def create_streams_v46(base_pkt_a, base_pkt_b, vm1, vm2, frame_size):
-    """Create STLStream streams
-
-    :param base_pkt_a: Base packet a for stream_a
-    :param base_pkt_b: Base packet b for stream_b
-    :param vm1: vm for stream_a
-    :param vm2: vm for stream_b
-    :param frame_size: frame size or name of traffic profile
-    :type base_pkt_a: Eth (scapy)
-    :type base_pkt_b: Eth (scapy)
-    :type vm1: STLScVmRaw
-    :type vm2: STLScVmRaw
-    :frame_size: int or string
-    :return: stream_a, stream_b, stream_a_latency, stream_b_latency
-    :rtype: STLStream, STLStream, STLStream, STLStream
-    """
-
-    if type(frame_size) is int:
-
-        fsize_no_fcs = frame_size - 4 # no FCS
-        pkt_a = STLPktBuilder(pkt=base_pkt_a/generate_payload(
-            max(0, fsize_no_fcs-len(base_pkt_a))), vm=vm1)
-        pkt_b = STLPktBuilder(pkt=base_pkt_b/generate_payload(
-            max(0, fsize_no_fcs-len(base_pkt_b))), vm=vm2)
-        pkt_lat_a = STLPktBuilder(pkt=base_pkt_a/generate_payload(
-            max(0, fsize_no_fcs-len(base_pkt_a))))
-        pkt_lat_b = STLPktBuilder(pkt=base_pkt_b/generate_payload(
-            max(0, fsize_no_fcs-len(base_pkt_b))))
-        lat_stream1 = STLStream(packet=pkt_lat_a,
-                                flow_stats=STLFlowLatencyStats(pg_id=0),
-                                mode=STLTXCont(pps=9000))
-        # second traffic stream with a phase of 10ns (inter stream gap)
-        lat_stream2 = STLStream(packet=pkt_lat_b,
-                                isg=10.0,
-                                flow_stats=STLFlowLatencyStats(pg_id=1),
-                                mode=STLTXCont(pps=9000))
-
-        stream1 = STLStream(packet=pkt_a,
-                            mode=STLTXCont(pps=9000))
-        # second traffic stream with a phase of 10ns (inter stream gap)
-        stream2 = STLStream(packet=pkt_b,
-                            isg=10.0,
-                            mode=STLTXCont(pps=9000))
-    elif type(frame_size) is str:
-        lat_stream1 = []
-        lat_stream2 = []
-        stream1 = []
-        stream2 = []
-
-        for x in stream_table[frame_size]:
-            fsize_no_fcs = x['size'] - 4 # no FCS
-            pkt_a = STLPktBuilder(pkt=base_pkt_a/generate_payload(
-                max(0, fsize_no_fcs-len(base_pkt_a))), vm=vm1)
-            pkt_b = STLPktBuilder(pkt=base_pkt_b/generate_payload(
-                max(0, fsize_no_fcs-len(base_pkt_b))), vm=vm2)
-
-            stream1.append(STLStream(packet=pkt_a,
-                               isg=x['isg'],
-                               mode=STLTXCont(pps=x['pps'])))
-            stream2.append(STLStream(packet=pkt_b,
-                               isg=x['isg'],
-                               mode=STLTXCont(pps=x['pps'])))
-
-    else:
-        raise ValueError("Unknown frame_size type")
-
-    return (stream1, stream2, lat_stream1, lat_stream2)
-
-
-def create_streams(traffic_options, frame_size=64):
-    """Create two IP packets to be used in stream.
-
-    :param traffic_options: Parameters for packets.
-    :param frame_size: Size of L2 frame.
-    :type traffic_options: dict
-    :type frame_size: int
-    :return: Packet instances.
-    :rtype: Tuple of STLPktBuilder
-    """
-
-    if type(frame_size) is int and frame_size < 64:
-        print_error("Frame min. size is 64B")
-        sys.exit(1)
-
-    p1_src_start_ip = traffic_options['p1_src_start_ip']
-    p1_src_end_ip = traffic_options['p1_src_end_ip']
-    p1_dst_start_ip = traffic_options['p1_dst_start_ip']
-    p2_src_start_ip = traffic_options['p2_src_start_ip']
-    p2_src_end_ip = traffic_options['p2_src_end_ip']
-    p2_dst_start_ip = traffic_options['p2_dst_start_ip']
-
-    p1_dst_end_ip = traffic_options['p1_dst_end_ip']
-    p2_dst_end_ip = traffic_options['p2_dst_end_ip']
-
-    try:
-        p1_src_start_udp_port = traffic_options['p1_src_start_udp_port']
-        p1_src_end_udp_port = traffic_options['p1_src_end_udp_port']
-        p1_dst_start_udp_port = traffic_options['p1_dst_start_udp_port']
-        p2_src_start_udp_port = traffic_options['p2_src_start_udp_port']
-        p2_dst_start_udp_port = traffic_options['p2_dst_start_udp_port']
-        p2_dst_end_udp_port = traffic_options['p2_dst_end_udp_port']
-        ports_defined = True
-    except KeyError:
-        ports_defined = False
-
-    if ports_defined:
-        base_pkt_a = (Ether() /
-                      IP(src=p1_src_start_ip, dst=p1_dst_start_ip, proto=17) /
-                      UDP(sport=int(p1_src_start_udp_port),
-                          dport=int(p1_dst_start_udp_port)))
-        base_pkt_b = (Ether() /
-                      IP(src=p2_src_start_ip, dst=p2_dst_start_ip, proto=17) /
-                      UDP(sport=int(p2_src_start_udp_port),
-                          dport=int(p2_dst_start_udp_port)))
-    else:
-        base_pkt_a = Ether() / IP(src=p1_src_start_ip, dst=p1_dst_start_ip,
-                                  proto=61)
-        base_pkt_b = Ether() / IP(src=p2_src_start_ip, dst=p2_dst_start_ip,
-                                  proto=61)
-
-    # The following code applies raw instructions to packet (IP src/dst
-    # increment). It splits the generated traffic by "ip_src"/"ip_dst" variable
-    # to cores and fix IPv4 header checksum.
-    if ports_defined:
-        if p1_src_start_udp_port != p1_src_end_udp_port and \
-                        p1_src_start_ip != p1_src_end_ip:
-            vm1 = STLScVmRaw([
-                STLVmTupleGen(ip_min=p1_src_start_ip,
-                              ip_max=p1_src_end_ip,
-                              port_min=int(p1_src_start_udp_port),
-                              port_max=int(p1_src_end_udp_port),
-                              name="tuple"),
-                STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.src"),
-                STLVmFixIpv4(offset="IP"),
-                STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.sport")
-            ])
-            vm2 = STLScVmRaw([
-                STLVmTupleGen(ip_min=p2_dst_start_ip,
-                              ip_max=p2_dst_start_ip,
-                              port_min=int(p2_dst_start_udp_port),
-                              port_max=int(p2_dst_end_udp_port),
-                              name="tuple"),
-                STLVmWrFlowVar(fv_name="tuple.ip", pkt_offset="IP.dst"),
-                STLVmFixIpv4(offset="IP"),
-                STLVmWrFlowVar(fv_name="tuple.port", pkt_offset="UDP.dport")
-            ])
-        elif p1_src_start_udp_port != p1_src_end_udp_port:
-            vm1 = STLScVmRaw([
-                STLVmFlowVar(name="sport",
-                             min_value=int(p1_src_start_udp_port),
-                             max_value=int(p1_src_end_udp_port),
-                             size=2, op="inc"),
-                STLVmWrFlowVar(fv_name="sport", pkt_offset="UDP.sport")
-                ])
-            vm2 = STLScVmRaw([
-                STLVmFlowVar(name="dport",
-                             min_value=int(p2_dst_start_udp_port),
-                             max_value=int(p2_dst_end_udp_port),
-                             size=2, op="inc"),
-                STLVmWrFlowVar(fv_name="dport", pkt_offset="UDP.dport")
-            ])
-        elif p1_src_start_udp_port == p1_src_end_udp_port:
-            vm1 = STLScVmRaw([STLVmFlowVar(name="src",
-                                           min_value=p1_src_start_ip,
-                                           max_value=p1_src_end_ip,
-                                           size=4, op="inc"),
-                              STLVmWrFlowVar(fv_name="src",
-                                             pkt_offset="IP.src"),
-                              STLVmFixIpv4(offset="IP"),
-                              ], split_by_field="src")
-            vm2 = STLScVmRaw([STLVmFlowVar(name="src",
-                                           min_value=p2_src_start_ip,
-                                           max_value=p2_src_end_ip,
-                                           size=4, op="inc"),
-                              STLVmWrFlowVar(fv_name="src",
-                                             pkt_offset="IP.src"),
-                              STLVmFixIpv4(offset="IP"),
-                              ], split_by_field="src")
-    elif p1_dst_end_ip and p2_dst_end_ip:
-        vm1 = STLScVmRaw([STLVmFlowVar(name="dst",
-                                       min_value=p1_dst_start_ip,
-                                       max_value=p1_dst_end_ip,
-                                       size=4, op="inc"),
-                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
-                          STLVmFixIpv4(offset="IP"),
-                         ], split_by_field="dst")
-        vm2 = STLScVmRaw([STLVmFlowVar(name="dst",
-                                       min_value=p2_dst_start_ip,
-                                       max_value=p2_dst_end_ip,
-                                       size=4, op="inc"),
-                          STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"),
-                          STLVmFixIpv4(offset="IP"),
-                         ], split_by_field="dst")
-    else:
-        vm1 = STLScVmRaw([STLVmFlowVar(name="src",
-                                       min_value=p1_src_start_ip,
-                                       max_value=p1_src_end_ip,
-                                       size=4, op="inc"),
-                          STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
-                          STLVmFixIpv4(offset="IP"),
-                         ], split_by_field="src")
-        vm2 = STLScVmRaw([STLVmFlowVar(name="src",
-                                       min_value=p2_src_start_ip,
-                                       max_value=p2_src_end_ip,
-                                       size=4, op="inc"),
-                          STLVmWrFlowVar(fv_name="src", pkt_offset="IP.src"),
-                          STLVmFixIpv4(offset="IP"),
-                         ], split_by_field="src")
-
-    return create_streams_v46(base_pkt_a, base_pkt_b, vm1, vm2, frame_size)
-
-
-def create_streams_v6(traffic_options, frame_size=78):
-    """Create two IPv6 packets to be used in stream.
-
-    :param traffic_options: Parameters for packets.
-    :param frame_size: Size of L2 frame.
-    :type traffic_options: List
-    :type frame_size: int
-    :return: Packet instances.
-    :rtype: Tuple of STLPktBuilder
-    """
-
-    if type(frame_size) is int and frame_size < 78:
-        print_error("Frame min. size is 78B")
-        sys.exit(2)
-
-    p1_src_start_ip = traffic_options['p1_src_start_ip']
-    p1_src_end_ip = traffic_options['p1_src_end_ip']
-    p1_dst_start_ip = traffic_options['p1_dst_start_ip']
-    p2_src_start_ip = traffic_options['p2_src_start_ip']
-    p2_src_end_ip = traffic_options['p2_src_end_ip']
-    p2_dst_start_ip = traffic_options['p2_dst_start_ip']
-
-    p1_dst_end_ip = traffic_options['p1_dst_end_ip']
-    p2_dst_end_ip = traffic_options['p2_dst_end_ip']
-
-    base_pkt_a = Ether()/IPv6(src=p1_src_start_ip, dst=p1_dst_start_ip)
-    base_pkt_b = Ether()/IPv6(src=p2_src_start_ip, dst=p2_dst_start_ip)
-
-    # The following code applies raw instructions to packet (IP src/dst
-    # increment). It splits the generated traffic by "ip_src"/"ip_dst" variable
-    # to cores.
-    if p1_dst_end_ip and p2_dst_end_ip:
-        base_p1, max_p1 = get_start_end_ipv6(p1_dst_start_ip, p1_dst_end_ip)
-        base_p2, max_p2 = get_start_end_ipv6(p2_dst_start_ip, p2_dst_end_ip)
-
-        vm1 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
-                                       min_value=base_p1,
-                                       max_value=max_p1+base_p1,
-                                       size=8, op="inc"),
-                          STLVmWrFlowVar(fv_name="ipv6_dst",
-                                         pkt_offset="IPv6.dst",
-                                         offset_fixup=8)
-                         ]
-                         , split_by_field="ipv6_dst")
-        vm2 = STLScVmRaw([STLVmFlowVar(name="ipv6_dst",
-                                       min_value=base_p2,
-                                       max_value=max_p2+base_p2,
-                                       size=8, op="inc"),
-                          STLVmWrFlowVar(fv_name="ipv6_dst",
-                                         pkt_offset="IPv6.dst",
-                                         offset_fixup=8)
-                         ]
-                         , split_by_field="ipv6_dst")
-    else:
-        base_p1, max_p1 = get_start_end_ipv6(p1_src_start_ip, p1_src_end_ip)
-        base_p2, max_p2 = get_start_end_ipv6(p2_src_start_ip, p2_src_end_ip)
-
-        vm1 = STLScVmRaw([STLVmFlowVar(name="ipv6_src",
-                                       min_value=base_p1,
-                                       max_value=max_p1+base_p1,
-                                       size=8, op="inc"),
-                          STLVmWrFlowVar(fv_name="ipv6_src",
-                                         pkt_offset="IPv6.src",
-                                         offset_fixup=8)
-                         ]
-                         , split_by_field="ipv6_src")
-        vm2 = STLScVmRaw([STLVmFlowVar(name="ipv6_src",
-                                       min_value=base_p2,
-                                       max_value=max_p2+base_p2,
-                                       size=8, op="inc"),
-                          STLVmWrFlowVar(fv_name="ipv6_src",
-                                         pkt_offset="IPv6.src",
-                                         offset_fixup=8)
-                         ]
-                         , split_by_field="ipv6_src")
-
-    return create_streams_v46(base_pkt_a, base_pkt_b, vm1, vm2, frame_size)
-
-def fmt_latency(lat_min, lat_avg, lat_max):
-    """ Return formatted, rounded latency
-
-    :param lat_min: Min latency
-    :param lat_avg: Average latency
-    :param lat_max: Max latency
-    :type lat_min: string
-    :type lat_avg: string
-    :type lat_max: string
-    :return: Formatted and rounded output "min/avg/max"
-    :rtype: string
-    """
-
-    try:
-        t_min = int(round(float(lat_min)))
-    except ValueError:
-        t_min = int(-1)
-    try:
-        t_avg = int(round(float(lat_avg)))
-    except ValueError:
-        t_avg = int(-1)
-    try:
-        t_max = int(round(float(lat_max)))
-    except ValueError:
-        t_max = int(-1)
-
-    return "/".join(str(tmp) for tmp in (t_min, t_avg, t_max))
-
-def simple_burst(stream_a, stream_b, stream_lat_a, stream_lat_b, duration, rate,
-                 warmup_time, async_start, latency):
-    """Run the traffic with specific parameters.
-
-    :param pkt_a: Base packet for stream 1.
-    :param pkt_b: Base packet for stream 2.
-    :param pkt_lat_a: Base packet for latency stream 1.
-    :param pkt_lat_b: Base packet for latency stream 2.
-    :param duration: Duration of traffic run in seconds (-1=infinite).
-    :param rate: Rate of traffic run [percentage, pps, bps].
-    :param warmup_time: Warm up duration.
-    :param async_start: Start the traffic and exit.
-    :param latency: With latency stats.
-    :type pkt_a: STLPktBuilder
-    :type pkt_b: STLPktBuilder
-    :type pkt_lat_a: STLPktBuilder
-    :type pkt_lat_b: STLPktBuilder
-    :type duration: int
-    :type rate: string
-    :type warmup_time: int
-    :type async_start: bool
-    :type latency: bool
-    :return: nothing
-    """
-
-    # create client
-    client = STLClient()
-
-    total_rcvd = 0
-    total_sent = 0
-    lost_a = 0
-    lost_b = 0
-    lat_a = "-1/-1/-1"
-    lat_b = "-1/-1/-1"
-
-    try:
-        # turn this off if too many logs
-        #client.set_verbose("high")
-
-        # connect to server
-        client.connect()
-
-        # prepare our ports (my machine has 0 <--> 1 with static route)
-        client.reset(ports=[0, 1])
-
-        client.add_streams(stream_a, ports=[0])
-        client.add_streams(stream_b, ports=[1])
-
-        if latency:
-            try:
-                client.add_streams(stream_lat_a, ports=[0])
-                client.add_streams(stream_lat_b, ports=[1])
-            except:
-                #Disable latency if NIC does not support requested stream type
-                print "##### FAILED to add latency streams #####"
-                latency = False
-
-        #warmup phase
-        if warmup_time > 0:
-            # clear the stats before injecting
-            client.clear_stats()
-
-            # choose rate and start traffic
-            client.start(ports=[0, 1], mult=rate, duration=warmup_time)
-
-            # block until done
-            client.wait_on_traffic(ports=[0, 1], timeout=(warmup_time+30))
-
-            if client.get_warnings():
-                for warning in client.get_warnings():
-                    print(warning)
-
-            # read the stats after the test
-            stats = client.get_stats()
-
-            print "#####warmup statistics#####"
-            print json.dumps(stats, indent=4,
-                             separators=(',', ': '), sort_keys=True)
-            lost_a = stats[0]["opackets"] - stats[1]["ipackets"]
-            lost_b = stats[1]["opackets"] - stats[0]["ipackets"]
-
-            print "\npackets lost from 0 --> 1:   {0} pkts".format(lost_a)
-            print "packets lost from 1 --> 0:   {0} pkts".format(lost_b)
-
-        # clear the stats before injecting
-        client.clear_stats()
-        lost_a = 0
-        lost_b = 0
-
-        # choose rate and start traffic
-        client.start(ports=[0, 1], mult=rate, duration=duration)
-
-        if not async_start:
-            # block until done
-            client.wait_on_traffic(ports=[0, 1], timeout=(duration+30))
-
-            if client.get_warnings():
-                for warning in client.get_warnings():
-                    print(warning)
-
-            # read the stats after the test
-            stats = client.get_stats()
-
-            print "#####statistics#####"
-            print json.dumps(stats, indent=4,
-                             separators=(',', ': '), sort_keys=True)
-            lost_a = stats[0]["opackets"] - stats[1]["ipackets"]
-            lost_b = stats[1]["opackets"] - stats[0]["ipackets"]
-
-            if latency:
-                lat_a = fmt_latency(\
-                    str(stats["latency"][0]["latency"]["total_min"]),\
-                    str(stats["latency"][0]["latency"]["average"]),\
-                    str(stats["latency"][0]["latency"]["total_max"]))
-                lat_b = fmt_latency(\
-                    str(stats["latency"][1]["latency"]["total_min"]),\
-                    str(stats["latency"][1]["latency"]["average"]),\
-                    str(stats["latency"][1]["latency"]["total_max"]))
-
-            total_sent = stats[0]["opackets"] + stats[1]["opackets"]
-            total_rcvd = stats[0]["ipackets"] + stats[1]["ipackets"]
-
-            print "\npackets lost from 0 --> 1:   {0} pkts".format(lost_a)
-            print "packets lost from 1 --> 0:   {0} pkts".format(lost_b)
-
-    except STLError as ex_error:
-        print_error(str(ex_error))
-        sys.exit(1)
-
-    finally:
-        if async_start:
-            client.disconnect(stop_traffic=False, release_ports=True)
-        else:
-            client.disconnect()
-            print "rate={0}, totalReceived={1}, totalSent={2}, "\
-                "frameLoss={3}, latencyStream0(usec)={4}, "\
-                "latencyStream1(usec)={5}".format(rate, total_rcvd,\
-                total_sent, lost_a+lost_b, lat_a, lat_b)
-
-
-def print_error(msg):
-    """Print error message on stderr.
-
-    :param msg: Error message to print.
-    :type msg: string
-    :return: nothing
-    """
-
-    sys.stderr.write(msg+'\n')
-
-
-def parse_args():
-    """Parse arguments from cmd line.
-
-    :return: Parsed arguments.
-    :rtype ArgumentParser
-    """
-
-    parser = argparse.ArgumentParser()
-    parser.add_argument("-d", "--duration", required=True, type=int,
-                        help="Duration of traffic run")
-    parser.add_argument("-s", "--frame_size", required=True,
-                        help="Size of a Frame without padding and IPG")
-    parser.add_argument("-r", "--rate", required=True,
-                        help="Traffic rate with included units (%, pps)")
-    parser.add_argument("-6", "--use_IPv6", action="store_true",
-                        default=False,
-                        help="Use IPv6 traffic profile instead of IPv4")
-    parser.add_argument("--async", action="store_true",
-                        default=False,
-                        help="Non-blocking call of the script")
-    parser.add_argument("--latency", action="store_true",
-                        default=False,
-                        help="Add latency stream")
-    parser.add_argument("-w", "--warmup_time", type=int,
-                        default=5,
-                        help="Traffic warmup time in seconds, 0 = disable")
-#    parser.add_argument("--p1_src_mac",
-#                        help="Port 1 source MAC address")
-#    parser.add_argument("--p1_dst_mac",
-#                        help="Port 1 destination MAC address")
-
-    parser.add_argument("--p1_src_start_ip", required=True,
-                        help="Port 1 source start IP address")
-    parser.add_argument("--p1_src_end_ip",
-                        default=False,
-                        help="Port 1 source end IP address")
-    parser.add_argument("--p1_dst_start_ip", required=True,
-                        help="Port 1 destination start IP address")
-    parser.add_argument("--p1_dst_end_ip",
-                        default=False,
-                        help="Port 1 destination end IP address")
-
-    parser.add_argument("--p1_src_start_udp_port",
-                        default=None,
-                        help="Port 1 source start UDP port.")
-    parser.add_argument("--p1_src_end_udp_port",
-                        default=None,
-                        help="Port 1 source end UDP port.")
-
-    parser.add_argument("--p1_dst_start_udp_port",
-                        default=None,
-                        help="Port 1 destination start UDP port.")
-    parser.add_argument("--p1_dst_end_udp_port",
-                        default=None,
-                        help="Port 1 destination end UDP port.")
-
-#    parser.add_argument("--p2_src_mac",
-#                        help="Port 2 source MAC address")
-#    parser.add_argument("--p2_dst_mac",
-#                        help="Port 2 destination MAC address")
-
-    parser.add_argument("--p2_src_start_ip", required=True,
-                        help="Port 2 source start IP address")
-    parser.add_argument("--p2_src_end_ip",
-                        default=False,
-                        help="Port 2 source end IP address")
-    parser.add_argument("--p2_dst_start_ip", required=True,
-                        help="Port 2 destination start IP address")
-    parser.add_argument("--p2_dst_end_ip",
-                        default=False,
-                        help="Port 2 destination end IP address")
-
-    parser.add_argument("--p2_src_start_udp_port",
-                        default=None,
-                        help="Port 2 source start UDP port.")
-    parser.add_argument("--p2_src_end_udp_port",
-                        default=None,
-                        help="Port 2 source end UDP port.")
-
-    parser.add_argument("--p2_dst_start_udp_port",
-                        default=None,
-                        help="Port 2 destination start UDP port.")
-    parser.add_argument("--p2_dst_end_udp_port",
-                        default=None,
-                        help="Port 2 destination end UDP port.")
-
-    return parser.parse_args()
-
-
-def main():
-    """Main function."""
-
-    args = parse_args()
-
-    _duration = args.duration
-    _latency = args.latency
-    if args.frame_size.isdigit():
-        _frame_size = int(args.frame_size)
-    else:
-        _frame_size = args.frame_size
-        _latency = False
-    _rate = args.rate
-    _use_ipv6 = args.use_IPv6
-    _async_call = args.async
-    _warmup_time = args.warmup_time
-
-    _traffic_options = {}
-    for attr in [a for a in dir(args) if a.startswith('p')]:
-        if getattr(args, attr) is not None:
-            _traffic_options[attr] = getattr(args, attr)
-
-    if _use_ipv6:
-        stream_a, stream_b, stream_lat_a, stream_lat_b = create_streams_v6(
-            _traffic_options, frame_size=_frame_size)
-    else:
-        stream_a, stream_b, stream_lat_a, stream_lat_b = create_streams(
-            _traffic_options, frame_size=_frame_size)
-
-    simple_burst(stream_a, stream_b, stream_lat_a, stream_lat_b,
-                 _duration, _rate, _warmup_time, _async_call, _latency)
-
-if __name__ == "__main__":
-    sys.exit(main())
index c7787f3..351fe1d 100644 (file)
@@ -23,7 +23,7 @@
 | ...
 | Test Setup | Performance test setup
 | Test Teardown | Performance test teardown | ${min_rate}pps | ${framesize}
-| ... | 3-node-bridge
+| ... | ${traffic_profile}
 | ...
 | Documentation | *RFC2544: Pkt throughput L2BD test cases*
 | ...
@@ -50,6 +50,8 @@
 *** Variables ***
 # Cisco-VIC-1227 bandwidth limit
 | ${s_limit} | ${10000000000}
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Keywords ***
 | L2 Bridge Domain NDR Binary Search
@@ -73,7 +75,7 @@
 | | Apply startup configuration on all VPP DUTs
 | | L2 bridge domain initialized in a 3-node circular topology
 | | Find NDR using binary search and pps
-| | ... | ${framesize} | ${binary_min} | ${binary_max} | 3-node-bridge
+| | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
 | | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | L2 Bridge Domain PDR Binary Search
 | | Apply startup configuration on all VPP DUTs
 | | L2 bridge domain initialized in a 3-node circular topology
 | | Find PDR using binary search and pps
-| | ... | ${framesize} | ${binary_min} | ${binary_max} | 3-node-bridge
+| | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
 | | ... | ${min_rate} | ${max_rate} | ${threshold}
 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
index 4cdfd86..517905d 100644 (file)
@@ -52,6 +52,8 @@
 | ${inner_vlan_id}= | 200
 | ${type_subif}= | two_tags
 | ${tag_rewrite}= | pop-2
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Test Cases ***
 | tc01-64B-1t1c-dot1ad-l2xcbase-ndrchk
@@ -77,7 +79,7 @@
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc02-1514B-1t1c-dot1ad-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc03-9000B-1t1c-dot1ad-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc04-64B-2t2c-dot1ad-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc05-1514B-2t2c-dot1ad-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc06-9000B-2t2c-dot1ad-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc07-64B-4t4c-dot1ad-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc08-1514B-4t4c-dot1ad-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc09-9000B-4t4c-dot1ad-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
index 32ea31e..cafae94 100644 (file)
@@ -24,7 +24,7 @@
 | ...
 | Test Setup | Performance test setup
 | Test Teardown | Performance test teardown | ${min_rate}pps | ${framesize}
-| ... | 3-node-xconnect
+| ... | ${traffic_profile}
 | ...
 | Documentation | *RFC2544: Pkt throughput L2XC with 802.1ad test cases*
 | ...
@@ -57,6 +57,8 @@
 | ${tag_rewrite}= | pop-2
 # X520-DA2 bandwidth limit
 | ${s_limit} | ${10000000000}
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Test Cases ***
 | tc01-64B-1t1c-dot1ad-l2xcbase-ndrdisc
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
@@ -86,9 +88,8 @@
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc02-64B-1t1c-dot1ad-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
 | tc03-1514B-1t1c-dot1ad-l2xcbase-ndrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc04-1514B-1t1c-dot1ad-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
 | tc05-9000B-1t1c-dot1ad-l2xcbase-ndrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc06-9000B-1t1c-dot1ad-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
 | tc07-64B-2t2c-dot1ad-l2xcbase-ndrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '2' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc08-64B-2t2c-dot1ad-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '2' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
 | tc09-1514B-2t2c-dot1ad-l2xcbase-ndrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '2' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc10-1514B-2t2c-dot1ad-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '2' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
 | tc11-9000B-2t2c-dot1ad-l2xcbase-ndrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '2' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc12-9000B-2t2c-dot1ad-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '2' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
 | tc13-64B-4t4c-dot1ad-l2xcbase-ndrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '4' worker threads and rxqueues '2' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc14-64B-4t4c-dot1ad-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '4' worker threads and rxqueues '2' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
 | tc15-1514B-4t4c-dot1ad-l2xcbase-ndrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '4' worker threads and rxqueues '2' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc16-1514B-4t4c-dot1ad-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '4' worker threads and rxqueues '2' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
 | tc17-9000B-4t4c-dot1ad-l2xcbase-ndrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '4' worker threads and rxqueues '2' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc18-9000B-4t4c-dot1ad-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '4' worker threads and rxqueues '2' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | ... | ${outer_vlan_id} | ${inner_vlan_id} | ${type_subif}
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
index c2cfdf7..245f969 100644 (file)
@@ -24,7 +24,7 @@
 | ...
 | Test Setup | Performance test setup
 | Test Teardown | Performance test with vhost and VM with dpdk-testpmd teardown
-| ... | ${min_rate}pps | ${framesize} | 3-node-bridge
+| ... | ${min_rate}pps | ${framesize} | ${traffic_profile}
 | ... | dut1_node=${dut1} | dut1_vm_refs=${dut1_vm_refs}
 | ... | dut2_node=${dut2} | dut2_vm_refs=${dut2_vm_refs}
 | ...
@@ -67,6 +67,8 @@
 | ${bd_id2}= | 2
 | ${sock1}= | /tmp/sock-1-${bd_id1}
 | ${sock2}= | /tmp/sock-1-${bd_id2}
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Test Cases ***
 | tc01-64B-1t1c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc02-64B-1t1c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc03-1518B-1t1c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc04-1518B-1t1c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc05-IMIX-1t1c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc06-IMIX-1t1c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc07-64B-2t2c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc08-64B-2t2c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc09-1518B-2t2c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc10-1518B-2t2c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc11-IMIX-2t2c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc12-IMIX-2t2c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc13-64B-4t4c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc14-64B-4t4c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc15-1518B-4t4c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc16-1518B-4t4c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc17-IMIX-4t4c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc18-IMIX-4t4c-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
index c52a8ce..75b9c36 100644 (file)
@@ -24,7 +24,7 @@
 | ...
 | Test Setup | Performance test setup
 | Test Teardown | Performance test with vhost and VM with dpdk-testpmd teardown
-| ... | ${min_rate}pps | ${framesize} | 3-node-xconnect
+| ... | ${min_rate}pps | ${framesize} | ${traffic_profile}
 | ... | dut1_node=${dut1} | dut1_vm_refs=${dut1_vm_refs}
 | ... | dut2_node=${dut2} | dut2_vm_refs=${dut2_vm_refs}
 | ...
@@ -64,6 +64,8 @@
 | ${sock2}= | /tmp/sock-2
 # X520-DA2 bandwidth limit
 | ${s_limit}= | ${10000000000}
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Test Cases ***
 | tc01-64B-1t1c-eth-l2xcbase-eth-2vhost-1vm-ndrdisc
@@ -96,8 +98,8 @@
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc02-64B-1t1c-eth-l2xcbase-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc03-1518B-1t1c-eth-l2xcbase-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc04-1518B-1t1c-eth-l2xcbase-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc05-IMIX-1t1c-eth-l2xcbase-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc06-IMIX-1t1c-eth-l2xcbase-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc07-64B-2t2c-eth-l2xcbase-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc08-64B-2t2c-eth-l2xcbase-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc09-1518B-2t2c-eth-l2xcbase-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc10-1518B-2t2c-eth-l2xcbase-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc11-IMIX-2t2c-eth-l2xcbase-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc12-IMIX-2t2c-eth-l2xcbase-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc13-64B-4t4c-eth-l2xcbase-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc14-64B-4t4c-eth-l2xcbase-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc15-1518B-4t4c-eth-l2xcbase-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc16-1518B-4t4c-eth-l2xcbase-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
 
 | tc17-IMIX-4t4c-eth-l2xcbase-eth-2vhost-1vm-ndrdisc
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc18-IMIX-4t4c-eth-l2xcbase-eth-2vhost-1vm-pdrdisc
 | | [Documentation]
 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ... | ${binary_max} | 3-node-bridge | ${min_rate} | ${max_rate}
-| | ... | ${threshold} | ${perf_pdr_loss_acceptance}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold} | ${perf_pdr_loss_acceptance}
 | | ... | ${perf_pdr_loss_acceptance_type}
index b873322..cf1fddf 100644 (file)
@@ -48,6 +48,8 @@
 *** Variables ***
 | ${subid}= | 10
 | ${tag_rewrite}= | pop-1
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Test Cases ***
 | tc01-64B-1t1c-dot1q-l2xcbase-ndrchk
@@ -72,7 +74,7 @@
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc02-1518B-1t1c-dot1q-l2xcbase-ndrchk
 | | [Documentation]
@@ -96,7 +98,7 @@
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc03-9000B-1t1c-dot1q-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc04-64B-2t2c-dot1q-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc05-1518B-2t2c-dot1q-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc06-9000B-2t2c-dot1q-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc07-64B-4t4c-dot1q-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc08-1518B-4t4c-dot1q-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
 
 | tc09-9000B-4t4c-dot1q-l2xcbase-ndrchk
 | | [Documentation]
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Traffic should pass with no loss | ${perf_trial_duration} | ${rate}
-| | ... | ${framesize} | 3-node-xconnect
+| | ... | ${framesize} | ${traffic_profile}
index ab7be24..77edc2a 100644 (file)
@@ -24,7 +24,7 @@
 | ...
 | Test Setup | Performance test setup
 | Test Teardown | Performance test teardown | ${min_rate}pps | ${framesize}
-| ... | 3-node-xconnect
+| ... | ${traffic_profile}
 | ...
 | Documentation | *RFC2544: Pkt throughput L2XC with 802.1q test cases*
 | ...
@@ -53,6 +53,8 @@
 | ${tag_rewrite}= | pop-1
 # X520-DA2 bandwidth limit
 | ${s_limit} | ${10000000000}
+# Traffic profile:
+| ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
 
 *** Test Cases ***
 | tc01-64B-1t1c-dot1q-l2xcbase-ndrdisc
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN dot1q subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | And L2 tag rewrite method setup on interfaces
@@ -81,9 +83,8 @@
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find NDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
 
 | tc02-64B-1t1c-dot1q-l2xcbase-pdrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN dot1q subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | And L2 tag rewrite method setup on interfaces
 | | ... | ${dut1} | ${dut1_if1} | ${subif_index_1}
 | | ... | ${dut2} | ${dut2_if2} | ${subif_index_2}
 | | Then Find PDR using binary search and pps | ${framesize} | ${binary_min}
-| | ...                                       | ${binary_max} | 3-node-xconnect
-| | ...                                       | ${min_rate} | ${max_rate}
-| | ...                                       | ${threshold}
-| | ...                                       | ${perf_pdr_loss_acceptance}
-| | ...                                       | ${perf_pdr_loss_acceptance_type}
+| | ... | ${binary_max} | ${traffic_profile}
+| | ... | ${min_rate} | ${max_rate} | ${threshold}
+| | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
 
 | tc03-1518B-1t1c-dot1q-l2xcbase-ndrdisc
 | | [Documentation]
 | | ${binary_max}= | Set Variable | ${max_rate}
 | | ${threshold}= | Set Variable | ${min_rate}
 | | Given Add '1' worker threads and rxqueues '1' in 3-node single-link topo
-| | And   Add PCI devices to DUTs from 3-node single link topology
-| | And   Add No Multi Seg to all DUTs
-| | And   Apply startup configuration on all VPP DUTs
-| | And   VPP interfaces in path are up in a 3-node circular topology
+| | And Add PCI devices to DUTs from 3-node single link topology
+| | And Add No Multi Seg to all DUTs
+| | And Apply startup configuration on all VPP DUTs
+| | And VPP interfaces in path are up in a 3-node circular topology
 | | When VLAN dot1q subinterfaces initialized on 3-node topology
 | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
 | | And L2 tag rewrite method setup on interfaces
@@