feat(telemetry): Rework
[csit.git] / tests / vpp / device / vm_vhost / ethip4 / 2n1l-10ge2p1x710-ethip4-l2bdbasemaclrn-eth-2vhost-1vm-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 | BASE | VHOST | 1VM
19 | ... | DRV_VFIO_PCI
20 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
21 | ... | ethip4-l2bdbasemaclrn-eth-2vhost-1vm
22 |
23 | Suite Setup | Setup suite topology interfaces | scapy
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | packet_trace | telemetry | vhost
26 |
27 | Test Template | Local Template
28 |
29 | Documentation | **L2 bridge-domain test cases with vhost user interface**
30 | ... |
31 | ... | - **[Top] Network Topologies:** TG-DUT1-TG 2-node circular topology \
32 | ... | with VM and single links between nodes.
33 | ... |
34 | ... | - **[Enc] Packet Encapsulations:** Eth-IPv4 for L2 switching of IPv4.
35 | ... |
36 | ... | - **[Cfg] DUT configuration:** DUT1 is configured with two L2 \
37 | ... | bridge-domains (L2BD) switching combined with MAC learning enabled. \
38 | ... | Qemu Guest is connected to VPP via vhost-user interfaces. Guest is \
39 | ... | configured with VPP l2 cross-connect interconnecting vhost-user \
40 | ... | interfaces.
41 | ... |
42 | ... | - **[Ver] TG verification:** Test IPv4 packets with IP protocol=61 are \
43 | ... | sent in both directions by TG on links to DUT1 via VM; on receive TG. \
44 | ... | verifies packets for correctness and their IPv4 src-addr, dst-addr \
45 | ... | and MAC addresses.
46 | ... |
47 | ... | - **[Ref] Applicable standard specifications:** RFC792
48
49 *** Variables ***
50 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so
51 | ${crypto_type}= | ${None}
52 | ${nic_name}= | Intel-X710
53 | ${nic_driver}= | vfio-pci
54 | ${nic_rxq_size}= | 0
55 | ${nic_txq_size}= | 0
56 | ${nic_pfs}= | 2
57 | ${nic_vfs}= | 0
58 | ${overhead}= | ${0}
59 | ${nf_chains}= | ${1}
60 | ${nf_nodes}= | ${1}
61 | ${nf_dtc} | ${1}
62 | ${nf_dtcr} | ${1}
63 # Telemetry
64 | ${telemetry_profile}= | vppctl_test_teardown
65
66 *** Keywords ***
67 | Local Template
68 | | [Documentation]
69 | | ... | - **[Top]** TG=DUT=VM.
70 | | ... | - **[Enc]** Eth-IPv4.
71 | | ... | - **[Cfg]** On DUT1 configure \
72 | | ... | two L2BDs with MAC learning, each with vhost-user i/f to local \
73 | | ... | VM and i/f to TG; configure VPP in VM to loop pkts back betwen its \
74 | | ... | two virtio i/fs.
75 | | ... | - **[Ver]** Make TG verify IPv4 packets are switched \
76 | | ... | thru DUT1 and VM in both directions and are correct on receive.
77 | |
78 | | ... | *Arguments:*
79 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
80 | | ... | - phy_cores - Number of physical cores. Type: integer
81 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
82 | |
83 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
84 | |
85 | | Set Test Variable | \${frame_size}
86 | |
87 | | Given Set Max Rate And Jumbo
88 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
89 | | And Pre-initialize layer driver | ${nic_driver}
90 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
91 | | When Initialize layer driver | ${nic_driver}
92 | | And Initialize layer interface
93 | | ... | count=${nf_chains}
94 | | And Initialize L2 bridge domains with Vhost-User | nf_nodes=${nf_nodes}
95 | | And Configure chains of NFs connected via vhost-user
96 | | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes}
97 | | ... | vnf=vppl2xc_2vhostvr1024 | pinning=${False}
98 | | Then Send IPv4 bidirectionally and verify received packets | ${tg}
99 | | ... | ${TG_pf1}[0] | ${TG_pf2}[0]
100
101 *** Test Cases ***
102 | 64B-0c-ethip4-l2bdbasemaclrn-eth-2vhost-1vm-scapy
103 | | [Tags] | 64B | 0C
104 | | frame_size=${64} | phy_cores=${0}