summaryrefslogtreecommitdiffstats
path: root/src/stateless/dp/trex_stateless_dp_core.h
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-19 22:13:55 +0200
committerimarom <imarom@cisco.com>2015-11-19 22:28:51 +0200
commitb094110ef86889a0694dc71503c5610abaf47ebe (patch)
treedc7e98f0fdcdee176b6bdbcfdc7736364e020608 /src/stateless/dp/trex_stateless_dp_core.h
parent90e283923e5d860803eae5996a1247b1390ea36a (diff)
BUG: didn't do all the states per port on the DP - now fixed
Diffstat (limited to 'src/stateless/dp/trex_stateless_dp_core.h')
-rw-r--r--src/stateless/dp/trex_stateless_dp_core.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.h b/src/stateless/dp/trex_stateless_dp_core.h
index 7ee5abc4..c0bbe702 100644
--- a/src/stateless/dp/trex_stateless_dp_core.h
+++ b/src/stateless/dp/trex_stateless_dp_core.h
@@ -66,6 +66,18 @@ public:
bool update_number_of_active_streams(uint32_t d);
+ state_e get_state() {
+ return m_state;
+ }
+
+ void set_event_id(int event_id) {
+ m_event_id = event_id;
+ }
+
+ int get_event_id() {
+ return m_event_id;
+ }
+
public:
state_e m_state;
@@ -75,6 +87,7 @@ public:
std::vector<CDpOneStream> m_active_nodes; /* holds the current active nodes */
CFlowGenListPerThread * m_core ;
+ int m_event_id;
};
/* for now */
@@ -166,19 +179,13 @@ public:
/* quit the main loop, work in both stateless in stateful, don't free memory trigger from master */
void quit_main_loop();
- void set_event_id(int event_id) {
- m_event_id = event_id;
- }
-
- int get_event_id() {
- return m_event_id;
+ state_e get_state() {
+ return m_state;
}
bool set_stateless_next_node(CGenNodeStateless * cur_node,
CGenNodeStateless * next_node);
-private:
-
TrexStatelessDpPerPort * get_port_db(uint8_t port_id){
assert((m_local_port_offset==port_id) ||(m_local_port_offset+1==port_id));
@@ -188,6 +195,9 @@ private:
}
+
+private:
+
void schedule_exit();
@@ -236,7 +246,6 @@ private:
CFlowGenListPerThread * m_core;
double m_duration;
- int m_event_id;
};
#endif /* __TREX_STATELESS_DP_CORE_H__ */