vpp_device: Multiple NICs (suitegen)
[csit.git] / tests / vpp / device / ip4_tunnels / 2n1l-10ge2p1x710-ethip4--ethip4udpgeneve-1tun-ip4base-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 | Resource | resources/libraries/robot/ip/geneve.robot
17 | Resource | resources/libraries/robot/shared/traffic.robot
18 |
19 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY
20 | ... | NIC_Intel-X710 | ETH | IP4FWD | IP4BASE | UDP | ENCAP | GENEVE
21 | ... | GENEVE_L3MODE | GENEVE4_1TUN | DRV_VFIO_PCI
22 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
23 | ... | ethip4--ethip4udpgeneve-1tun-ip4base
24 |
25 | Suite Setup | Setup suite topology interfaces | scapy
26 | Test Setup | Setup test
27 | Test Teardown | Tear down test | packet_trace | geneve4
28 |
29 | Test Template | Local Template
30 |
31 | Documentation | *L2BD with GENEVE L3 mode test cases*
32 |
33 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology\
34 | ... | with single links between nodes.
35 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 between TG-if1 and DUT1-if1 and\
36 | ... | Eth-IPv4-UDP-GENEVE-Eth-IPv4 between DUT1-if2 and TG-if2 for IPv4\
37 | ... | routing over GENEVE tunnel.
38 | ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing over\
39 | ... | GENEVE tunnel and 4 static IPv4 /24 route entries.\
40 | ... | DUT1 is tested with ${nic_name}.
41 | ... | *[Ver] TG verification:* Test Eth-IPv4 packet is sent by TG-if1 on link\
42 | ... | to DUT1-if1; on receive by TG-if2 the encapsulated packet is verified\
43 | ... | for correctness and its outer and inner IPv4 and MAC addresses, UDP\
44 | ... | ports and GENEVE vni and protocol number. Then test\
45 | ... | Eth-IPv4-UDP-GENEVE-Eth-IPv4 packet is sent by TG-if2 on link to\
46 | ... | DUT1-if2; on receive by TG-if1 decapsulated packet is verified for\
47 | ... | correctness and its IPv4 and MAC addresses
48 | ... | *[Ref] Applicable standard specifications:* RFC791, RFC768, RFC8926.
49
50 *** Variables ***
51 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so | geneve_plugin.so
52 | ${crypto_type}= | ${None}
53 | ${nic_name}= | Intel-X710
54 | ${nic_driver}= | vfio-pci
55 | ${nic_rxq_size}= | 0
56 | ${nic_txq_size}= | 0
57 | ${nic_pfs}= | 2
58 | ${nic_vfs}= | 0
59 | ${overhead}= | ${0}
60 # IP settings
61 | ${dut1_if1_ip4}= | 20.0.0.1
62 | ${dut1_if2_ip4}= | 30.0.0.1
63 | ${tg_if1_ip4}= | 20.0.0.2
64 | ${tg_if2_ip4}= | 30.0.0.2
65 # GENEVE settings
66 | ${gen_mode}= | L3
67 | ${n_tunnels}= | ${1}
68 | &{gen_tunnel}=
69 | ... | local=1.1.1.2 | remote=1.1.1.1 | vni=${1}
70 | ... | src_ip=10.128.1.0 | dst_ip=10.0.1.0 | ip_mask=${24} | if_ip=11.0.1.2
71
72 *** Keywords ***
73 | Local Template
74 | |
75 | | [Documentation]
76 | | ... | [Cfg] DUT runs GENEVE ${gen_mode} mode configuration.
77 | | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads.
78 | | ... | [Ver] Measure NDR and PDR values using MLRsearch algorithm.\
79 | |
80 | | ... | *Arguments:*
81 | | ... | - frame_size - Framesize in Bytes in integer or string (IMIX_v4_1).
82 | | ... | Type: integer, string
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 GENEVE L3 mode in circular topology
97 | | Then Send IP packet and verify GENEVE encapsulation in received packets
98 | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0]
99 | | ... | ${DUT1_vf1_mac}[0] | ${DUT1_vf2_mac}[0]
100 | | ... | ${gen_tunnel}[local] | ${gen_tunnel}[remote] | ${gen_tunnel}[vni]
101 | | ... | ${gen_tunnel}[src_ip] | ${gen_tunnel}[dst_ip]
102 | | And Show Geneve Tunnel Data | ${nodes['DUT1']}
103
104 *** Test Cases ***
105 | 64B-0c-ethip4--ethip4udpgeneve-1tun-ip4base-scapy
106 | | [Tags] | 64B | 0C
107 | | frame_size=${64} | phy_cores=${0}