summaryrefslogtreecommitdiffstats
path: root/src/stateless/dp/trex_stream_node.h
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-12-11 19:06:13 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-12-19 11:23:46 +0200
commite4c8e44b0842093ce2a245e863a8db7f4c2ae9ff (patch)
treef1c92ff366088eb5250d56d22058cb6db7f41aeb /src/stateless/dp/trex_stream_node.h
parent057a1ec1e70584f3598e9980bb44f70f73065bac (diff)
add min_ipg to push_pcaps
Change-Id: I353f8903c40963517fd2fed721cc0671d9f6dc4b Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src/stateless/dp/trex_stream_node.h')
-rw-r--r--src/stateless/dp/trex_stream_node.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stateless/dp/trex_stream_node.h b/src/stateless/dp/trex_stream_node.h
index dda3113a..bc7be057 100644
--- a/src/stateless/dp/trex_stream_node.h
+++ b/src/stateless/dp/trex_stream_node.h
@@ -468,6 +468,7 @@ public:
const uint8_t *slave_mac_addr,
const std::string &pcap_filename,
double ipg_usec,
+ double min_ipg_sec,
double speedup,
uint32_t count,
bool is_dual);
@@ -536,7 +537,7 @@ public:
if (m_ipg_sec != -1) {
return m_ipg_sec;
} else {
- return ((m_raw_packet->get_time() - m_last_pkt_time) / m_speedup);
+ return (std::max(m_min_ipg_sec, (m_raw_packet->get_time() - m_last_pkt_time) / m_speedup));
}
}
@@ -632,6 +633,7 @@ private:
double m_last_pkt_time;
double m_speedup;
double m_ipg_sec;
+ double m_min_ipg_sec;
uint32_t m_count;
double m_next_time_offset; /* in sec */
@@ -644,7 +646,7 @@ private:
bool m_is_dual;
/* pad to match the size of CGenNode */
- uint8_t m_pad_end[19];
+ uint8_t m_pad_end[11];
} __rte_cache_aligned;