diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-03-01 11:10:48 +0200 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-03-02 10:13:33 +0200 |
commit | 8714436f26fe6ae10559f726573f1f01d2baa8b0 (patch) | |
tree | 6c0ded85db2903eb8bd90f683ee66649a2412917 /src/stateless/dp/trex_stream_node.h | |
parent | 42c621b92fca9c9ef916ce9896aecea0290ce2aa (diff) |
tx stats per stream
Diffstat (limited to 'src/stateless/dp/trex_stream_node.h')
-rw-r--r-- | src/stateless/dp/trex_stream_node.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/stateless/dp/trex_stream_node.h b/src/stateless/dp/trex_stream_node.h index b366a770..104e4d3b 100644 --- a/src/stateless/dp/trex_stream_node.h +++ b/src/stateless/dp/trex_stream_node.h @@ -62,7 +62,8 @@ public: SL_NODE_CONST_MBUF =4, - SL_NODE_VAR_PKT_SIZE =8 + SL_NODE_VAR_PKT_SIZE =8, + SL_NODE_STATS_NEEDED = 0x10 }; @@ -82,7 +83,8 @@ private: double m_next_time_offset; /* in sec */ uint16_t m_action_counter; - uint16_t m_pad11; + uint8_t m_stat_hw_id; // hw id used to count rx and tx stats + uint8_t m_pad11; uint32_t m_pad12; stream_state_t m_state; @@ -269,6 +271,22 @@ public: return ( m_socket_id ); } + void set_stat_hw_id(uint16_t hw_id) { + m_stat_hw_id = hw_id; + } + + socket_id_t get_stat_hw_id() { + return ( m_stat_hw_id ); + } + + inline void set_stat_needed() { + m_flags |= SL_NODE_STATS_NEEDED; + } + + inline bool is_stat_needed() { + return ((m_flags & SL_NODE_STATS_NEEDED) != 0); + } + inline void set_mbuf_cache_dir(pkt_dir_t dir){ if (dir) { m_flags |=NODE_FLAGS_DIR; |