summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp/trex_stateless_port.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-02-25 09:54:45 -0500
committerimarom <imarom@cisco.com>2016-02-25 09:57:23 -0500
commitaaef3f95683bfa1574537c543e4ffc86afb0480f (patch)
tree01bf5d21786fb59d13338a75b644eb0fa9a5f20d /src/stateless/cp/trex_stateless_port.cpp
parented7c04b5d7d5bb15aa13144e62caa786e73f7d05 (diff)
port attributes - promiscuous and etc.
Diffstat (limited to 'src/stateless/cp/trex_stateless_port.cpp')
-rw-r--r--src/stateless/cp/trex_stateless_port.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/stateless/cp/trex_stateless_port.cpp b/src/stateless/cp/trex_stateless_port.cpp
index d2463925..43f32d22 100644
--- a/src/stateless/cp/trex_stateless_port.cpp
+++ b/src/stateless/cp/trex_stateless_port.cpp
@@ -40,7 +40,6 @@ limitations under the License.
// DPDK c++ issue
#endif
-#include <rte_ethdev.h>
#include <os_time.h>
void
@@ -251,9 +250,9 @@ TrexStatelessPort::common_port_stop_actions(bool event_triggered) {
data["port_id"] = m_port_id;
if (event_triggered) {
- get_stateless_obj()->get_publisher()->publish_event(TrexPublisher::EVENT_PORT_STOPPED, data);
- } else {
get_stateless_obj()->get_publisher()->publish_event(TrexPublisher::EVENT_PORT_FINISHED_TX, data);
+ } else {
+ get_stateless_obj()->get_publisher()->publish_event(TrexPublisher::EVENT_PORT_STOPPED, data);
}
for (auto entry : m_stream_table) {
@@ -668,6 +667,20 @@ TrexStatelessPort::get_port_effective_rate(double &pps,
}
+
+void
+TrexStatelessPort::set_promiscuous(bool enabled) {
+ get_stateless_obj()->get_platform_api()->set_promiscuous(m_port_id, enabled);
+}
+
+bool
+TrexStatelessPort::get_promiscuous() {
+ return get_stateless_obj()->get_platform_api()->get_promiscuous(m_port_id);
+}
+
+
+
+
void
TrexStatelessPort::add_stream(TrexStream *stream) {