Refactor perf test cases
[csit.git] / tests / vpp / perf / srv6 / 10ge2p1x520-ethip6srhip6-ip6base-srv6enc2sids-mrr.robot
1 # Copyright (c) 2018 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/performance/performance_setup.robot
16 | ...
17 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | MRR
18 | ... | NIC_Intel-X520-DA2 | ETH | IP6FWD | FEATURE | SRv6
19 | ...
20 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
21 | ... | L3 | Intel-X520-DA2
22 | Suite Teardown | Tear down 3-node performance topology
23 | ...
24 | Test Setup | Set up performance test
25 | ...
26 | Test Teardown | Tear down mrr test with SRv6 with encapsulation
27 | ...
28 | Test Template | Local template
29 | ...
30 | Documentation | *Raw results for  Segment routing over IPv6 dataplane with\
31 | ... | two SIDs (SRH inserted) test cases*
32 | ...
33 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
34 | ... | with single links between nodes.
35 | ... | *[Enc] Packet Encapsulations:* Eth-IPv6-SRH-IPv6 on DUT1-DUT2, Eth-IPv6\
36 | ... | on TG-DUTn for IPv6 routing over SRv6.
37 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv6\
38 | ... | routing and static route, SR policy and steering policy for one\
39 | ... | direction and two SR behaviours (functions) - End and End.DX6 - for\
40 | ... | other direction. DUT1 and DUT2 are tested with 2p10GE NIC X520 Niantic\
41 | ... | by Intel.
42 | ... | *[Ver] TG verification:* In MaxReceivedRate tests TG sends traffic\
43 | ... | at line rate and reports total received/sent packets over trial period.\
44 | ... | Test packets are generated by TG on\
45 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups\
46 | ... | (flow-group per direction, 253 flows per flow-group) with\
47 | ... | all packets containing Ethernet header,IPv6 header with static payload.\
48 | ... | MAC addresses are matching MAC addresses of the TG node interfaces.
49 | ... | *[Ref] Applicable standard specifications:* SRv6 Network Programming -\
50 | ... | draft 3.
51
52 *** Variables ***
53 # X520-DA2 bandwidth limit
54 | ${s_limit}= | ${10000000000}
55 # SIDs
56 | ${dut1_sid1}= | 2002:1::
57 | ${dut1_sid2_1}= | 2003:2::
58 | ${dut1_sid2_2}= | 2003:3::
59 | ${dut1_bsid}= | 2002:1::1
60 | ${dut2_sid1_1}= | 2002:2::
61 | ${dut2_sid1_2}= | 2002:3::
62 | ${dut2_sid2}= | 2003:1::
63 | ${dut2_bsid}= | 2002:2::1
64 | ${sid_prefix}= | ${64}
65 # IP settings
66 | ${tg_if1_ip6_subnet}= | 2001:1::
67 | ${tg_if2_ip6_subnet}= | 2001:2::
68 | ${dst_addr_nr}= | ${1}
69 | ${dut1_if1_ip6}= | 2001:1::1
70 | ${dut1_if2_ip6}= | 2001:3::1
71 | ${dut2_if1_ip6}= | 2001:3::2
72 | ${dut2_if2_ip6}= | 2001:2::1
73 | ${prefix}= | ${64}
74 # outer IPv6 header + SRH with 2 SIDs: 40+40B
75 | ${srv6_overhead_2sids}= | ${80}
76 # Traffic profile:
77 | ${traffic_profile}= | trex-sl-3n-ethip6-ip6src253
78
79 *** Keywords ***
80 | Local template
81 | | [Documentation]
82 | | ... | [Cfg] DUT runs IPv6 over SRv6 routing config with ${phy_cores} phy
83 | | ... | core(s).
84 | | ... | [Ver] Measure MaxReceivedRate for ${framesize}B frames using single\
85 | | ... | trial throughput test.
86 | | ...
87 | | ... | *Arguments:*
88 | | ... | - framesize - Framesize in Bytes in integer or string (IMIX_v4_1).
89 | | ... | Type: integer, string
90 | | ... | - phy_cores - Number of physical cores. Type: integer
91 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
92 | | ...
93 | | [Arguments] | ${phy_cores} | ${framesize} | ${rxq}=${None}
94 | | ...
95 | | Set Test Variable | ${framesize}
96 | | ${get_framesize}= | Get Frame Size | ${framesize}
97 | | ${max_rate}= | Calculate pps | ${s_limit}
98 | | ... | ${get_framesize} + ${srv6_overhead_2sids}
99 | | ...
100 | | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
101 | | And Add PCI devices to all DUTs
102 | | And Run Keyword If | ${get_framesize} < ${1522} | Add no multi seg to all DUTs
103 | | And Apply startup configuration on all VPP DUTs
104 | | When Initialize IPv6 forwarding over SRv6 with encapsulation with '2' x SID 'with' decapsulation in 3-node circular topology
105 | | Then Traffic should pass with maximum rate
106 | | ... | ${max_rate}pps | ${framesize} | ${traffic_profile}
107
108 *** Test Cases ***
109 | tc01-78B-1t1c-ethip6srhip6-ip6base-srv6enc2sids-mrr
110 | | [Tags] | 78B | 1C
111 | | phy_cores=${1} | framesize=${78}
112
113 | tc02-1518B-1t1c-ethip6srhip6-ip6base-srv6enc2sids-mrr
114 | | [Tags] | 1518B | 1C
115 | | phy_cores=${1} | framesize=${1518}
116
117 | tc03-9000B-1t1c-ethip6srhip6-ip6base-srv6enc2sids-mrr
118 | | [Tags] | 9000B | 1C
119 | | phy_cores=${1} | framesize=${9000}
120
121 | tc04-IMIX-1t1c-ethip6srhip6-ip6base-srv6enc2sids-mrr
122 | | [Tags] | IMIX | 1C
123 | | phy_cores=${1} | framesize=IMIX_v4_1
124
125 | tc05-78B-2t2c-ethip6srhip6-ip6base-srv6enc2sids-mrr
126 | | [Tags] | 78B | 2C
127 | | phy_cores=${2} | framesize=${78}
128
129 | tc06-1518B-2t2c-ethip6srhip6-ip6base-srv6enc2sids-mrr
130 | | [Tags] | 1518B | 2C
131 | | phy_cores=${2} | framesize=${1518}
132
133 | tc07-9000B-2t2c-ethip6srhip6-ip6base-srv6enc2sids-mrr
134 | | [Tags] | 9000B | 2C
135 | | phy_cores=${2} | framesize=${9000}
136
137 | tc08-IMIX-2t2c-ethip6srhip6-ip6base-srv6enc2sids-mrr
138 | | [Tags] | IMIX | 2C
139 | | phy_cores=${2} | framesize=IMIX_v4_1
140
141 | tc09-78B-4t4c-ethip6srhip6-ip6base-srv6enc2sids-mrr
142 | | [Tags] | 78B | 4C
143 | | phy_cores=${4} | framesize=${78}
144
145 | tc10-1518B-4t4c-ethip6srhip6-ip6base-srv6enc2sids-mrr
146 | | [Tags] | 1518B | 4C
147 | | phy_cores=${4} | framesize=${1518}
148
149 | tc11-9000B-4t4c-ethip6srhip6-ip6base-srv6enc2sids-mrr
150 | | [Tags] | 9000B | 4C
151 | | phy_cores=${4} | framesize=${9000}
152
153 | tc12-IMIX-4t4c-ethip6srhip6-ip6base-srv6enc2sids-mrr
154 | | [Tags] | IMIX | 4C
155 | | phy_cores=${4} | framesize=IMIX_v4_1