CSIT-604: Bootstrap file for vpp-csit-verify-master-centos7-nightly
[csit.git] / resources / libraries / robot / dpdk / default.robot
1 # Copyright (c) 2016 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 | Variables | resources/libraries/python/topology.py
16 | Library | resources.libraries.python.topology.Topology
17 | Library | resources.libraries.python.CpuUtils
18 | Library | resources.libraries.python.DUTSetup
19 | Library | resources.libraries.python.TGSetup
20 | Library | resources.libraries.python.DPDK.L2fwdTest
21 | Library | resources.libraries.python.DPDK.L3fwdTest
22 | Library | Collections
23
24 *** Keywords ***
25 | Start L2FWD '${m}' worker threads and '${n}' rxqueues with jumbo frames '${b}'
26 | | [Documentation] | Start the l2fwd with M worker threads without SMT
27 | | ... | and rxqueues N and B (yes or no) jumbo frames in all DUTs.
28 | | ...
29 | | ${m_int}= | Convert To Integer | ${m}
30 | | ${cpu_cnt}= | Evaluate | ${m_int}+1
31 | | ${nb_cores}= | Convert to String | ${m}
32 | | ${rxqueues}= | Convert to String | ${n}
33 | | ${jumbo_frames}= | Convert to String | ${b}
34 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
35 | | ... | ${dut1_if1} | ${dut1_if2}
36 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
37 | | ... | ${dut2_if1} | ${dut2_if2}
38 | | ${dut1_cpus}= | Cpu Range Per Node Str | ${dut1} | ${dut1_numa}
39 | | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt}
40 | | ${dut2_cpus}= | Cpu Range Per Node Str | ${dut2} | ${dut2_numa}
41 | | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt}
42 | | Start the l2fwd test | ${dut1} | ${dut1_cpus} | ${nb_cores} | ${rxqueues}
43 | | ... | ${jumbo_frames}
44 | | Start the l2fwd test | ${dut2} | ${dut2_cpus} | ${nb_cores} | ${rxqueues}
45 | | ... | ${jumbo_frames}
46
47 | Start L2FWD '${m}' worker threads using SMT and '${n}' rxqueues with jumbo frames '${b}'
48 | | [Documentation] | Start the l2fwd with M worker threads with SMT
49 | | ... | and rxqueues N and B (yes or no) jumbo frames in all DUTs.
50 | | ...
51 | | ${m_int}= | Convert To Integer | ${m}
52 | | ${cpu_cnt}= | Evaluate | ${m_int}+1
53 | | ${nb_cores_int}= | Evaluate | ${m_int}*2
54 | | ${nb_cores}= | Convert to String | ${nb_cores_int}
55 | | ${rxqueues}= | Convert to String | ${n}
56 | | ${jumbo_frames}= | Convert to String | ${b}
57 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
58 | | ... | ${dut1_if1} | ${dut1_if2}
59 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
60 | | ... | ${dut2_if1} | ${dut2_if2}
61 | | ${dut1_cpus}= | Cpu Range Per Node Str | ${dut1} | ${dut1_numa}
62 | | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt} | smt_used=${True}
63 | | ${dut2_cpus}= | Cpu Range Per Node Str | ${dut2} | ${dut2_numa}
64 | | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt} | smt_used=${True}
65 | | Start the l2fwd test | ${dut1} | ${dut1_cpus} | ${nb_cores} | ${rxqueues}
66 | | ... | ${jumbo_frames}
67 | | Start the l2fwd test | ${dut2} | ${dut2_cpus} | ${nb_cores} | ${rxqueues}
68 | | ... | ${jumbo_frames}
69
70 | Start L3FWD '${m}' worker threads and '${n}' rxqueues with jumbo frames '${b}'
71 | | [Documentation] | Start the l3fwd with M worker threads without SMT
72 | | ... | and rxqueues N and B(yes or no) jumbo frames in all DUTs.
73 | | ${cpu_cnt}= | Convert To Integer | ${m}
74 | | ${nb_cores}= | Convert to String | ${m}
75 | | ${rxqueues}= | Convert to String | ${n}
76 | | ${jumbo_frames}= | Convert to String | ${b}
77 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
78 | | ... | ${dut1_if1} | ${dut1_if2}
79 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
80 | | ... | ${dut2_if1} | ${dut2_if2}
81 | | ${dut1_cpus}= | Cpu List Per Node Str | ${dut1} | ${dut1_numa}
82 | | ... | cpu_cnt=${cpu_cnt}
83 | | ${dut2_cpus}= | Cpu List Per Node Str | ${dut2} | ${dut2_numa}
84 | | ... | cpu_cnt=${cpu_cnt}
85 | | Start the l3fwd test | ${nodes} | ${dut1} | ${dut1_if1} | ${dut1_if2}
86 | | ... | ${nb_cores} | ${dut1_cpus} | ${rxqueues} | ${jumbo_frames}
87 | | Start the l3fwd test | ${nodes} | ${dut2} | ${dut2_if1} | ${dut2_if2}
88 | | ... | ${nb_cores} | ${dut2_cpus} | ${rxqueues} | ${jumbo_frames}
89
90 | Start L3FWD '${m}' worker threads using SMT and '${n}' rxqueues with jumbo frames '${b}'
91 | | [Documentation] | Start the l3fwd with M worker threads with SMT
92 | | ... | and rxqueues N and B(yes or no) jumbo frames in all DUTs.
93 | | ${cpu_cnt}= | Convert To Integer | ${m}
94 | | ${nb_cores_int}= | Evaluate | ${cpu_cnt}*2
95 | | ${nb_cores}= | Convert to String | ${nb_cores_int}
96 | | ${rxqueues}= | Convert to String | ${n}
97 | | ${jumbo_frames}= | Convert to String | ${b}
98 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
99 | | ... | ${dut1_if1} | ${dut1_if2}
100 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
101 | | ... | ${dut2_if1} | ${dut2_if2}
102 | | ${dut1_cpus}= | Cpu List Per Node Str | ${dut1} | ${dut1_numa}
103 | | ... | cpu_cnt=${cpu_cnt} | smt_used=${True}
104 | | ${dut2_cpus}= | Cpu List Per Node Str | ${dut2} | ${dut2_numa}
105 | | ... | cpu_cnt=${cpu_cnt} | smt_used=${True}
106 | | Start the l3fwd test | ${nodes} | ${dut1} | ${dut1_if1} | ${dut1_if2}
107 | | ... | ${nb_cores} | ${dut1_cpus} | ${rxqueues} | ${jumbo_frames}
108 | | Start the l3fwd test | ${nodes} | ${dut2} | ${dut2_if1} | ${dut2_if2}
109 | | ... | ${nb_cores} | ${dut2_cpus} | ${rxqueues} | ${jumbo_frames}
110