summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-04-10 16:03:30 +0300
committerimarom <imarom@cisco.com>2016-04-10 16:03:30 +0300
commit6cc14297a730765a83691a2efcf6a6b18a864405 (patch)
tree3f246f5bc74be1d2242d86d6bf28a5c3f9d3538d
parenta561b3767f8701a729b2d6668b4b5721fd74a5ec (diff)
factor was broken
-rw-r--r--scripts/automation/regression/functional_tests/stl_basic_tests.py2
-rw-r--r--src/stateless/cp/trex_streams_compiler.cpp10
-rw-r--r--src/stateless/cp/trex_streams_compiler.h2
3 files changed, 5 insertions, 9 deletions
diff --git a/scripts/automation/regression/functional_tests/stl_basic_tests.py b/scripts/automation/regression/functional_tests/stl_basic_tests.py
index c8a51f6a..ecb7b465 100644
--- a/scripts/automation/regression/functional_tests/stl_basic_tests.py
+++ b/scripts/automation/regression/functional_tests/stl_basic_tests.py
@@ -305,6 +305,6 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
]
for mc_test in mc_tests:
- rc = self.run_sim(mc_test, output = None, options = '--test_multi_core --limit=3840', silent = True)
+ rc = self.run_sim(mc_test, output = None, options = '--test_multi_core --limit=3840 -m 27kpps', silent = True)
assert_equal(rc, True)
diff --git a/src/stateless/cp/trex_streams_compiler.cpp b/src/stateless/cp/trex_streams_compiler.cpp
index 520868c4..d1cffbb7 100644
--- a/src/stateless/cp/trex_streams_compiler.cpp
+++ b/src/stateless/cp/trex_streams_compiler.cpp
@@ -550,17 +550,17 @@ TrexStreamsCompiler::compile_stream(TrexStream *stream,
// 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);
+ fixed_rx_flow_stat_stream->update_rate_factor(factor);
+
/* can this stream be split to many cores ? */
if ( (dp_core_count == 1) || (!stream->is_splitable(dp_core_count)) ) {
compile_stream_on_single_core(fixed_rx_flow_stat_stream,
- factor,
dp_core_count,
objs,
new_id,
new_next_id);
} else {
compile_stream_on_all_cores(fixed_rx_flow_stat_stream,
- factor,
dp_core_count,
objs,
new_id,
@@ -576,7 +576,6 @@ TrexStreamsCompiler::compile_stream(TrexStream *stream,
*/
void
TrexStreamsCompiler::compile_stream_on_all_cores(TrexStream *stream,
- double factor,
uint8_t dp_core_count,
std::vector<TrexStreamsCompiledObj *> &objs,
int new_id,
@@ -589,7 +588,7 @@ TrexStreamsCompiler::compile_stream_on_all_cores(TrexStream *stream,
int remainder_left = burst_remainder;
/* this is the stream base IPG (pre split) */
- double base_ipg_sec = factor * stream->get_ipg_sec();
+ double base_ipg_sec = stream->get_ipg_sec();
/* for each core - creates its own version of the stream */
@@ -607,7 +606,7 @@ TrexStreamsCompiler::compile_stream_on_all_cores(TrexStream *stream,
dp_stream->m_burst_total_pkts = per_core_burst_total_pkts;
/* rate is slower * dp_core_count */
- dp_stream->update_rate_factor(factor / dp_core_count);
+ dp_stream->update_rate_factor(1.0 / dp_core_count);
if (remainder_left > 0) {
@@ -641,7 +640,6 @@ TrexStreamsCompiler::compile_stream_on_all_cores(TrexStream *stream,
*/
void
TrexStreamsCompiler::compile_stream_on_single_core(TrexStream *stream,
- double factor,
uint8_t dp_core_count,
std::vector<TrexStreamsCompiledObj *> &objs,
int new_id,
diff --git a/src/stateless/cp/trex_streams_compiler.h b/src/stateless/cp/trex_streams_compiler.h
index d910f216..23b06d06 100644
--- a/src/stateless/cp/trex_streams_compiler.h
+++ b/src/stateless/cp/trex_streams_compiler.h
@@ -147,14 +147,12 @@ private:
GraphNodeMap &nodes);
void compile_stream_on_single_core(TrexStream *stream,
- double factor,
uint8_t dp_core_count,
std::vector<TrexStreamsCompiledObj *> &objs,
int new_id,
int new_next_id);
void compile_stream_on_all_cores(TrexStream *stream,
- double factor,
uint8_t dp_core_count,
std::vector<TrexStreamsCompiledObj *> &objs,
int new_id,