b15d48a1d43119ea71d906b336935c386b45a116
[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 | Collections
22
23 *** Keywords ***
24 | Start L2FWD '${m}' worker threads and rxqueues '${n}' with jumbo frames '${b}'
25 | | [Documentation] | Start the l2fwd with M worker threads without SMT
26 | | ... | and rxqueues N and B (yes or no) jumbo frames in all DUTs.
27 | | ...
28 | | ${m_int}= | Convert To Integer | ${m}
29 | | ${cpu_cnt}= | Evaluate | ${m_int}+1
30 | | ${nb_cores}= | Convert to String | ${m}
31 | | ${rxqueues}= | Convert to String | ${n}
32 | | ${jumbo_frames}= | Convert to String | ${b}
33 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
34 | | ... | ${dut1_if1} | ${dut1_if2}
35 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
36 | | ... | ${dut2_if1} | ${dut2_if2}
37 | | ${dut1_cpus}= | Cpu Range Per Node Str | ${dut1} | ${dut1_numa}
38 | | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt}
39 | | ${dut2_cpus}= | Cpu Range Per Node Str | ${dut2} | ${dut2_numa}
40 | | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt}
41 | | Start the l2fwd test | ${dut1} | ${dut1_cpus} | ${nb_cores} | ${rxqueues}
42 | | ... | ${jumbo_frames}
43 | | Start the l2fwd test | ${dut2} | ${dut2_cpus} | ${nb_cores} | ${rxqueues}
44 | | ... | ${jumbo_frames}
45
46 | Start L2FWD '${m}' worker threads using SMT and rxqueues '${n}' with jumbo frames '${b}'
47 | | [Documentation] | Start the l2fwd with M worker threads with SMT
48 | | ... | and rxqueues N and B (yes or no) jumbo frames in all DUTs.
49 | | ...
50 | | ${m_int}= | Convert To Integer | ${m}
51 | | ${cpu_cnt}= | Evaluate | ${m_int}+1
52 | | ${nb_cores_int}= | Evaluate | ${m_int}*2
53 | | ${nb_cores}= | Convert to String | ${nb_cores_int}
54 | | ${rxqueues}= | Convert to String | ${n}
55 | | ${jumbo_frames}= | Convert to String | ${b}
56 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
57 | | ... | ${dut1_if1} | ${dut1_if2}
58 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
59 | | ... | ${dut2_if1} | ${dut2_if2}
60 | | ${dut1_cpus}= | Cpu Range Per Node Str | ${dut1} | ${dut1_numa}
61 | | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt} | smt_used=${True}
62 | | ${dut2_cpus}= | Cpu Range Per Node Str | ${dut2} | ${dut2_numa}
63 | | ... | skip_cnt=${1} | cpu_cnt=${cpu_cnt} | smt_used=${True}
64 | | Start the l2fwd test | ${dut1} | ${dut1_cpus} | ${nb_cores} | ${rxqueues}
65 | | ... | ${jumbo_frames}
66 | | Start the l2fwd test | ${dut2} | ${dut2_cpus} | ${nb_cores} | ${rxqueues}
67 | | ... | ${jumbo_frames}

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.