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