1f31b70eeSJan Gelety# Copyright (c) 2020 Cisco and/or its affiliates.
211bd03f2SPeter Mikus# Licensed under the Apache License, Version 2.0 (the "License");
311bd03f2SPeter Mikus# you may not use this file except in compliance with the License.
411bd03f2SPeter Mikus# You may obtain a copy of the License at:
511bd03f2SPeter Mikus#
611bd03f2SPeter Mikus#     http://www.apache.org/licenses/LICENSE-2.0
711bd03f2SPeter Mikus#
811bd03f2SPeter Mikus# Unless required by applicable law or agreed to in writing, software
911bd03f2SPeter Mikus# distributed under the License is distributed on an "AS IS" BASIS,
1011bd03f2SPeter Mikus# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111bd03f2SPeter Mikus# See the License for the specific language governing permissions and
1211bd03f2SPeter Mikus# limitations under the License.
1311bd03f2SPeter Mikus
1411bd03f2SPeter Mikus*** Settings ***
151577123aSPeter Mikus| Resource | resources/libraries/robot/shared/default.robot
16d68951acSJan Gelety|
1711bd03f2SPeter Mikus| Force Tags | 2_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDR
18780b65d8SPeter Mikus| ... | NIC_Intel-X710 | ETH | L2BDMACLRN | BASE | MEMIF | DOCKER | 4R4C
19b55e324dSVratko Polak| ... | NF_DENSITY | PIPELINE | NF_VPPIP4 | 16DCR1T | DRV_VFIO_PCI
206daa2d79SPeter Mikus| ... | RXQ_SIZE_0 | TXQ_SIZE_0
21e916ab4dSVratko Polak| ... | eth-l2bd-4pl-8mif-16dcr1t-vppip4
22d68951acSJan Gelety|
2314a71b74SPeter Mikus| Suite Setup | Setup suite topology interfaces | performance
246871d4e7SPeter Mikus| Suite Teardown | Tear down suite | performance
2550ca8535SJan Gelety| Test Setup | Setup test | performance
266871d4e7SPeter Mikus| Test Teardown | Tear down test | performance | container
27d68951acSJan Gelety|
2811bd03f2SPeter Mikus| Test Template | Local Template
29d68951acSJan Gelety|
3011bd03f2SPeter Mikus| Documentation | **RFC2544: Pkt throughput L2BD test cases with 8memif 4
31780b65d8SPeter Mikus| ... | pipelines 16 docker containers*
32d68951acSJan Gelety|
3311bd03f2SPeter Mikus| ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with
3411bd03f2SPeter Mikus| ... | single links between nodes.
3511bd03f2SPeter Mikus| ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for L2 bridge domain.
3611bd03f2SPeter Mikus| ... | *[Cfg] DUT configuration:* DUT1 is configured with two L2 bridge domains
375e6145a4SVratko Polak| ... | and MAC learning enabled. DUT1 tested with ${nic_name}.\
3811bd03f2SPeter Mikus| ... | Container is connected to VPP via Memif interface. Container is running
3911bd03f2SPeter Mikus| ... | same VPP version as running on DUT. Container is limited via cgroup to
4011bd03f2SPeter Mikus| ... | use cores allocated from pool of isolated CPUs. There are no memory
4111bd03f2SPeter Mikus| ... | contraints.
425e6145a4SVratko Polak| ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop\
435e6145a4SVratko Polak| ... | Rate) with zero packet loss tolerance and throughput PDR (Partial Drop\
445e6145a4SVratko Polak| ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage\
455e6145a4SVratko Polak| ... | of packets transmitted. NDR and PDR are discovered for different\
465e6145a4SVratko Polak| ... | Ethernet L2 frame sizes using MLRsearch library.\
4711bd03f2SPeter Mikus| ... | Test packets are generated by TG on links to DUTs. TG traffic profile
4811bd03f2SPeter Mikus| ... | contains two L3 flow-groups (flow-group per direction, 254 flows per
4911bd03f2SPeter Mikus| ... | flow-group) with all packets containing Ethernet header, IPv4 header
5011bd03f2SPeter Mikus| ... | with IP protocol=61 and static payload. MAC addresses are matching MAC
5111bd03f2SPeter Mikus| ... | addresses of the TG node interfaces.
5211bd03f2SPeter Mikus
5311bd03f2SPeter Mikus*** Variables ***
541577123aSPeter Mikus| @{plugins_to_enable}= | dpdk_plugin.so | memif_plugin.so
55ac89ba8aSPeter Mikus| ${crypto_type}= | ${None}
565e6145a4SVratko Polak| ${nic_name}= | Intel-X710
57fcc77752SPeter Mikus| ${nic_driver}= | vfio-pci
586daa2d79SPeter Mikus| ${nic_rxq_size}= | 0
596daa2d79SPeter Mikus| ${nic_txq_size}= | 0
6014a71b74SPeter Mikus| ${nic_pfs}= | 2
6114a71b74SPeter Mikus| ${nic_vfs}= | 0
62f31b70eeSJan Gelety| ${osi_layer}= | L2
635e6145a4SVratko Polak| ${overhead}= | ${0}
64780b65d8SPeter Mikus| ${nf_dtcr}= | ${2}
65780b65d8SPeter Mikus| ${nf_dtc}= | ${0.5}
66329e0aceSPeter Mikus| ${nf_chains}= | ${4}
67329e0aceSPeter Mikus| ${nf_nodes}= | ${4}
6811bd03f2SPeter Mikus# Traffic profile:
69780b65d8SPeter Mikus| ${traffic_profile}= | trex-sl-2n3n-ethip4-ip4src254-4c4n
7011bd03f2SPeter Mikus# Container
7111bd03f2SPeter Mikus| ${container_engine}= | Docker
7211bd03f2SPeter Mikus| ${container_chain_topology}= | pipeline_ip4
7311bd03f2SPeter Mikus
7411bd03f2SPeter Mikus*** Keywords ***
7511bd03f2SPeter Mikus| Local Template
7611bd03f2SPeter Mikus| | [Documentation]
7711bd03f2SPeter Mikus| | ... | [Cfg] DUT runs L2BD switching config.
7811bd03f2SPeter Mikus| | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads.
795e6145a4SVratko Polak| | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\
80d68951acSJan Gelety| |
8111bd03f2SPeter Mikus| | ... | *Arguments:*
825e6145a4SVratko Polak| | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1).
8311bd03f2SPeter Mikus| | ... | Type: integer, string
8411bd03f2SPeter Mikus| | ... | - phy_cores - Number of physical cores. Type: integer
8511bd03f2SPeter Mikus| | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
86d68951acSJan Gelety| |
875e6145a4SVratko Polak| | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
88d68951acSJan Gelety| |
895e6145a4SVratko Polak| | Set Test Variable | \${frame_size}
90d68951acSJan Gelety| |
91ac89ba8aSPeter Mikus| | Given Set Max Rate And Jumbo
92ac89ba8aSPeter Mikus| | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
93ac89ba8aSPeter Mikus| | And Pre-initialize layer driver | ${nic_driver}
9411bd03f2SPeter Mikus| | And Apply startup configuration on all VPP DUTs
95fcc77752SPeter Mikus| | When Initialize layer driver | ${nic_driver}
96fcc77752SPeter Mikus| | And Initialize layer interface
97329e0aceSPeter Mikus| | ... | count=${nf_chains}
98533fcfe3SPeter Mikus| | And Start containers for test
99329e0aceSPeter Mikus| | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes} | auto_scale=${False}
10011bd03f2SPeter Mikus| | And Initialize L2 Bridge Domain for multiple pipelines with memif pairs
101329e0aceSPeter Mikus| | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes} | auto_scale=${False}
10211bd03f2SPeter Mikus| | Then Find NDR and PDR intervals using optimized search
10311bd03f2SPeter Mikus
10411bd03f2SPeter Mikus*** Test Cases ***
105780b65d8SPeter Mikus| tc01-64B-1c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
10611bd03f2SPeter Mikus| | [Tags] | 64B | 1C
1075e6145a4SVratko Polak| | frame_size=${64} | phy_cores=${1}
10811bd03f2SPeter Mikus
109780b65d8SPeter Mikus| tc02-64B-2c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
11011bd03f2SPeter Mikus| | [Tags] | 64B | 2C
1115e6145a4SVratko Polak| | frame_size=${64} | phy_cores=${2}
11211bd03f2SPeter Mikus
113780b65d8SPeter Mikus| tc03-64B-4c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
11411bd03f2SPeter Mikus| | [Tags] | 64B | 4C
1155e6145a4SVratko Polak| | frame_size=${64} | phy_cores=${4}
11611bd03f2SPeter Mikus
117780b65d8SPeter Mikus| tc04-1518B-1c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
11811bd03f2SPeter Mikus| | [Tags] | 1518B | 1C
1195e6145a4SVratko Polak| | frame_size=${1518} | phy_cores=${1}
12011bd03f2SPeter Mikus
121780b65d8SPeter Mikus| tc05-1518B-2c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
12211bd03f2SPeter Mikus| | [Tags] | 1518B | 2C
1235e6145a4SVratko Polak| | frame_size=${1518} | phy_cores=${2}
12411bd03f2SPeter Mikus
125780b65d8SPeter Mikus| tc06-1518B-4c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
12611bd03f2SPeter Mikus| | [Tags] | 1518B | 4C
1275e6145a4SVratko Polak| | frame_size=${1518} | phy_cores=${4}
12811bd03f2SPeter Mikus
129780b65d8SPeter Mikus| tc07-9000B-1c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
13011bd03f2SPeter Mikus| | [Tags] | 9000B | 1C
1315e6145a4SVratko Polak| | frame_size=${9000} | phy_cores=${1}
13211bd03f2SPeter Mikus
133780b65d8SPeter Mikus| tc08-9000B-2c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
13411bd03f2SPeter Mikus| | [Tags] | 9000B | 2C
1355e6145a4SVratko Polak| | frame_size=${9000} | phy_cores=${2}
13611bd03f2SPeter Mikus
137780b65d8SPeter Mikus| tc09-9000B-4c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
13811bd03f2SPeter Mikus| | [Tags] | 9000B | 4C
1395e6145a4SVratko Polak| | frame_size=${9000} | phy_cores=${4}
14011bd03f2SPeter Mikus
141780b65d8SPeter Mikus| tc10-IMIX-1c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
14211bd03f2SPeter Mikus| | [Tags] | IMIX | 1C
1435e6145a4SVratko Polak| | frame_size=IMIX_v4_1 | phy_cores=${1}
14411bd03f2SPeter Mikus
145780b65d8SPeter Mikus| tc11-IMIX-2c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
14611bd03f2SPeter Mikus| | [Tags] | IMIX | 2C
1475e6145a4SVratko Polak| | frame_size=IMIX_v4_1 | phy_cores=${2}
14811bd03f2SPeter Mikus
149780b65d8SPeter Mikus| tc12-IMIX-4c-eth-l2bd-4pl-8mif-16dcr1t-vppip4-ndrpdr
15011bd03f2SPeter Mikus| | [Tags] | IMIX | 4C
1515e6145a4SVratko Polak| | frame_size=IMIX_v4_1 | phy_cores=${4}
152