summaryrefslogtreecommitdiffstats
path: root/src/stateless/dp/trex_stateless_dp_core.cpp
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-12-24 16:07:41 +0200
committerHanoh Haim <hhaim@cisco.com>2015-12-24 16:07:41 +0200
commit32bdea5fd30ffc378a213e773634015a5d5f255f (patch)
tree23afb583991085dde25a59ff0f88c81de4adc59f /src/stateless/dp/trex_stateless_dp_core.cpp
parent0e3021bb883b10403efab042e8c308d9fa7c4630 (diff)
add refresh option to stream - should be enabled by stream bit
Diffstat (limited to 'src/stateless/dp/trex_stateless_dp_core.cpp')
-rw-r--r--src/stateless/dp/trex_stateless_dp_core.cpp16
1 files changed, 16 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
}