CSIT-518: Add testpmd numa awareness
[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 HTT
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 | | ... | cpu_cnt=${cpu_cnt}
39 | | ${dut2_cpus}= | Cpu Range Per Node Str | ${dut2} | ${dut2_numa}
40 | | ... | 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}