summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-01-29 18:07:33 +0200
committerimarom <imarom@cisco.com>2017-01-29 18:07:33 +0200
commit519ea63d05c655a75602eb8cd77c84e6e49e827d (patch)
treedbfb7325178a86149efce096494535b886907df7 /scripts/automation/trex_control_plane
parent42664b05103d0f4a7ed272301051d58d6e8f3737 (diff)
parentefbe56332fdf6a5c386152e4a2af3a2b56f723b5 (diff)
Merge branch 'master' into capture
Diffstat (limited to 'scripts/automation/trex_control_plane')
-rwxr-xr-xscripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py9
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py2
2 files changed, 9 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py
index 4e7deb93..490e3b7a 100755
--- a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py
+++ b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py
@@ -1110,6 +1110,13 @@ class CTRexResult(object):
self.clear_results()
self.latency_checked = True
self.filtered_latency_amount = filtered_latency_amount
+ self.set_warmup_default()
+
+ def set_warmup_default (self):
+ self.set_warmup(0.96)
+
+ def set_warmup (self,new_warmup_max):
+ self.warmup_max = new_warmup_max
def __repr__(self):
return ("Is valid history? {arg}\n".format( arg = self.is_valid_hist() ) +
@@ -1414,7 +1421,7 @@ class CTRexResult(object):
self._current_tx_rate = CTRexResult.__get_value_by_path(latest_dump, "trex-global.data", "m_tx_(?!expected_)\w+")
if not self._done_warmup and self._expected_tx_rate is not None:
# check for up to 4% change between expected and actual
- if (self._current_tx_rate['m_tx_bps'] > 0.96 * self._expected_tx_rate['m_tx_expected_bps']):
+ if (self._current_tx_rate['m_tx_bps'] > self.warmup_max * self._expected_tx_rate['m_tx_expected_bps']):
self._done_warmup = True
latest_dump['warmup_barrier'] = True
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py
index cf594948..30a699c5 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py
@@ -1536,7 +1536,7 @@ def get_TOS(user_kwargs, kwargs):
if user_args & (TOS2 - TOS1) and user_args & (TOS1 - TOS2):
raise STLError('You have mixed %s and %s TOS parameters' % (TOS1, TOS2))
if user_args & (TOS0 - TOS1 - TOS2):
- return (kwargs['ip_precedence'] << 5) + (kwargs['ip_tos_field'] << 2) + kwargs['ip_mbz']
+ return (kwargs['ip_precedence'] << 5) + (kwargs['ip_tos_field'] << 1) + kwargs['ip_mbz']
if user_args & (TOS1 - TOS2):
return (kwargs['ip_precedence'] << 5) + (kwargs['ip_delay'] << 4) + (kwargs['ip_throughput'] << 3) + (kwargs['ip_reliability'] << 2) + (kwargs['ip_cost'] << 1) + kwargs['ip_reserved']
return (kwargs['ip_dscp'] << 2) + kwargs['ip_cu']