diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/stateless/dp/trex_stateless_dp_core.cpp | 16 | ||||
-rw-r--r-- | src/stateless/dp/trex_stream_node.h | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp index f43f0d3a..f73824bc 100644 --- a/src/stateless/dp/trex_stateless_dp_core.cpp +++ b/src/stateless/dp/trex_stateless_dp_core.cpp @@ -69,6 +69,16 @@ void CGenNodeStateless::Dump(FILE *fd){ } + +void CGenNodeStateless::refresh_vm_bss(){ + if ( m_vm_flow_var ) { + StreamVmDp * vm_s=m_ref_stream_info->m_vm_dp; + assert(vm_s); + memcpy(m_vm_flow_var,vm_s->get_bss(),vm_s->get_bss_size()); + } +} + + /** * this function called when stream restart after it was inactive */ @@ -78,6 +88,12 @@ void CGenNodeStateless::refresh(){ m_single_burst = m_single_burst_refill; m_multi_bursts = m_ref_stream_info->m_num_bursts; m_state = CGenNodeStateless::ss_ACTIVE; + + /* refresh init value */ +#if 0 + /* TBD should add a JSON varible for that */ + refresh_vm_bss(); +#endif } diff --git a/src/stateless/dp/trex_stream_node.h b/src/stateless/dp/trex_stream_node.h index c9c0de43..70a66e6a 100644 --- a/src/stateless/dp/trex_stream_node.h +++ b/src/stateless/dp/trex_stream_node.h @@ -331,6 +331,11 @@ public: void Dump(FILE *fd); +private: + + void refresh_vm_bss(); + + } __rte_cache_aligned; static_assert(sizeof(CGenNodeStateless) == sizeof(CGenNode), "sizeof(CGenNodeStateless) != sizeof(CGenNode)" ); |