From 0e3021bb883b10403efab042e8c308d9fa7c4630 Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Thu, 24 Dec 2015 15:58:38 +0200 Subject: improve multi-core random VM support --- src/stateless/dp/trex_stateless_dp_core.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/stateless/dp/trex_stateless_dp_core.cpp') diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp index 585ff2c7..f43f0d3a 100644 --- a/src/stateless/dp/trex_stateless_dp_core.cpp +++ b/src/stateless/dp/trex_stateless_dp_core.cpp @@ -69,6 +69,9 @@ void CGenNodeStateless::Dump(FILE *fd){ } +/** + * this function called when stream restart after it was inactive + */ void CGenNodeStateless::refresh(){ /* refill the stream info */ @@ -124,7 +127,8 @@ rte_mbuf_t * CGenNodeStateless::alloc_node_with_vm(){ /* run the VM program */ StreamDPVmInstructionsRunner runner; - runner.run( m_vm_program_size, + runner.run( (uint32_t*)m_vm_flow_var, + m_vm_program_size, m_vm_program, m_vm_flow_var, (uint8_t*)p); @@ -302,7 +306,7 @@ bool TrexStatelessDpCore::set_stateless_next_node(CGenNodeStateless * cur_node, /* can't be FREE_RESUSE */ assert(state != CGenNodeStateless::ss_FREE_RESUSE); - if (next_node->get_state() == CGenNodeStateless::ss_INACTIVE ) { + if (state == CGenNodeStateless::ss_INACTIVE ) { /* refill start info and scedule, no update in active streams */ next_node->refresh(); -- cgit 1.2.3-korg