diff options
author | Vratko Polak <vrpolak@cisco.com> | 2019-04-04 13:45:11 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2019-04-08 16:34:10 +0200 |
commit | 5e6145a4260ffce1c302e94b9b241851f90838e1 (patch) | |
tree | 2480a5419cf127ac64262d271b8094f4834b2a66 /resources/libraries/robot/performance/performance_limits.robot | |
parent | 5221220aa5a893e93d78ba31f84b0ad4d6245ec3 (diff) |
Upgrade autogen to NICs and search types
+ All perf suites updated, as autogen change is backward incompatible.
+ Only x710 -ndrpdr suites remain in git repository.
+ Removed retry feature of run_tests.
+ Renamed topology_type and traffic_type to traffic_profile.
+ Renamed framesize to frame_size; nic_model to nic_name.
+ Reordered Variables table to start with nic_name and overhead.
+ Fixed wrong overhead value in some cbc-sha1 suites.
+ Fixed some suite tags.
++ Introduced tags to distinguish suites, such as IPSECINT.
+ Bound crypto hardware to NIC name.
+ Implemented NIC limit hiding.
+ Also search and teardown related arguments are now hidden.
+ Main measurement keywords updated to new arg handling.
+ Max rate related keywords moved to performance_limits.robot
+ Teardowns unified.
+ Generated tests are archived.
++ Generated directory is .gitignore-d.
+ Regenerator raises an exception on seeing non-compatible suite.
++ Relatively helpful message should be seen in exception.
+ Suite and template Documentation has generated parts.
+- With short NIC names only.
+ Autogen checker also upgraded.
+ Tag expressions replaced with long files to ensure analogous tests.
Change-Id: I60e9a999187e7da1f60d0eb4fb02afa14682aa46
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/robot/performance/performance_limits.robot')
-rw-r--r-- | resources/libraries/robot/performance/performance_limits.robot | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/resources/libraries/robot/performance/performance_limits.robot b/resources/libraries/robot/performance/performance_limits.robot new file mode 100644 index 0000000000..759ee5c28f --- /dev/null +++ b/resources/libraries/robot/performance/performance_limits.robot @@ -0,0 +1,117 @@ +# Copyright (c) 2019 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Documentation | Performance suite keywords - Handling NIC and TG limits. +| Library | Collections +| Variables | ${CURDIR}/../../python/Constants.py + +*** Keywords *** +| Get Average Frame Size +| | [Documentation] +| | ... | Framesize can be either integer in case of a single packet +| | ... | in stream, or set of packets in case of IMIX type or simmilar. +| | ... +| | ... | *Arguments:* +| | ... | - frame_size - Framesize. Type: integer or string +| | ... +| | ... | *Returns:* +| | ... | Average frame size. Type: float +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Get Average Frame Size \| IMIX_v4_1 \| +| | ... +| | [Arguments] | ${frame_size} +| | ... +| | Return From Keyword If | '${frame_size}' == 'IMIX_v4_1' | ${353.83333} +| | ${frame_size} = | Convert To Number | ${frame_size} +| | Return From Keyword | ${frame_size} + +| Set Max Rate And Jumbo +| | [Documentation] +| | ... | Input framesize can be either integer in case of a single packet +| | ... | in stream, or IMIX string defining mix of packets. +| | ... | For jumbo frames detection, the maximal packet size is relevant. +| | ... | For maximal transmit rate, the average packet size is relevant. +| | ... | In both cases, encapsulation overhead (if any) has effect. +| | ... | The maximal rate is computed from NIC name. +| | ... | The implementation works by mapping from exact +| | ... | whitelisted NIC names. +| | ... | The mapping is hardcoded in nic_limits.yaml +| | ... | TODO: Make the mapping from NIC names case insensistive. +| | ... +| | ... | TODO: Make pps limit also definable per NIC. +| | ... +| | ... | This keyword computes maximal unidirectional transmit rate +| | ... | and jumbo boolean (some suites need that for configuration decisions). +| | ... | To streamline suite autogeneration, both input and output values +| | ... | are communicated as test (or broader scope) variables, +| | ... | instead of explicit arguments and return values. +| | ... +| | ... | *Test (or broader scope) variables read:* +| | ... | - nic_name - Name of bottleneck NIC. Type: string +| | ... | - overhead - Overhead in bytes. Default: 0. Type: integer +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str +| | ... +| | ... | *Test variables set:* +| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | Type: float +| | ... | - jumbo - Jumbo boolean, true if jumbo packet support +| | ... | has to be enabled. Type: boolean +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Set test Variable \| \${frame_size} \| IMIX_v4_1 \| +| | ... | \| Set Max Rate And Jumbo \| +| | ... +| | ${pps_limit} = | Set Variable | ${18750000.0} +| | ${bps_limit} = | Get From Dictionary | ${NIC_NAME_TO_LIMIT} | ${nic_name} +| | ${avg_size} = | Get Average Frame Size | ${frame_size} +| | ${max_size} = | Set Variable If | '${frame_size}' == 'IMIX_v4_1' +| | ... | ${1518} | ${frame_size} +| | # swo := size_with_overhead +| | ${avg_swo} = | Evaluate | ${avg_size} + ${overhead} +| | ${max_swo} = | Evaluate | ${max_size} + ${overhead} +| | ${jumbo} = | Set Variable If | ${max_swo} < 1522 +| | ... | ${False} | ${True} +| | ${rate} = | Evaluate | ${bps_limit} / ((${avg_swo} + 20.0) * 8) +| | ${max_rate} = | Set Variable If | ${rate} > ${pps_limit} +| | ... | ${pps_limit} | ${rate} +| | Set Test Variable | \${jumbo} +| | Set Test Variable | \${max_rate} + +| Set Max Rate And Jumbo And Handle Multi Seg +| | [Documentation] +| | ... | This keyword starts with Get Max Rate And Jumbo keyword, +| | ... | then adds correct multi seg VPP configuration. +| | ... +| | ... | See Documentation of Set Max Rate And Jumbo for more details. +| | ... +| | ... | *Test (or broader scope) variables read:* +| | ... | - nic_name - Name of bottleneck NIC. Type: string +| | ... | - overhead - Overhead in bytes. Default: 0. Type: integer +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str +| | ... +| | ... | *Test variables set:* +| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | Type: float +| | ... | - jumbo - Jumbo boolean, true if jumbo packet support +| | ... | has to be enabled. Type: boolean +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Set Max Rate And Jumbo And Handle Multi Seg \| +| | ... +| | Set Max Rate And Jumbo +| | Run Keyword If | not ${jumbo} | Add no multi seg to all DUTs |