doc: fixing documentation structure
[csit.git] / tests / vpp / device / srv6 / 2n1l-10ge2p1x710-ethip6srhip6-ip6base-srv6enc2sids-nodecaps-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 |
17 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY
18 | ... | NIC_Intel-X710 | ETH | IP6FWD | FEATURE | SRv6 | SRv6_2SID_NODECAP
19 | ... | DRV_VFIO_PCI
20 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
21 | ... | ethip6srhip6-ip6base-srv6enc2sids-nodecaps
22 |
23 | Suite Setup | Setup suite topology interfaces | scapy
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | packet_trace | telemetry
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 | ... |
35 | ... | - **[Cfg] DUT configuration:** On DUT1 configure physical interface \
36 | ... | IPv6 addresses, static ARP record, route and IPv6 forwarding over SRv6 \
37 | ... | with two SIDs - Segment Routing Header inserted.
38 | ... |
39 | ... | - **[Ver] TG verification:** ETH-IP6 packet is sent from TG to DUT1 in \
40 | ... | one direction. Packet is received and verified for correctness on TG. \
41 | ... | Then ETH-IP6-IP6 packet is sent from TG in opposite direction. Packet \
42 | ... | is received and verified for correctness on TG.
43 | ... |
44 | ... | - **[Ref] Applicable standard specifications:** SRv6 Network \
45 | ... | Programming - draft 3.
46
47 *** Variables ***
48 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so
49 | ${crypto_type}= | ${None}
50 | ${nic_name}= | Intel-X710
51 | ${nic_driver}= | vfio-pci
52 | ${nic_rxq_size}= | 0
53 | ${nic_txq_size}= | 0
54 | ${nic_pfs}= | 2
55 | ${nic_vfs}= | 0
56 | ${overhead}= | ${80}
57 # SIDs
58 | ${dut1_sid1}= | 2002:1::
59 | ${dut1_sid2_1}= | 2003:2::
60 | ${dut1_sid2_2}= | 2003:3::
61 | ${dut1_bsid}= | 2002:1::1
62 | ${dut2_sid1_1}= | 2002:2::
63 | ${dut2_sid1_2}= | 2002:3::
64 | ${dut2_sid2}= | 2003:1::
65 | ${sid_prefix}= | ${64}
66 # IP settings
67 | ${tg_if1_ip6_subnet}= | 2001:1::
68 | ${tg_if2_ip6_subnet}= | 2001:2::
69 | ${dst_addr_nr}= | ${1}
70 | ${dut1_if1_ip6}= | 2001:1::1
71 | ${dut1_if2_ip6}= | 2001:3::1
72 | ${dut2_if1_ip6}= | 2001:3::2
73 | ${dut2_if2_ip6}= | 2001:2::1
74 | ${prefix}= | ${64}
75 # Telemetry
76 | ${telemetry_profile}= | vpp_test_teardown
77
78 *** Keywords ***
79 | Local Template
80 | | [Documentation]
81 | | ... | - **[Cfg]** DUT1 is configured with IPv6 routing and static route, \
82 | | ... | SR policy and steering policy for one direction and one SR \
83 | | ... | behaviour (function) - End - for other direction.
84 | | ... | - **[Ver]** Make TG send IPv6 packets routed over DUT1 interfaces. \
85 | | ... | Make TG verify IPv6 packets are correct.
86 | |
87 | | ... | *Arguments:*
88 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
89 | | ... | - phy_cores - Number of physical cores. Type: integer
90 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
91 | |
92 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
93 | |
94 | | Set Test Variable | \${frame_size}
95 | |
96 | | Given Set Max Rate And Jumbo
97 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
98 | | And Pre-initialize layer driver | ${nic_driver}
99 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
100 | | When Initialize layer driver | ${nic_driver}
101 | | And Initialize layer interface
102 | | And Initialize SRv6 encapsulation with '2' x SID 'without' decapsulation
103 | | Then Send IPv6 Packet and verify SRv6 encapsulation in received packet
104 | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0] | ${DUT1_${int}1_mac}[0]
105 | | ... | ${DUT1_${int}2_mac}[0] | ${tg_if1_ip6_subnet}2 | ${tg_if2_ip6_subnet}2
106 | | ... | ${dut1_sid1} | ${dut1_sid2_1} | ${dut2_sid2} | ${dut2_sid1_1}
107 | | ... | ${dut1_sid2_2} | ${dut2_sid1_2} | decap=${False}
108
109 *** Test Cases ***
110 | 78B-0c-ethip6srhip6-ip6base-srv6enc2sids-nodecaps-scapy
111 | | [Tags] | 78B | 0C
112 | | frame_size=${78} | phy_cores=${0}