summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
diff options
context:
space:
mode:
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.py27
1 files changed, 27 insertions, 0 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 cec3761f..bf0251b8 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
@@ -487,6 +487,21 @@ class Port(object):
return self.ok()
+ @writeable
+ def set_rx_filter_mode (self, filter_mode):
+ assert(filter_mode in ["hw", "all"])
+
+ params = {"handler": self.handler,
+ "port_id": self.port_id,
+ "type": "filter_mode",
+ "filter_type": filter_mode}
+
+ rc = self.transmit("set_rx_feature", params)
+ if rc.bad():
+ return self.err(rc.err())
+
+ return self.ok()
+
@owned
def pause (self):
@@ -583,6 +598,18 @@ class Port(object):
return self.ok()
+ @owned
+ def get_rx_sw_pkts (self):
+ params = {"handler": self.handler,
+ "port_id": self.port_id}
+
+ rc = self.transmit("get_rx_sw_pkts", params)
+ if rc.bad():
+ return self.err(rc.err())
+
+ return self.ok()
+
+
@writeable
def push_remote (self, pcap_filename, ipg_usec, speedup, count, duration, is_dual, slave_handler):