X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fperformance%2Fperformance_vars.robot;h=4f2cc50fa354af6c4632b79183da80574d2f9bcc;hp=f75d585e4b1cc1a330407e00eeb75c37b5123990;hb=HEAD;hpb=1daa6fdc0bae284dee1b61f34534e59b60b7526a diff --git a/resources/libraries/robot/performance/performance_vars.robot b/resources/libraries/robot/performance/performance_vars.robot index f75d585e4b..a0fa277e4c 100644 --- a/resources/libraries/robot/performance/performance_vars.robot +++ b/resources/libraries/robot/performance/performance_vars.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Cisco and/or its affiliates. +# Copyright (c) 2023 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: @@ -404,6 +404,8 @@ | | ... | *Test variables set:* | | ... | - jumbo - Jumbo boolean, true if jumbo packet support has to be | | ... | enabled. Type: boolean +| | ... | - recommended_mtu - Resonable value (with space for encap overhead) +| | ... | according to jumbo. Type: int | | | | ... | *Example:* | | @@ -413,11 +415,14 @@ | | Set Numeric Frame Sizes | | ${jumbo} = | Evaluate | ${max_frame_size} >= 1522 | | Set Test Variable | \${jumbo} +| | ${recommended_mtu} = | Set Variable If | ${jumbo} | ${9200} | ${1800} +| | Set Test Variable | \${recommended_mtu} | Set Max Rate And Jumbo | | [Documentation] -| | ... | This keyword computes maximal unidirectional transmit rate -| | ... | and jumbo boolean (some suites need that for configuration decisions). +| | ... | This keyword computes maximal unidirectional transmit rate, +| | ... | jumbo boolean (some suites need that for configuration decisions), +| | ... | and recommended MTU value (depends on jumbo). | | ... | To streamline suite autogeneration, both input and output values | | ... | are communicated as test (or broader scope) variables, | | ... | instead of explicit arguments and return values. @@ -447,6 +452,8 @@ | | ... | Type: float | | ... | - jumbo - Jumbo boolean, true if jumbo packet support has to be | | ... | enabled. Type: boolean +| | ... | - recommended_mtu - Resonable value (with space for encap overhead) +| | ... | according to jumbo. Type: int | | ... | - max_frame_size - Maximal frame size including overhead. Type: float | | ... | - avg_directional_frame_size - Average frame size including overhead | | ... | for the more loaded direction. Type: float @@ -532,11 +539,15 @@ | | ... | '${frame_size}' == 'IMIX_v4_1' | Set Variable | ${353.8333333333333} | | ... | ELSE | Convert To Number | ${frame_size} | | # Long boolean formula in 2 lines. -| | ${is_tcp_pps} = | Evaluate | 'TCP_PPS' in ${TEST_TAGS} -| | ${is_tcp_tput} = | Evaluate | ${is_tcp_pps} or 'TCP_TPUT' in ${TEST_TAGS} +| | ${is_cps} = | Evaluate | 'TCP_CPS' in ${TEST_TAGS} +| | ${is_pps} = | Evaluate | 'TCP_PPS' in ${TEST_TAGS} +| | ${is_tput} = | Evaluate | ${is_pps} or 'TCP_TPUT' in ${TEST_TAGS} +| | # TODO: Investigate impact of values on hoststack tests. +| | ${is_cps} = | Evaluate | ${is_cps} and 'HOSTSTACK' not in ${TEST_TAGS} +| | ${is_tput} = | Evaluate | ${is_tput} and 'HOSTSTACK' not in ${TEST_TAGS} | | ${avg_dir_frame_size} | ${avg_agg_frame_size} = | Run Keyword If -| | ... | 'TCP_CPS' in ${TEST_TAGS} | Apply Tcp Cps Proto Overhead | ${bafs} -| | ... | ELSE IF | ${is_tcp_tput} | Apply Tcp Tput Proto Overhead | ${bafs} +| | ... | ${is_cps} | Apply Tcp Cps Proto Overhead | ${bafs} +| | ... | ELSE IF | ${is_tput} | Apply Tcp Tput Proto Overhead | ${bafs} | | ... | ELSE | Set Variable | ${bafs} | ${bafs} | | ${max_overhead} = | Set Variable If | ${overhead} >= 0 | ${overhead} | ${0} | | ${mfs} = | Evaluate | ${bare_max_frame_size} + ${max_overhead}