Telemetry: vpp device
[csit.git] / tests / vpp / device / srv6 / 2n1l-10ge2p1x710-ethip6srhip6-ip6base-srv6proxy-dyn-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_PROXY
19 | ... | SRv6_PROXY_DYN | MEMIF | DOCKER | DRV_VFIO_PCI
20 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
21 | ... | ethip6srhip6-ip6base-srv6proxy-dyn
22 |
23 | Suite Setup | Setup suite topology interfaces | scapy
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | packet_trace | telemetry | container
26 |
27 | Test Template | Local Template
28 |
29 | Documentation | *Segment routing over IPv6 dataplane with Dynamic\
30 | ... | SRv6 proxy 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 three 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 | memif_plugin.so
46 | ... | srv6ad_plugin.so
47 | ${crypto_type}= | ${None}
48 | ${nic_name}= | Intel-X710
49 | ${nic_driver}= | vfio-pci
50 | ${nic_rxq_size}= | 0
51 | ${nic_txq_size}= | 0
52 | ${nic_pfs}= | 2
53 | ${nic_vfs}= | 0
54 | ${overhead}= | ${80}
55 # SIDs
56 | ${dut1_sid1}= | 2002:1::
57 | ${dut1_sid2}= | 2003:2::
58 | ${dut1_bsid}= | 2002:1::1
59 | ${dut2_sid1}= | 2002:2::
60 | ${dut2_sid2}= | 2003:1::
61 | ${out_sid1_1}= | 2002:3::
62 | ${out_sid1_2}= | 2002:4::
63 | ${out_sid2_1}= | 2003:3::
64 | ${out_sid2_2}= | 2003:4::
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 | ${dut1-memif-1-if1_ip6}= | 3001:1::1
73 | ${dut1-memif-1-if2_ip6}= | 3001:1::2
74 | ${dut1_nh}= | 4002::
75 | ${dut2_if1_ip6}= | 2001:3::2
76 | ${dut2_if2_ip6}= | 2001:2::1
77 | ${dut2-memif-1-if1_ip6}= | 3002:1::1
78 | ${dut2-memif-1-if2_ip6}= | 3002:1::2
79 | ${dut2_nh}= | 4001::
80 | ${prefix}= | ${64}
81 | ${mem_prefix}= | ${128}
82 # Container
83 | ${container_engine}= | Docker
84 | ${container_chain_topology}= | chain_functional
85 # Telemetry
86 | ${telemetry_profile}= | vpp_test_teardown
87
88 *** Keywords ***
89 | Local Template
90 | | [Documentation]
91 | | ... | [Cfg] DUT1 is configured with IPv6 routing and static route,\
92 | | ... | SR policy and steering policy for one direction and one SR\
93 | | ... | behaviour (function) - End.AD - for other direction.
94 | | ... | [Ver] Make TG send IPv6 packets routed over DUT1 interfaces.\
95 | | ... | Make TG verify IPv6 packets are correct.
96 | |
97 | | ... | *Arguments:*
98 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
99 | | ... | - phy_cores - Number of physical cores. Type: integer
100 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
101 | |
102 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
103 | |
104 | | Set Test Variable | \${frame_size}
105 | |
106 | | Given Set Max Rate And Jumbo
107 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
108 | | And Pre-initialize layer driver | ${nic_driver}
109 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
110 | | When Initialize layer driver | ${nic_driver}
111 | | And Initialize layer interface
112 | | And Start containers for test | auto_scale=${False} | pinning=${False}
113 | | And Initialize SRv6 with 'dynamic_proxy' SR-unaware Service Function
114 | | Then Send IPv6 Packet and verify SRv6 encapsulation in received packet
115 | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0] | ${DUT1_${int}1_mac}[0]
116 | | ... | ${DUT1_${int}2_mac}[0] | ${tg_if1_ip6_subnet}2 | ${tg_if2_ip6_subnet}2
117 | | ... | ${dut1_sid1} | ${dut1_sid2} | ${dut2_sid2} | ${dut2_sid1}
118 | | ... | ${out_sid2_1} | ${out_sid1_1} | decap=${False}
119 | | ... | tg_dstsid3=${out_sid1_2} | dut_dstsid3=${out_sid2_2}
120
121 *** Test Cases ***
122 | 78B-0c-ethip6srhip6-ip6base-srv6proxy-dyn-scapy
123 | | [Tags] | 78B | 0C
124 | | frame_size=${78} | phy_cores=${0}