summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp/trex_vm_splitter.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-12-22 08:12:16 -0500
committerimarom <imarom@cisco.com>2015-12-23 09:59:40 -0500
commit16130b77af4f966b1f794f27b75265d76ee96dea (patch)
tree15378997c61a480e94093f5af658404885763e74 /src/stateless/cp/trex_vm_splitter.cpp
parent0901331fc21088307fc4a264d5b38089a1ce7f1a (diff)
some fixes to the VM and the splitter
Diffstat (limited to 'src/stateless/cp/trex_vm_splitter.cpp')
-rw-r--r--src/stateless/cp/trex_vm_splitter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/stateless/cp/trex_vm_splitter.cpp b/src/stateless/cp/trex_vm_splitter.cpp
index 489e3b75..8aae8c76 100644
--- a/src/stateless/cp/trex_vm_splitter.cpp
+++ b/src/stateless/cp/trex_vm_splitter.cpp
@@ -89,9 +89,8 @@ TrexVmSplitter::split_by_flow_var(const StreamVmInstructionFlowMan *instr) {
return false;
}
- /* if the range is too small - multiply */
+ /* if the range is too small - it is unsplitable */
if (instr->get_range() < m_dp_core_count) {
- // FIXME
return false;
}
@@ -118,8 +117,8 @@ TrexVmSplitter::split_by_flow_var(const StreamVmInstructionFlowMan *instr) {
per_core_instr->m_min_value = start;
per_core_instr->m_max_value = end;
- /* init value is the max value because the VM program's first iteration */
- per_core_instr->m_init_value = end;
+ /* after split this has no meaning - choose it as we see fit */
+ per_core_instr->m_init_value = (per_core_instr->m_op == StreamVmInstructionFlowMan::FLOW_VAR_OP_DEC ? end : start);
core_stream->vm_compile();