From 0337db2b07c2c054ee5c5ea49cab6cfce5d5a897 Mon Sep 17 00:00:00 2001 From: imarom Date: Mon, 31 Oct 2016 11:58:27 +0200 Subject: draft: RX software feature Signed-off-by: imarom --- .../stl/trex_stl_lib/trex_stl_port.py | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (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 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): -- cgit 1.2.3-korg