vpp_device: Multiple NICs (infra)
[csit.git] / tests / vpp / device / container_memif / eth2p-ethipv6-ip6base-eth-2memif-1dcr-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 | IP6FWD | BASE | MEMIF | DOCKER | DRV_VFIO_PCI
19 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
20 | ... | ethipv6-ip6base-eth-2memif-1dcr
21 |
22 | Suite Setup | Setup suite topology interfaces | scapy
23 | Test Setup | Setup test
24 | Test Teardown | Tear down test | packet_trace | container
25 |
26 | Test Template | Local Template
27 |
28 | Documentation | *IPv4 routing test cases with memif interface*
29 |
30 | ... | *[Top] Network Topologies:* TG-DUT1-TG 2-node circular topology with \
31 | ... | single links between nodes.
32 | ... | *[Enc] Packet Encapsulations:* Eth-IPv6 for IPv6 routing on \
33 | ... | both links.
34 | ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv6 routing and \
35 | ... | two static IPv6 /64 route entries. Container is connected to VPP via \
36 | ... | Memif interface. Container is running same VPP version as running on \
37 | ... | DUT.
38 | ... | *[Ver] TG verification:* Test IPv6 packets are sent in one direction \
39 | ... | by TG on links to DUT1 and via container; on receive TG verifies \
40 | ... | packets for correctness and their IPv6 src-addr, dst-addr and \
41 | ... | MAC addresses.
42 | ... | *[Ref] Applicable standard specifications:* RFC791, RFC826, RFC792
43
44 *** Variables ***
45 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so | memif_plugin.so
46 | ${crypto_type}= | ${None}
47 | ${nic_name}= | Intel-X710
48 | ${nic_driver}= | vfio-pci
49 | ${nic_rxq_size}= | 0
50 | ${nic_txq_size}= | 0
51 | ${nic_pfs}= | 2
52 | ${nic_vfs}= | 0
53 | ${overhead}= | ${0}
54 # Container
55 | ${container_engine}= | Docker
56 | ${container_chain_topology}= | chain_functional
57
58 *** Keywords ***
59 | Local Template
60 | | [Documentation]
61 | | ... | [Ver] Make TG send IPv6 packets in both directions between two\
62 | | ... | of its interfaces to be routed by DUT to and from docker; verify\
63 | | ... | all packets are received.
64 | |
65 | | ... | *Arguments:*
66 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
67 | | ... | - phy_cores - Number of physical cores. Type: integer
68 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
69 | |
70 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
71 | |
72 | | Set Test Variable | \${frame_size}
73 | |
74 | | Given Set Max Rate And Jumbo
75 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
76 | | And Pre-initialize layer driver | ${nic_driver}
77 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
78 | | When Initialize layer driver | ${nic_driver}
79 | | And Initialize layer interface
80 | | And Start containers for test | auto_scale=${False} | pinning=${False}
81 | | And Set up memif interfaces on DUT node
82 | | ... | ${dut1} | memif-DUT1_CNF | memif-DUT1_CNF
83 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2
84 | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
85 | | # It takes some time for memifs to go up.
86 | | And Set interfaces in path up
87 | | And Add Fib Table | ${dut1} | 20 | ipv6=${True}
88 | | And Assign Interface To Fib Table
89 | | ... | ${dut1} | ${memif_if2} | 20 | ipv6=${True}
90 | | And Assign Interface To Fib Table
91 | | ... | ${dut1} | ${DUT1_${int}2}[0] | 20 | ipv6=${True}
92 | | And VPP Interface Set IP Address
93 | | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:1::1 | 64
94 | | And VPP Interface Set IP Address
95 | | ... | ${dut1} | ${memif_if1} | 2001:2::1 | 64
96 | | And VPP Interface Set IP Address
97 | | ... | ${dut1} | ${memif_if2} | 2001:2::2 | 64
98 | | And VPP Interface Set IP Address
99 | | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:3::1 | 64
100 | | ${memif_if2_key}= | Get interface by sw index | ${nodes['DUT1']}
101 | | ... | ${memif_if2}
102 | | ${memif_if2_mac}= | Get interface MAC | ${nodes['DUT1']} | ${memif_if2_key}
103 | | And Vpp Route Add
104 | | ... | ${dut1} | 2001:3::0 | 64 | gateway=2001:2::2 | interface=${memif_if1}
105 | | And Vpp Route Add
106 | | ... | ${dut1} | 2001:1::0 | 64 | gateway=2001:2::2 | interface=${memif_if2}
107 | | ... | vrf=20
108 | | VPP Add IP Neighbor
109 | | ... | ${dut1} | ${memif_if1} | 2001:2::2 | ${memif_if2_mac}
110 | | VPP Add IP Neighbor
111 | | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:3::2 | ${TG_pf2_mac}[0]
112 | | Then Send packet and verify headers
113 | | ... | ${tg} | 2001:1::1 | 2001:3::2
114 | | ... | ${TG_pf1}[0] | ${TG_pf1_mac}[0] | ${DUT1_vf1_mac}[0]
115 | | ... | ${TG_pf2}[0] | ${DUT1_vf2_mac}[0] | ${TG_pf2_mac}[0]
116
117 *** Test Cases ***
118 | 78B-ethipv6-ip6base-eth-2memif-1dcr-dev
119 | | [Tags] | 78B
120 | | frame_size=${78} | phy_cores=${0}