diff options
author | imarom <imarom@cisco.com> | 2016-04-10 10:15:54 +0300 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-04-10 12:37:21 +0300 |
commit | c48c89a97ad070b8f79ac746b6b83aab1cc6f177 (patch) | |
tree | b7842d488afe01f29e0f218b9dc9db85bb03afa9 /src/stateless/dp | |
parent | f39e572d1fbbf17aa7c9e071b9c056ab85f894a5 (diff) |
multicore scheduling
Diffstat (limited to 'src/stateless/dp')
-rw-r--r-- | src/stateless/dp/trex_stateless_dp_core.cpp | 2 | ||||
-rw-r--r-- | src/stateless/dp/trex_stream_node.h | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp index 42ff9e24..2a4a384b 100644 --- a/src/stateless/dp/trex_stateless_dp_core.cpp +++ b/src/stateless/dp/trex_stateless_dp_core.cpp @@ -602,7 +602,7 @@ TrexStatelessDpCore::add_stream(TrexStatelessDpPerPort * lp_port, node->m_state =CGenNodeStateless::ss_INACTIVE; } - node->m_time = m_core->m_cur_time_sec + usec_to_sec(stream->m_isg_usec); + node->m_time = m_core->m_cur_time_sec + usec_to_sec(stream->m_isg_usec) + stream->m_mc_phase_pre_sec; pkt_dir_t dir = m_core->m_node_gen.m_v_if->port_id_to_dir(stream->m_port_id); node->m_flags = 0; diff --git a/src/stateless/dp/trex_stream_node.h b/src/stateless/dp/trex_stream_node.h index fa6fd8bd..d756ba43 100644 --- a/src/stateless/dp/trex_stream_node.h +++ b/src/stateless/dp/trex_stream_node.h @@ -144,7 +144,7 @@ public: /* we restart the stream, schedule it using stream isg */ inline void update_refresh_time(double cur_time){ - m_time = cur_time + usec_to_sec(m_ref_stream_info->m_isg_usec); + m_time = cur_time + usec_to_sec(m_ref_stream_info->m_isg_usec) + m_ref_stream_info->m_mc_phase_pre_sec; } inline bool is_mask_for_free(){ @@ -236,8 +236,7 @@ public: set_state(CGenNodeStateless::ss_INACTIVE); if ( thread->set_stateless_next_node(this,m_next_stream) ){ /* update the next stream time using isg */ - //m_next_stream->update_refresh_time(m_time + m_next_time_offset); - m_next_stream->update_refresh_time(m_time + m_ref_stream_info->m_delay_next_stream_sec); + m_next_stream->update_refresh_time(m_time + m_ref_stream_info->m_mc_phase_post_sec); thread->m_node_gen.m_p_queue.push( (CGenNode *)m_next_stream); }else{ @@ -246,7 +245,7 @@ public: } }else{ - m_time += get_multi_ibg_sec(); + m_time += get_multi_ibg_sec() + m_ref_stream_info->m_mc_phase_post_sec + m_ref_stream_info->m_mc_phase_pre_sec; m_single_burst = m_single_burst_refill; thread->m_node_gen.m_p_queue.push( (CGenNode *)this); } |