433266e1f3f68bea0a45a6a814f2d0d497b54ab9
[csit.git] / tests / vpp / device / srv6 / 2n1l-10ge2p1x710-ethip6ip6-ip6base-srv6enc1sid-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_1SID
19 | ... | DRV_VFIO_PCI | 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 | telemetry
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 | ... |
34 | ... | - **[Cfg] DUT configuration:** On DUT1 configure physical interface \
35 | ... | IPv6 addresses, static ARP record, route and IPv6 forwarding over SRv6 \
36 | ... | with one SID - Segment Routing Header not inserted.
37 | ... |
38 | ... | - **[Ver] TG verification:** ETH-IP6 packet is sent from TG to DUT1 in \
39 | ... | one direction. Packet is received and verified for correctness on TG. \
40 | ... | Then ETH-IP6-IP6 packet is sent from TG in opposite direction. Packet \
41 | ... | is received and verified for correctness on TG.
42 | ... |
43 | ... | - **[Ref] Applicable standard specifications:** SRv6 Network \
44 | ... | Programming - draft 3.
45
46 *** Variables ***
47 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so
48 | ${crypto_type}= | ${None}
49 | ${nic_name}= | Intel-X710
50 | ${nic_driver}= | vfio-pci
51 | ${nic_rxq_size}= | 0
52 | ${nic_txq_size}= | 0
53 | ${nic_pfs}= | 2
54 | ${nic_vfs}= | 0
55 | ${overhead}= | ${40}
56 # SIDs
57 | ${dut1_sid1}= | 2002:1::
58 | ${dut1_sid2}= | 2003:2::
59 | ${dut1_bsid}= | 2002:1::1
60 | ${dut2_sid1}= | 2002:2::
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 # Telemetry
73 | ${telemetry_profile}= | vpp_test_teardown
74
75 *** Keywords ***
76 | Local Template
77 | | [Documentation]
78 | | ... | - **[Cfg]** DUT1 is configured with IPv6 routing and static route, \
79 | | ... | SR policy and steering policy for one direction and one SR \
80 | | ... | behaviour (function) - End.DX6 - for other direction.
81 | | ... | - **[Ver]** Make TG send IPv6 packets routed over DUT1 interfaces. \
82 | | ... | Make TG verify IPv6 packets are correct.
83 | |
84 | | ... | *Arguments:*
85 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
86 | | ... | - phy_cores - Number of physical cores. Type: integer
87 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
88 | |
89 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
90 | |
91 | | Set Test Variable | \${frame_size}
92 | |
93 | | Given Set Max Rate And Jumbo
94 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
95 | | And Pre-initialize layer driver | ${nic_driver}
96 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
97 | | When Initialize layer driver | ${nic_driver}
98 | | And Initialize layer interface
99 | | And Initialize SRv6 encapsulation with '1' x SID 'with' decapsulation
100 | | Then Send IPv6 Packet and verify SRv6 encapsulation in received packet
101 | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0] | ${DUT1_${int}1_mac}[0]
102 | | ... | ${DUT1_${int}2_mac}[0] | ${tg_if1_ip6_subnet}2 | ${tg_if2_ip6_subnet}2
103 | | ... | ${dut1_sid1} | ${dut1_sid2} | ${dut2_sid2} | ${dut2_sid1}
104
105 *** Test Cases ***
106 | 78B-0c-ethip6ip6-ip6base-srv6enc1sid-scapy
107 | | [Tags] | 78B | 0C
108 | | frame_size=${78} | phy_cores=${0}