doc: fixing documentation structure
[csit.git] / tests / vpp / device / l2bd / 2n1l-10ge2p1x710-ethip4-l2bdbasemaclrn-oacl1sf-scapy.robot
1 # Copyright (c) 2021 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_Intel-X710 | ETH | L2BDMACLRN | FEATURE | ACL | ACL_STATEFUL
19 | ... | OACL | ACL1 | DRV_VFIO_PCI
20 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
21 | ... | ethip4-l2bdbasemaclrn-oacl1sf
22 |
23 | Suite Setup | Setup suite topology interfaces | scapy
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | packet_trace | telemetry | acl
26 |
27 | Test Template | Local Template
28 |
29 | Documentation | **L2BD test cases with ACL**
30 | ... |
31 | ... | - **[Top] Network Topologies:** TG-DUT1-TG 2-node circular topology \
32 | ... | with single links between nodes.
33 | ... |
34 | ... | - **[Enc] Packet Encapsulations:** Eth-IPv4 on all links.
35 | ... |
36 | ... | - **[Cfg] DUT configuration:** DUT1 is configured with L2 bridge \
37 | ... | domain and MAC learning enabled.Required ACL rules are applied to \
38 | ... | input paths of both DUT1 intefaces.
39 | ... |
40 | ... | - **[Ver] TG verification:** Test IPv4 packets are sent in one \
41 | ... | direction by TG on link to DUT1; on receive TG verifies packets for \
42 | ... | correctness and drops as applicable.
43 | ... |
44 | ... | - **[Ref] Applicable standard specifications:**
45
46 *** Variables ***
47 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so | acl_plugin.so
48 | ${crypto_type}= | ${None}
49 | ${nic_name}= | Intel-X710
50 | ${nic_driver}= | vfio-pci
51 | ${nic_rxq_size}= | 0
52 | ${nic_txq_size}= | 0
53 | ${nic_pfs}= | 2
54 | ${nic_vfs}= | 0
55 | ${overhead}= | ${0}
56 # ACL test setup
57 | ${acl_action}= | permit+reflect
58 | ${acl_apply_type}= | output
59 | ${no_hit_aces_number}= | 1
60 # starting points for non-hitting ACLs
61 | ${src_ip_start}= | 30.30.30.1
62 | ${dst_ip_start}= | 40.40.40.1
63 | ${ip_step}= | ${1}
64 | ${sport_start}= | ${1000}
65 | ${dport_start}= | ${1000}
66 | ${port_step}= | ${1}
67 | ${trex_stream1_subnet}= | 10.10.10.0/24
68 | ${trex_stream2_subnet}= | 20.20.20.0/24
69 # Telemetry
70 | ${telemetry_profile}= | vpp_test_teardown
71
72 *** Keywords ***
73 | Local Template
74 | | [Documentation]
75 | | ... | - **[Cfg]** DUT runs L2BD config with ACLs.
76 | | ... | - **[Ver]** Make TG send IPv4 packet in one direction between two \
77 | | ... | of its interfaces to be switched by DUT to and from docker. \
78 | | ... | Make TG verify IPv4 packet is correct.
79 | |
80 | | ... | *Arguments:*
81 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
82 | | ... | - phy_cores - Number of physical cores. Type: integer
83 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
84 | |
85 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
86 | |
87 | | Set Test Variable | \${frame_size}
88 | |
89 | | Given Set Max Rate And Jumbo
90 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
91 | | And Pre-initialize layer driver | ${nic_driver}
92 | | And Apply Startup configuration on all VPP DUTs | with_trace=${True}
93 | | When Initialize layer driver | ${nic_driver}
94 | | And Initialize layer interface
95 | | And Initialize L2 bridge domain with IPv4 ACLs in circular topology
96 | | Then Send packet and verify headers
97 | | ... | ${tg} | 10.10.10.2 | 20.20.20.2
98 | | ... | ${TG_pf1}[0] | ${TG_pf1_mac}[0] | ${TG_pf2_mac}[0]
99 | | ... | ${TG_pf2}[0] | ${TG_pf1_mac}[0] | ${TG_pf2_mac}[0]
100
101 *** Test Cases ***
102 | 64B-0c-ethip4-l2bdbasemaclrn-oacl1sf-scapy
103 | | [Tags] | 64B | 0C
104 | | frame_size=${64} | phy_cores=${0}