bee7330174386183e5135425b6432e8a7f242e95
[csit.git] / tests / vpp / device / l2bd / eth2p-avf-dot1q-l2bdbasemaclrn-gbp-dev.robot
1 # Copyright (c) 2020 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/shared/default.robot
16 |
17 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY
18 | ... | NIC_Virtual | DOT1Q | L2BDMACLRN | BASE | DRV_AVF | GBP
19 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
20 | ... | avf-dot1q-l2bdbasemaclrn-gbp
21 |
22 | Suite Setup | Setup suite topology interfaces | scapy
23 | Suite Teardown | Tear down suite
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | packet_trace
26 |
27 | Test Template | Local template
28 |
29 | Documentation | *L2BD with IEEE 802.1Q and GBP test cases*
30 |
31 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
32 | ... | with single links between nodes.
33 | ... | *[Enc] Packet Encapsulations:* Dot1q-IPv4 for L2 switching of IPv4. \
34 | ... | IEEE 802.1Q tagging is applied on both links TG-DUT1 .
35 | ... | *[Cfg] DUT configuration:* DUT1 is configured with:\
36 | ... | 2 VLAN subinterfaces (VID 200 and 300),\
37 | ... | 1 L2 BD with the 2 VLAN subinterfaces and a BVI,\
38 | ... | 1 GBP L3 RD,\
39 | ... | 1 GBP L2 BD with the L2 BD,\
40 | ... | 1 GBP EPG EPG-1 with sclass 100, the GBP L2 BD and L3 RD,\
41 | ... | 2 GBP external EP in EPG-1,\
42 | ... | 2 external subnets with sclass 200 and 300,\
43 | ... | Contracts allowing full communications between the 2 external subnets.\
44 | ... | DUT1 tested with ${nic_name} with VF enabled.
45 | ... | *[Ver] TG verification:* Test IPv4 packets are sent in one direction \
46 | ... | by TG on link to DUT1; on receive TG verifies packets for correctness \
47 | ... | and drops as applicable.
48 | ... | *[Ref] Applicable standard specifications:* IEEE 802.1q.
49
50 *** Variables ***
51 | @{plugins_to_enable}= | avf_plugin.so | gbp_plugin.so | acl_plugin.so
52 | ${crypto_type}= | ${None}
53 | ${nic_name}= | virtual
54 | ${nic_driver}= | avf
55 | ${nic_rxq_size}= | 0
56 | ${nic_txq_size}= | 0
57 | ${nic_pfs}= | 2
58 | ${nic_vfs}= | 1
59 | ${overhead}= | ${4}
60
61 *** Keywords ***
62 | Local template
63 | | [Documentation]
64 | | ... | [Ver] Make TG send IPv4 packet in one direction between two\
65 | | ... | of its interfaces to be switched by DUT to and from docker.\
66 | | ... | Make TG verify IPv4 packet is correct.
67 | |
68 | | ... | *Arguments:*
69 | | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1).
70 | | ... | Type: integer, string
71 | | ... | - phy_cores - Number of physical cores. Type: integer
72 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
73 | |
74 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
75 | |
76 | | Set Test Variable | \${frame_size}
77 | |
78 | | Given Set Max Rate And Jumbo
79 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
80 | | And Pre-initialize layer driver | ${nic_driver}
81 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
82 | | When Initialize layer driver | ${nic_driver}
83 | | And Initialize layer interface
84 | | And Initialize layer dot1q
85 | | And Initialize GBP routing domains
86 | | Then Send packet and verify headers
87 | | ... | ${tg} | 10.10.10.2 | 20.20.20.2
88 | | ... | ${TG_pf1}[0] | ${TG_pf1_mac}[0] | ba:dc:00:ff:ee:01
89 | | ... | ${TG_pf2}[0] | ba:dc:00:ff:ee:01 | ${TG_pf2_mac}[0]
90 | | ... | traffic_script=send_ip_check_headers
91
92 *** Test Cases ***
93 | tc01-64B-avf-dot1q-l2bdbasemaclrn-gbp-dev
94 | | [Tags] | 64B | 1C
95 | | frame_size=${64} | phy_cores=${0}