885fd16f127307e2f406e8551dd9b8c7546f14c2
[csit.git] / tests / vpp / device / container_memif / eth2p-ethipv6-ip6base-eth-2memif-1dcr-dev.robot
1 # Copyright (c) 2020 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_Virtual | 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 | memif_plugin.so
46 | ${crypto_type}= | ${None}
47 | ${nic_name}= | virtual
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 interfaces in path up
82 | | And Set up memif interfaces on DUT node
83 | | ... | ${dut1} | memif-DUT1_CNF | memif-DUT1_CNF
84 | | ... | memif_if1=memif_if1 | memif_if2=memif_if2
85 | | ... | rxq=${rxq_count_int} | txq=${rxq_count_int}
86 | | And Add Fib Table | ${dut1} | 20 | ipv6=${True}
87 | | And Assign Interface To Fib Table
88 | | ... | ${dut1} | ${memif_if2} | 20 | ipv6=${True}
89 | | And Assign Interface To Fib Table
90 | | ... | ${dut1} | ${DUT1_${int}2}[0] | 20 | ipv6=${True}
91 | | And VPP Interface Set IP Address
92 | | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:1::1 | 64
93 | | And VPP Interface Set IP Address
94 | | ... | ${dut1} | ${memif_if1} | 2001:2::1 | 64
95 | | And VPP Interface Set IP Address
96 | | ... | ${dut1} | ${memif_if2} | 2001:2::2 | 64
97 | | And VPP Interface Set IP Address
98 | | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:3::1 | 64
99 | | ${memif_if2_key}= | Get interface by sw index | ${nodes['DUT1']}
100 | | ... | ${memif_if2}
101 | | ${memif_if2_mac}= | Get interface MAC | ${nodes['DUT1']} | ${memif_if2_key}
102 | | And Vpp Route Add
103 | | ... | ${dut1} | 2001:3::0 | 64 | gateway=2001:2::2 | interface=${memif_if1}
104 | | And Vpp Route Add
105 | | ... | ${dut1} | 2001:1::0 | 64 | gateway=2001:2::2 | interface=${memif_if2}
106 | | ... | vrf=20
107 | | VPP Add IP Neighbor
108 | | ... | ${dut1} | ${memif_if1} | 2001:2::2 | ${memif_if2_mac}
109 | | VPP Add IP Neighbor
110 | | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:3::2 | ${TG_pf2_mac}[0]
111 | | Then Send packet and verify headers
112 | | ... | ${tg} | 2001:1::1 | 2001:3::2
113 | | ... | ${TG_pf1}[0] | ${TG_pf1_mac}[0] | ${DUT1_vf1_mac}[0]
114 | | ... | ${TG_pf2}[0] | ${DUT1_vf2_mac}[0] | ${TG_pf2_mac}[0]
115
116 *** Test Cases ***
117 | tc01-78B-ethipv6-ip6base-eth-2memif-1dcr-dev
118 | | [Tags] | 78B
119 | | frame_size=${78} | phy_cores=${0}