summaryrefslogtreecommitdiffstats
path: root/src/stateless
diff options
context:
space:
mode:
Diffstat (limited to 'src/stateless')
-rw-r--r--src/stateless/cp/trex_stream.cpp9
-rw-r--r--src/stateless/cp/trex_streams_compiler.cpp6
2 files changed, 13 insertions, 2 deletions
diff --git a/src/stateless/cp/trex_stream.cpp b/src/stateless/cp/trex_stream.cpp
index 9c7898a8..e3f0ba7c 100644
--- a/src/stateless/cp/trex_stream.cpp
+++ b/src/stateless/cp/trex_stream.cpp
@@ -106,6 +106,15 @@ void TrexStream::Dump(FILE *fd){
}
}
+ if (m_rx_check.m_enabled) {
+ fprintf(fd, " Flow stat enabled:\n");
+ fprintf(fd, " seq check %s latency check %s packet group id %d hw_id %d\n"
+ , m_rx_check.m_seq_enabled ? "enabled":"disabled"
+ , m_rx_check.m_latency ? "enabled":"disabled", m_rx_check.m_pg_id, m_rx_check.m_hw_id
+ );
+ } else {
+ fprintf(fd, " Flow stat disabled\n");
+ }
fprintf(fd," rate :\n\n");
fprintf(fd," pps : %f\n", m_rate.get_pps());
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)) {