From ff1f49d9ba97ddfee3229907e3a344503e072578 Mon Sep 17 00:00:00 2001 From: Jan Gelety Date: Thu, 6 Aug 2020 03:34:31 +0200 Subject: Perf: NAT44 endpoint-dependent mode - udp, part I - continuation of https://gerrit.fd.io/r/c/csit/+/26898 as there was reached limit of changes (1000) Jira: CSIT-1711 - udp synthetic profiles w/o data packets - udp cps perf tests, phase I (no special "search cps" KW) Part I means that we are using MRR tests to collect traffic data until there is ready new CPS test type with corresponding algorithm. Change-Id: I0d30feb9ecf1d0bff937152656f8eb422f831378 Signed-off-by: Jan Gelety --- .../robot/performance/performance_limits.robot | 88 +++++++++++++++++----- 1 file changed, 71 insertions(+), 17 deletions(-) (limited to 'resources/libraries/robot/performance/performance_limits.robot') diff --git a/resources/libraries/robot/performance/performance_limits.robot b/resources/libraries/robot/performance/performance_limits.robot index 82688ac9c6..332ed9368b 100644 --- a/resources/libraries/robot/performance/performance_limits.robot +++ b/resources/libraries/robot/performance/performance_limits.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 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: @@ -24,19 +24,48 @@ | | | | ... | *Arguments:* | | ... | - frame_size - Framesize. Type: integer or string +| | ... | - overhead - Overhead in bytes; default value: ${0}. Type: integer | | | | ... | *Returns:* -| | ... | Average frame size. Type: float +| | ... | Average frame size including overhead. Type: float | | | | ... | *Example:* | | | | ... | \| Get Average Frame Size \| IMIX_v4_1 \| | | -| | [Arguments] | ${frame_size} +| | [Arguments] | ${frame_size} | ${overhead}=${0} | | -| | Return From Keyword If | '${frame_size}' == 'IMIX_v4_1' | ${353.83333} -| | ${frame_size} = | Convert To Number | ${frame_size} -| | Return From Keyword | ${frame_size} +| | ${frame_size} = | Run Keyword If | '${frame_size}' == 'IMIX_v4_1' +| | ... | Set Variable | ${353.83333} +| | ... | ELSE +| | ... | Convert To Number | ${frame_size} +| | ${avg_frame_size} = | Evaluate | ${frame_size} + ${overhead} +| | Return From Keyword | ${avg_frame_size} + +| Get Maximum 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 +| | ... | - overhead - Overhead in bytes; default value: ${0}. Type: integer +| | +| | ... | *Returns:* +| | ... | Maximum frame size including overhead. Type: float +| | +| | ... | *Example:* +| | +| | ... | \| Get Maximum Frame Size \| IMIX_v4_1 \| +| | +| | [Arguments] | ${frame_size} | ${overhead}=${0} +| | +| | ${frame_size} = | Run Keyword If | '${frame_size}' == 'IMIX_v4_1' +| | ... | Set Variable | ${1518} +| | ... | ELSE +| | ... | Convert To Number | ${frame_size} +| | ${max_frame_size} = | Evaluate | ${frame_size} + ${overhead} +| | Return From Keyword | ${max_frame_size} | Set Max Rate And Jumbo | | [Documentation] @@ -61,8 +90,9 @@ | | | | ... | *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 +| | ... | - overhead - Overhead in bytes; default value: 0. Type: integer +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string | | | | ... | *Test variables set:* | | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. @@ -72,7 +102,7 @@ | | | | ... | *Example:* | | -| | ... | \| Set test Variable \| \${frame_size} \| IMIX_v4_1 \| +| | ... | \| Set Test Variable \| \${frame_size} \| IMIX_v4_1 \| | | ... | \| Set Max Rate And Jumbo \| | | | | # Negative overhead is possible, if DUT-DUT traffic is less encapsulated @@ -84,16 +114,40 @@ | | ... | ${NIC_NAME_TO_PPS_LIMIT} | ${nic_name} | | ${bps_limit} = | Get From Dictionary | | ... | ${NIC_NAME_TO_BPS_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} +| | ${avg_swo} = | Get Average Frame Size | ${frame_size} | ${overhead} | | ${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 Jumbo + +| Set Jumbo +| | [Documentation] +| | ... | For jumbo frames detection, the maximal packet size is relevant, +| | ... | encapsulation overhead (if any) has effect. +| | +| | ... | This keyword computes 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:* +| | ... | - overhead - Overhead in bytes; default value: 0. Type: integer +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or +| | ... | string +| | +| | ... | *Test variables set:* +| | ... | - jumbo - Jumbo boolean, true if jumbo packet support has to be +| | ... | enabled. Type: boolean +| | +| | ... | *Example:* +| | +| | ... | \| Set Jumnbo \| +| | +| | ${overhead} = | Set Variable If | ${overhead} >= 0 | ${overhead} | ${0} +| | ${max_swo} = | Get Maximum Frame Size | ${frame_size} | ${overhead} +| | ${jumbo} = | Set Variable If | ${max_swo} < 1522 +| | ... | ${False} | ${True} +| | Set Test Variable | \${jumbo} -- cgit 1.2.3-korg