Report: NAT44 graphs
[csit.git] / resources / libraries / robot / dpdk / default.robot
1 # Copyright (c) 2022 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 | Library | resources.libraries.python.InterfaceUtil
16 | Library | resources.libraries.python.CpuUtils
17 | Library | resources.libraries.python.DPDK.TestpmdTest
18 | Library | resources.libraries.python.DPDK.TestpmdCheck
19 | Library | resources.libraries.python.DPDK.L3fwdTest
20 | Library | resources.libraries.python.DPDK.L3fwdCheck
21 | Library | Collections
22
23 *** Keywords ***
24 | Start testpmd on all DUTs
25 | | [Documentation] | Start the testpmd with M worker threads and rxqueues N and
26 | | ... | jumbo support frames on/off on all DUTs.
27 | |
28 | | ... | *Arguments:*
29 | | ... | - phy_cores - Number of physical cores to use. Type: integer
30 | | ... | - rx_queues - Number of RX queues. Type: integer
31 | | ... | - jumbo_frames - Jumbo frames on/off: boolean
32 | | ... | - rxd - Number of RX descriptors. Type: integer
33 | | ... | - txd - Number of TX descriptors. Type: integer
34 | |
35 | | ... | *Example:*
36 | |
37 | | ... | \| Start testpmd on all DUTs \| ${1} \| ${1} \| ${False} \|
38 | |
39 | | [Arguments] | ${phy_cores} | ${rx_queues}=${None} | ${jumbo_frames}=${False}
40 | | ... | ${rxd}=${None} | ${txd}=${None}
41 | |
42 | | ${cpu_count_int} | Convert to Integer | ${phy_cores}
43 | | ${dp_count_int} | Convert to Integer | ${phy_cores}
44 | | ${dp_cores}= | Evaluate | ${cpu_count_int}+1
45 | | FOR | ${dut} | IN | @{duts}
46 | | | &{compute_resource_info}= | Get Affinity Vswitch
47 | | | ... | ${nodes} | ${dut} | ${phy_cores} | rx_queues=${rx_queues}
48 | | | ... | rxd=${rxd} | txd=${txd}
49 | | | Set Test Variable | &{compute_resource_info}
50 | | | Create compute resources variables
51 | | | Start testpmd
52 | | | ... | ${nodes['${dut}']} | ${${dut}_pf1}[0] | ${${dut}_pf2}[0]
53 | | | ... | ${cpu_dp} | ${dp_count_int} | ${rxq_count_int} | ${jumbo_frames}
54 | | | ... | ${nic_rxq_size} | ${nic_txq_size}
55 | | FOR | ${dut} | IN | @{duts}
56 | | | Check testpmd
57 | | | ... | ${nodes['${dut}']}
58 | | END
59
60 | Start l3fwd on all DUTs
61 | | [Documentation] | Start the l3fwd with M worker threads and rxqueues N and
62 | | ... | jumbo support frames on/off on all DUTs.
63 | |
64 | | ... | *Arguments:*
65 | | ... | - phy_cores - Number of physical cores to use. Type: integer
66 | | ... | - rx_queues - Number of RX queues. Type: integer
67 | | ... | - jumbo_frames - Jumbo frames on/off: boolean
68 | | ... | - rxd - Number of RX descriptors. Type: integer
69 | | ... | - txd - Number of TX descriptors. Type: integer
70 | |
71 | | ... | *Example:*
72 | |
73 | | ... | \| Start l3fwd on all DUTs \| ${1} \| ${1} \| ${False} \|
74 | |
75 | | [Arguments] | ${phy_cores} | ${rx_queues}=${None} | ${jumbo_frames}=${False}
76 | | ... | ${rxd}=${None} | ${txd}=${None}
77 | |
78 | | ${cpu_count_int} | Convert to Integer | ${phy_cores}
79 | | ${dp_count_int} | Convert to Integer | ${phy_cores}
80 | | ${dp_cores}= | Evaluate | ${cpu_count_int}+1
81 | | FOR | ${dut} | IN | @{duts}
82 | | | &{compute_resource_info}= | Get Affinity Vswitch
83 | | | ... | ${nodes} | ${dut} | ${phy_cores} | rx_queues=${rx_queues}
84 | | | ... | rxd=${rxd} | txd=${txd}
85 | | | Set Test Variable | &{compute_resource_info}
86 | | | Create compute resources variables
87 | | | Start l3fwd
88 | | | ... | ${nodes} | ${nodes['${dut}']} | ${${dut}_pf1}[0] | ${${dut}_pf2}[0]
89 | | | ... | ${cpu_dp} | ${dp_count_int} | ${rxq_count_int} | ${jumbo_frames}
90 | | FOR | ${dut} | IN | @{duts}
91 | | | Check l3fwd
92 | | | ... | ${nodes['${dut}']}
93 | | END