summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp/trex_streams_compiler.cpp
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-03-29 15:01:39 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-03-29 15:02:02 +0300
commitffaa6fd004c93d1c8307fe70d4e702624a346ab4 (patch)
tree91a54ac0c8efe9180004a2b92b672c2e45fd9923 /src/stateless/cp/trex_streams_compiler.cpp
parentdfbd4594242827d372c27a08599ed1227ae763a1 (diff)
flow stat - track flow states
Diffstat (limited to 'src/stateless/cp/trex_streams_compiler.cpp')
-rw-r--r--src/stateless/cp/trex_streams_compiler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stateless/cp/trex_streams_compiler.cpp b/src/stateless/cp/trex_streams_compiler.cpp
index 563236c2..d6971d68 100644
--- a/src/stateless/cp/trex_streams_compiler.cpp
+++ b/src/stateless/cp/trex_streams_compiler.cpp
@@ -477,8 +477,10 @@ TrexStreamsCompiler::compile_stream(TrexStream *stream,
TrexStream *fixed_rx_flow_stat_stream = stream->clone(true);
- // not checking for errors. We assume that if add_stream succeeded, start_stream will too.
- get_stateless_obj()->m_rx_flow_stat.start_stream(fixed_rx_flow_stat_stream, fixed_rx_flow_stat_stream->m_rx_check.m_hw_id);
+ get_stateless_obj()->m_rx_flow_stat.start_stream(fixed_rx_flow_stat_stream);
+ // CFlowStatRuleMgr keeps state of the stream object. We duplicated the stream here (in order not
+ // change the packet kept in the stream). We want the state to be saved in the original stream.
+ get_stateless_obj()->m_rx_flow_stat.copy_state(fixed_rx_flow_stat_stream, stream);
/* can this stream be split to many cores ? */
if (!stream->is_splitable(dp_core_count)) {