01e2cf89badfd0003794d43030bd4a19564e6762
[csit.git] / tests / vpp / device / l2bd / eth2p-avf-dot1q-l2bdbasemaclrn-gbp-dev.robot
1 # Copyright (c) 2019 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 |
20 | Suite Setup | Setup suite single link | avf | scapy
21 | Suite Teardown | Tear down suite
22 | Test Setup | Setup test
23 | Test Teardown | Tear down test | packet_trace
24 |
25 | Test Template | Local template
26 |
27 | Documentation | *L2BD with IEEE 802.1Q and GBP test cases*
28 |
29 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
30 | ... | with single links between nodes.
31 | ... | *[Enc] Packet Encapsulations:* Dot1q-IPv4 for L2 switching of IPv4. \
32 | ... | IEEE 802.1Q tagging is applied on both links TG-DUT1 .
33 | ... | *[Cfg] DUT configuration:* DUT1 is configured with:\
34 | ... | 2 VLAN subinterfaces (VID 200 and 300),\
35 | ... | 1 L2 BD with the 2 VLAN subinterfaces and a BVI,\
36 | ... | 1 GBP L3 RD,\
37 | ... | 1 GBP L2 BD with the L2 BD,\
38 | ... | 1 GBP EPG EPG-1 with sclass 100, the GBP L2 BD and L3 RD,\
39 | ... | 2 GBP external EP in EPG-1,\
40 | ... | 2 external subnets with sclass 200 and 300,\
41 | ... | Contracts allowing full communications between the 2 external subnets.\
42 | ... | DUT1 tested with ${nic_name} with VF enabled.
43 | ... | *[Ver] TG verification:* Test IPv4 packets are sent in one direction \
44 | ... | by TG on link to DUT1; on receive TG verifies packets for correctness \
45 | ... | and drops as applicable.
46 | ... | *[Ref] Applicable standard specifications:* IEEE 802.1q.
47
48 *** Variables ***
49 | @{plugins_to_enable}= | avf_plugin.so | gbp_plugin.so | acl_plugin.so
50 | ${crypto_type}= | ${None}
51 | ${nic_name}= | virtual
52 | ${nic_driver}= | avf
53 | ${overhead}= | ${4}
54
55 *** Keywords ***
56 | Local template
57 | | [Documentation]
58 | | ... | [Ver] Make TG send IPv4 packet in one direction between two\
59 | | ... | of its interfaces to be switched by DUT to and from docker.\
60 | | ... | Make TG verify IPv4 packet is correct.
61 | |
62 | | ... | *Arguments:*
63 | | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1).
64 | | ... | Type: integer, string
65 | | ... | - phy_cores - Number of physical cores. Type: integer
66 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
67 | |
68 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
69 | |
70 | | Set Test Variable | \${frame_size}
71 | |
72 | | Given Set Max Rate And Jumbo
73 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
74 | | And Pre-initialize layer driver | ${nic_driver}
75 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
76 | | When Initialize layer driver | ${nic_driver}
77 | | And Initialize layer interface
78 | | And Initialize layer dot1q
79 | | And Initialize GBP routing domains
80 | | Then Send packet and verify headers
81 | | ... | ${tg} | 10.10.10.2 | 20.20.20.2
82 | | ... | ${tg_if1} | ${tg_if1_mac} | ba:dc:00:ff:ee:01
83 | | ... | ${tg_if2} | ba:dc:00:ff:ee:01 | ${tg_if2_mac}
84 | | ... | traffic_script=send_ip_check_headers
85
86 *** Test Cases ***
87 | tc01-64B-avf-dot1q-l2bdbasemaclrn-gbp-dev
88 | | [Tags] | 64B | 1C
89 | | frame_size=${64} | phy_cores=${0}