f0f90ec8c1f28a333d82628702c764a5797a084e
[csit.git] / tests / vpp / device / srv6 / eth2p-ethip6ip6-ip6base-srv6enc1sid-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_Virtual | ETH | IP6FWD | FEATURE | SRv6 | SRv6_1SID | DRV_VFIO_PCI
19 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
20 | ... | ethip6ip6-ip6base-srv6enc1sid
21 |
22 | Suite Setup | Setup suite topology interfaces | scapy
23 | Test Setup | Setup test
24 | Test Teardown | Tear down test | packet_trace
25 |
26 | Test Template | Local Template
27 |
28 | Documentation | *Segment routing over IPv6 dataplane with one SID\
29 | ... | (SRH not inserted) test suite.*
30 |
31 | ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\
32 | ... | between nodes.
33 | ... | *[Cfg] DUT configuration:* On DUT1 configure physical interface IPv6\
34 | ... | addresses, static ARP record, route and IPv6 forwarding over SRv6\
35 | ... | with one SID - Segment Routing Header not inserted.
36 | ... | *[Ver] TG verification:* ETH-IP6 packet is sent from TG to DUT1 in one\
37 | ... | direction. Packet is received and verified for correctness on TG. Then\
38 | ... | ETH-IP6-IP6 packet is sent from TG in opposite direction. Packet is\
39 | ... | received and verified for correctness on TG.
40 | ... | *[Ref] Applicable standard specifications:* SRv6 Network Programming -\
41 | ... | draft 3.
42
43 *** Variables ***
44 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so
45 | ${crypto_type}= | ${None}
46 | ${nic_name}= | virtual
47 | ${nic_driver}= | vfio-pci
48 | ${nic_rxq_size}= | 0
49 | ${nic_txq_size}= | 0
50 | ${nic_pfs}= | 2
51 | ${nic_vfs}= | 0
52 | ${overhead}= | ${40}
53 # SIDs
54 | ${dut1_sid1}= | 2002:1::
55 | ${dut1_sid2}= | 2003:2::
56 | ${dut1_bsid}= | 2002:1::1
57 | ${dut2_sid1}= | 2002:2::
58 | ${dut2_sid2}= | 2003:1::
59 | ${sid_prefix}= | ${64}
60 # IP settings
61 | ${tg_if1_ip6_subnet}= | 2001:1::
62 | ${tg_if2_ip6_subnet}= | 2001:2::
63 | ${dst_addr_nr}= | ${1}
64 | ${dut1_if1_ip6}= | 2001:1::1
65 | ${dut1_if2_ip6}= | 2001:3::1
66 | ${dut2_if1_ip6}= | 2001:3::2
67 | ${dut2_if2_ip6}= | 2001:2::1
68 | ${prefix}= | ${64}
69
70 *** Keywords ***
71 | Local Template
72 | | [Documentation]
73 | | ... | [Cfg] DUT1 is configured with IPv6 routing and static route,\
74 | | ... | SR policy and steering policy for one direction and one SR\
75 | | ... | behaviour (function) - End.DX6 - for other direction.
76 | | ... | [Ver] Make TG send IPv6 packets routed over DUT1 interfaces.\
77 | | ... | Make TG verify IPv6 packets are correct.
78 | |
79 | | ... | *Arguments:*
80 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
81 | | ... | - phy_cores - Number of physical cores. Type: integer
82 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
83 | |
84 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
85 | |
86 | | Set Test Variable | \${frame_size}
87 | |
88 | | Given Set Max Rate And Jumbo
89 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
90 | | And Pre-initialize layer driver | ${nic_driver}
91 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
92 | | When Initialize layer driver | ${nic_driver}
93 | | And Initialize layer interface
94 | | And Initialize SRv6 encapsulation with '1' x SID 'with' decapsulation
95 | | Then Send IPv6 Packet and verify SRv6 encapsulation in received packet
96 | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0] | ${DUT1_${int}1_mac}[0]
97 | | ... | ${DUT1_${int}2_mac}[0] | ${tg_if1_ip6_subnet}2 | ${tg_if2_ip6_subnet}2
98 | | ... | ${dut1_sid1} | ${dut1_sid2} | ${dut2_sid2} | ${dut2_sid1}
99
100 *** Test Cases ***
101 | 78B-ethip6ip6-ip6base-srv6enc1sid-dev
102 | | [Tags] | 78B
103 | | frame_size=${78} | phy_cores=${0}