2e7f20988846bee8015d08d47aa597673f309674
[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 single link | avf | 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 | ${overhead}= | ${4}
58
59 *** Keywords ***
60 | Local template
61 | | [Documentation]
62 | | ... | [Ver] Make TG send IPv4 packet in one direction between two\
63 | | ... | of its interfaces to be switched by DUT to and from docker.\
64 | | ... | Make TG verify IPv4 packet is correct.
65 | |
66 | | ... | *Arguments:*
67 | | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1).
68 | | ... | Type: integer, string
69 | | ... | - phy_cores - Number of physical cores. Type: integer
70 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
71 | |
72 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
73 | |
74 | | Set Test Variable | \${frame_size}
75 | |
76 | | Given Set Max Rate And Jumbo
77 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
78 | | And Pre-initialize layer driver | ${nic_driver}
79 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
80 | | When Initialize layer driver | ${nic_driver}
81 | | And Initialize layer interface
82 | | And Initialize layer dot1q
83 | | And Initialize GBP routing domains
84 | | Then Send packet and verify headers
85 | | ... | ${tg} | 10.10.10.2 | 20.20.20.2
86 | | ... | ${tg_if1} | ${tg_if1_mac} | ba:dc:00:ff:ee:01
87 | | ... | ${tg_if2} | ba:dc:00:ff:ee:01 | ${tg_if2_mac}
88 | | ... | traffic_script=send_ip_check_headers
89
90 *** Test Cases ***
91 | tc01-64B-avf-dot1q-l2bdbasemaclrn-gbp-dev
92 | | [Tags] | 64B | 1C
93 | | frame_size=${64} | phy_cores=${0}