7452d2aacc1af1c669bc2288adb0209cb9c42d1a
[csit.git] / tests / vpp / device / l2bd / eth2p-ethipv4-l2bdbasemaclrn-macip-iacl1sl-dev.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 | MACIP | ACL_STATELESS
19 | ... | IACL | ACL1 | DRV_VFIO_PCI
20 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
21 | ... | ethipv4-l2bdmaclrn-macip-iacl1sl
22 |
23 | Suite Setup | Setup suite topology interfaces | scapy
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | macipacl | 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 MACIP 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 | ${no_hit_aces_number}= | 1
55 # starting points for non-hitting ACLs
56 | ${src_ip_start}= | 30.30.30.1
57 | ${ip_step}= | ${1}
58 | ${src_mac_start}= | 01:02:03:04:05:06
59 | ${src_mac_step}= | ${1000}
60 | ${src_mac_mask}= | 00:00:00:00:00:00
61 | ${tg_stream1_mac}= | ca:fe:00:00:00:00
62 | ${tg_stream2_mac}= | fa:ce:00:00:00:00
63 | ${tg_mac_mask}= | ff:ff:ff:ff:c0:00
64 | ${tg_stream1_subnet}= | 10.0.0.0/18
65 | ${tg_stream2_subnet}= | 20.0.0.0/18
66
67 *** Keywords ***
68 | Local Template
69 | | [Documentation]
70 | | ... | [Cfg] DUT runs L2BD config with ACLs.
71 | | ... | [Ver] Make TG send IPv4 packet in one direction between two\
72 | | ... | of its interfaces to be switched by DUT to and from docker.\
73 | | ... | Make TG verify IPv4 packet is correct.
74 | |
75 | | ... | *Arguments:*
76 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
77 | | ... | - phy_cores - Number of physical cores. Type: integer
78 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
79 | |
80 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
81 | |
82 | | Set Test Variable | \${frame_size}
83 | |
84 | | Given Set Max Rate And Jumbo
85 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
86 | | And Pre-initialize layer driver | ${nic_driver}
87 | | And Apply Startup configuration on all VPP DUTs | with_trace=${True}
88 | | When Initialize layer driver | ${nic_driver}
89 | | And Initialize layer interface
90 | | And Initialize L2 bridge domain with MACIP ACLs in circular topology
91 | | Then Send packet and verify headers
92 | | ... | ${tg} | 10.0.0.2 | 20.0.0.2
93 | | ... | ${TG_pf1}[0] | ${tg_stream1_mac} | ${tg_stream2_mac}
94 | | ... | ${TG_pf2}[0] | ${tg_stream1_mac} | ${tg_stream2_mac}
95
96 *** Test Cases ***
97 | 64B-ethipv4-l2bdbasemaclrn-iacl1sl-dev
98 | | [Tags] | 64B
99 | | frame_size=${64} | phy_cores=${0}