summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index f6b5d49c..812aea98 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -1809,7 +1809,7 @@ class STLClient(object):
@__api_check(True)
- def wait_on_traffic (self, ports = None, timeout = 60):
+ def wait_on_traffic (self, ports = None, timeout = 60, rx_delay_ms = 10):
"""
block until specify port(s) traffic has ended
@@ -1820,6 +1820,14 @@ class STLClient(object):
timeout : int
timeout in seconds
+ rx_delay_ms : int
+ time to wait until RX filters are removed
+ this value should reflect the time it takes
+ packets which were transmitted to arrive
+ to the destination.
+ after this time the RX filters will be removed
+
+
:raises:
+ :exc:`STLTimeoutError` - in case timeout has expired
+ :exe:'STLError'
@@ -1838,6 +1846,11 @@ class STLClient(object):
if time.time() > expr:
raise STLTimeoutError(timeout)
+ # remove any RX filters
+ rc = self._remove_rx_filters(ports, rx_delay_ms = rx_delay_ms)
+ if not rc:
+ raise STLError(rc)
+
@__api_check(True)
def set_port_attr (self, ports = None, promiscuous = None):