1f31b70eeSJan Gelety# Copyright (c) 2020 Cisco and/or its affiliates.
2baa47eeeSPeter Mikus# Licensed under the Apache License, Version 2.0 (the "License");
3baa47eeeSPeter Mikus# you may not use this file except in compliance with the License.
4baa47eeeSPeter Mikus# You may obtain a copy of the License at:
5baa47eeeSPeter Mikus#
6baa47eeeSPeter Mikus#     http://www.apache.org/licenses/LICENSE-2.0
7baa47eeeSPeter Mikus#
8baa47eeeSPeter Mikus# Unless required by applicable law or agreed to in writing, software
9baa47eeeSPeter Mikus# distributed under the License is distributed on an "AS IS" BASIS,
10baa47eeeSPeter Mikus# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11baa47eeeSPeter Mikus# See the License for the specific language governing permissions and
12baa47eeeSPeter Mikus# limitations under the License.
13baa47eeeSPeter Mikus
14baa47eeeSPeter Mikus*** Settings ***
15baa47eeeSPeter Mikus| Resource | resources/libraries/robot/shared/default.robot
16d68951acSJan Gelety|
17baa47eeeSPeter Mikus| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR
18baa47eeeSPeter Mikus| ... | NIC_Intel-X710 | L2BDMACLRN | ENCAP | VXLAN | L2OVRLAY | IP4UNRLAY
19baa47eeeSPeter Mikus| ... | VHOST | VM | VHOST_1024 | VXLAN | DOT1Q | NF_DENSITY | NF_TESTPMD
20b55e324dSVratko Polak| ... | CHAIN | 1R1C | 1VM1T | DRV_VFIO_PCI
216daa2d79SPeter Mikus| ... | RXQ_SIZE_0 | TXQ_SIZE_0
22e916ab4dSVratko Polak| ... | dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd
23d68951acSJan Gelety|
2414a71b74SPeter Mikus| Suite Setup | Setup suite topology interfaces | performance
25baa47eeeSPeter Mikus| Suite Teardown | Tear down suite | performance
2650ca8535SJan Gelety| Test Setup | Setup test | performance
27baa47eeeSPeter Mikus| Test Teardown | Tear down test | performance | vhost
28d68951acSJan Gelety|
29baa47eeeSPeter Mikus| Test Template | Local Template
30d68951acSJan Gelety|
31baa47eeeSPeter Mikus| Documentation | *RFC2544: Packet throughput L2BD test cases with Dot1Q and
32ff820e3dSVratko Polak| ... | VXLANoIPv4 with ${nf_chains} instances, ${nf_nodes} VMs per instance.*
33d68951acSJan Gelety|
34baa47eeeSPeter Mikus| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
35baa47eeeSPeter Mikus| ... | with single links between nodes.
36baa47eeeSPeter Mikus| ... | *[Enc] Packet Encapsulations:* Dot1q-IPv4-UDP-VXLAN-Eth-IPv4 for L2\
37baa47eeeSPeter Mikus| ... | switching of IPv4. Dot1q-IPv4-UDP-VXLAN-Eth-IPv4 is applied on link\
38baa47eeeSPeter Mikus| ... | between DUT1 and TG.
39baa47eeeSPeter Mikus| ... | *[Cfg] DUT configuration:* DUT1 is configured with L2 bridge-\
40baa47eeeSPeter Mikus| ... | domain and MAC learning enabled. Qemu VNFs are connected\
41baa47eeeSPeter Mikus| ... | to VPP via vhost-user interfaces. Guest is running testpmd l2xc\
42baa47eeeSPeter Mikus| ... | interconnecting vhost-user interfaces, rxd/txd=1024. DUT1 is\
43baa47eeeSPeter Mikus| ... | tested with ${nic_name}.
44baa47eeeSPeter Mikus| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\
45baa47eeeSPeter Mikus| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\
46baa47eeeSPeter Mikus| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\
47baa47eeeSPeter Mikus| ... | of packets transmitted. NDR and PDR are discovered for different\
48baa47eeeSPeter Mikus| ... | Ethernet L2 frame sizes using MLRsearch library.\
49baa47eeeSPeter Mikus| ... | Test packets are generated by TG on links to DUTs. TG traffic profile\
50baa47eeeSPeter Mikus| ... | contains two L3 flow-groups (flow-group per direction, 256 flows per\
51baa47eeeSPeter Mikus| ... | flow-group) with all packets containing Ethernet header with .1Q, IPv4\
52baa47eeeSPeter Mikus| ... | header, UPD header, VXLAN header and static payload. MAC addresses are\
53baa47eeeSPeter Mikus| ... | matching MAC addresses of the TG node interfaces.
54baa47eeeSPeter Mikus| ... | *[Ref] Applicable standard specifications:* RFC2544, RFC7348.
55baa47eeeSPeter Mikus
56baa47eeeSPeter Mikus*** Variables ***
57baa47eeeSPeter Mikus| @{plugins_to_enable}= | dpdk_plugin.so
58ac89ba8aSPeter Mikus| ${crypto_type}= | ${None}
59baa47eeeSPeter Mikus| ${nic_name}= | Intel-X710
60fcc77752SPeter Mikus| ${nic_driver}= | vfio-pci
616daa2d79SPeter Mikus| ${nic_rxq_size}= | 0
626daa2d79SPeter Mikus| ${nic_txq_size}= | 0
6314a71b74SPeter Mikus| ${nic_pfs}= | 2
6414a71b74SPeter Mikus| ${nic_vfs}= | 0
6597dbe2feSPeter Mikus| ${osi_layer}= | L3
66baa47eeeSPeter Mikus| ${overhead}= | ${54}
67baa47eeeSPeter Mikus| ${nf_dtcr}= | ${2}
68baa47eeeSPeter Mikus| ${nf_dtc}= | ${0.5}
69baa47eeeSPeter Mikus| ${nf_chains}= | ${1}
70baa47eeeSPeter Mikus| ${nf_nodes}= | ${1}
71baa47eeeSPeter Mikus# Traffic profile:
72baa47eeeSPeter Mikus| ${traffic_profile}=
73baa47eeeSPeter Mikus| ... | trex-sl-dot1qip4vxlan-ip4src${nf_chains}udpsrcrnd
74baa47eeeSPeter Mikus
75baa47eeeSPeter Mikus*** Keywords ***
76baa47eeeSPeter Mikus| Local Template
77baa47eeeSPeter Mikus| | [Documentation]
78baa47eeeSPeter Mikus| | ... | [Cfg] DUT runs Dot1Q-IP4-Vxlan L2BD switching config.\
79baa47eeeSPeter Mikus| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads.
80baa47eeeSPeter Mikus| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\
81d68951acSJan Gelety| |
82baa47eeeSPeter Mikus| | ... | *Arguments:*
83baa47eeeSPeter Mikus| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1).
84baa47eeeSPeter Mikus| | ... | Type: integer, string
85baa47eeeSPeter Mikus| | ... | - phy_cores - Number of worker threads to be used. Type: integer
86baa47eeeSPeter Mikus| | ... | - rxq - Number of Rx queues to be used. Type: integer
87d68951acSJan Gelety| |
88baa47eeeSPeter Mikus| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
89d68951acSJan Gelety| |
90baa47eeeSPeter Mikus| | Set Test Variable | \${frame_size}
91d68951acSJan Gelety| |
92ac89ba8aSPeter Mikus| | Given Set Max Rate And Jumbo
93ac89ba8aSPeter Mikus| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
94ac89ba8aSPeter Mikus| | And Pre-initialize layer driver | ${nic_driver}
95baa47eeeSPeter Mikus| | And Apply startup configuration on all VPP DUTs
96fcc77752SPeter Mikus| | When Initialize layer driver | ${nic_driver}
97fcc77752SPeter Mikus| | And Initialize layer interface
98baa47eeeSPeter Mikus| | ... | count=${nf_chains}
99baa47eeeSPeter Mikus| | And Initialize layer dot1q
100ff820e3dSVratko Polak| | ... | count=${nf_chains} | vlan_per_chain=${False}
101baa47eeeSPeter Mikus| | And Initialize layer ip4vxlan
102baa47eeeSPeter Mikus| | ... | count=${nf_chains}
103baa47eeeSPeter Mikus| | And Initialize L2 bridge domains for multiple chains with Vhost-User
104baa47eeeSPeter Mikus| | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes}
105baa47eeeSPeter Mikus| | And Configure chains of NFs connected via vhost-user
106baa47eeeSPeter Mikus| | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes} | jumbo=${jumbo}
107baa47eeeSPeter Mikus| | ... | use_tuned_cfs=${False} | auto_scale=${false} | vnf=testpmd_io
108baa47eeeSPeter Mikus| | Then Find NDR and PDR intervals using optimized search
109baa47eeeSPeter Mikus
110baa47eeeSPeter Mikus*** Test Cases ***
111baa47eeeSPeter Mikus| tc01-118B-1c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
112baa47eeeSPeter Mikus| | [Tags] | 118B | 1C
113baa47eeeSPeter Mikus| | frame_size=${118} | phy_cores=${1}
114baa47eeeSPeter Mikus
115baa47eeeSPeter Mikus| tc02-118B-2c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
116baa47eeeSPeter Mikus| | [Tags] | 118B | 2C
117baa47eeeSPeter Mikus| | frame_size=${118} | phy_cores=${2}
118baa47eeeSPeter Mikus
119baa47eeeSPeter Mikus| tc03-118B-4c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
120baa47eeeSPeter Mikus| | [Tags] | 118B | 4C
121baa47eeeSPeter Mikus| | frame_size=${118} | phy_cores=${4}
122baa47eeeSPeter Mikus
123baa47eeeSPeter Mikus| tc04-1518B-1c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
124baa47eeeSPeter Mikus| | [Tags] | 1518B | 1C
125baa47eeeSPeter Mikus| | frame_size=${1518} | phy_cores=${1}
126baa47eeeSPeter Mikus
127baa47eeeSPeter Mikus| tc05-1518B-2c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
128baa47eeeSPeter Mikus| | [Tags] | 1518B | 2C
129baa47eeeSPeter Mikus| | frame_size=${1518} | phy_cores=${2}
130baa47eeeSPeter Mikus
131baa47eeeSPeter Mikus| tc06-1518B-4c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
132baa47eeeSPeter Mikus| | [Tags] | 1518B | 4C
133baa47eeeSPeter Mikus| | frame_size=${1518} | phy_cores=${4}
134baa47eeeSPeter Mikus
135baa47eeeSPeter Mikus| tc07-9000B-1c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
136baa47eeeSPeter Mikus| | [Tags] | 9000B | 1C
137baa47eeeSPeter Mikus| | frame_size=${9000} | phy_cores=${1}
138baa47eeeSPeter Mikus
139baa47eeeSPeter Mikus| tc08-9000B-2c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
140baa47eeeSPeter Mikus| | [Tags] | 9000B | 2C
141baa47eeeSPeter Mikus| | frame_size=${9000} | phy_cores=${2}
142baa47eeeSPeter Mikus
143baa47eeeSPeter Mikus| tc09-9000B-4c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
144baa47eeeSPeter Mikus| | [Tags] | 9000B | 4C
145baa47eeeSPeter Mikus| | frame_size=${9000} | phy_cores=${4}
146baa47eeeSPeter Mikus
147baa47eeeSPeter Mikus| tc10-IMIX-1c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
148baa47eeeSPeter Mikus| | [Tags] | IMIX | 1C
149baa47eeeSPeter Mikus| | frame_size=IMIX_v4_1 | phy_cores=${1}
150baa47eeeSPeter Mikus
151baa47eeeSPeter Mikus| tc11-IMIX-2c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
152baa47eeeSPeter Mikus| | [Tags] | IMIX | 2C
153baa47eeeSPeter Mikus| | frame_size=IMIX_v4_1 | phy_cores=${2}
154baa47eeeSPeter Mikus
155baa47eeeSPeter Mikus| tc12-IMIX-4c-dot1qip4vxlan-l2bd-1ch-2vh-1vm1t-testpmd-ndrpdr
156baa47eeeSPeter Mikus| | [Tags] | IMIX | 4C
157baa47eeeSPeter Mikus| | frame_size=IMIX_v4_1 | phy_cores=${4}
158