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