diff options
Diffstat (limited to 'src/stateless/dp')
-rw-r--r-- | src/stateless/dp/trex_stateless_dp_core.cpp | 8 | ||||
-rw-r--r-- | src/stateless/dp/trex_stream_node.h | 4 |
2 files changed, 9 insertions, 3 deletions
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(); diff --git a/src/stateless/dp/trex_stream_node.h b/src/stateless/dp/trex_stream_node.h index d33785fe..c9c0de43 100644 --- a/src/stateless/dp/trex_stream_node.h +++ b/src/stateless/dp/trex_stream_node.h @@ -102,11 +102,13 @@ private: uint8_t * m_vm_flow_var; /* pointer to the vm flow var */ uint8_t * m_vm_program; /* pointer to the program */ uint16_t m_vm_program_size; /* up to 64K op codes */ + uint16_t m_pad2; + uint32_t m_pad3; /* End Fast Field VM Section */ /* pad to match the size of CGenNode */ - uint8_t m_pad_end[30]; + uint8_t m_pad_end[20]; public: |