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