summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-12-04 11:30:08 +0200
committerimarom <imarom@cisco.com>2016-12-04 11:30:34 +0200
commitc2e0fc656cb6b3e34939dbe2b9495282f6fd0f53 (patch)
tree6f66d8c3a91e5b445c685cd77055511cd2011875 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
parent4477491bf7d052d9d140508e645b673f7dc87a65 (diff)
test breakage due to incorrect speed calculation
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
index 9b955465..ef74a85e 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
@@ -129,10 +129,10 @@ class Port(object):
return RC_OK(data)
def get_speed_bps (self):
- return (self.__attr['speed'] * 1000 * 1000 * 1000)
+ return (self.get_speed_gbps() * 1000 * 1000 * 1000)
- def get_formatted_speed (self):
- return "%g Gb/s" % (self.__attr['speed'] / 1000)
+ def get_speed_gbps (self):
+ return self.__attr['speed']
def is_acquired(self):
return (self.handler != None)
@@ -826,7 +826,7 @@ class Port(object):
info['is_virtual'] = 'N/A'
# speed
- info['speed'] = self.get_formatted_speed()
+ info['speed'] = self.get_speed_gbps()
# RX filter mode
info['rx_filter_mode'] = 'hardware match' if attr['rx_filter_mode'] == 'hw' else 'fetch all'
@@ -865,7 +865,6 @@ class Port(object):
queue = rx_info['queue']
info['rx_queue'] = '[{0} / {1}]'.format(queue['count'], queue['size']) if queue['is_active'] else 'off'
-
return info