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