From c2e0fc656cb6b3e34939dbe2b9495282f6fd0f53 Mon Sep 17 00:00:00 2001 From: imarom Date: Sun, 4 Dec 2016 11:30:08 +0200 Subject: test breakage due to incorrect speed calculation Signed-off-by: imarom --- .../trex_control_plane/stl/trex_stl_lib/trex_stl_port.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py') 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 -- cgit 1.2.3-korg