diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-11 19:06:13 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-19 11:23:46 +0200 |
commit | e4c8e44b0842093ce2a245e863a8db7f4c2ae9ff (patch) | |
tree | f1c92ff366088eb5250d56d22058cb6db7f41aeb /src/stateless/dp/trex_stateless_dp_core.cpp | |
parent | 057a1ec1e70584f3598e9980bb44f70f73065bac (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_stateless_dp_core.cpp')
-rw-r--r-- | src/stateless/dp/trex_stateless_dp_core.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp index 485e8533..6f9376c2 100644 --- a/src/stateless/dp/trex_stateless_dp_core.cpp +++ b/src/stateless/dp/trex_stateless_dp_core.cpp @@ -478,6 +478,7 @@ bool TrexStatelessDpPerPort::pause_traffic(uint8_t port_id){ bool TrexStatelessDpPerPort::push_pcap(uint8_t port_id, const std::string &pcap_filename, double ipg_usec, + double min_ipg_sec, double speedup, uint32_t count, bool is_dual) { @@ -508,6 +509,7 @@ bool TrexStatelessDpPerPort::push_pcap(uint8_t port_id, slave_mac_addr, pcap_filename, ipg_usec, + min_ipg_sec, speedup, count, is_dual); @@ -1169,6 +1171,7 @@ TrexStatelessDpCore::push_pcap(uint8_t port_id, int event_id, const std::string &pcap_filename, double ipg_usec, + double m_min_ipg_sec, double speedup, uint32_t count, double duration, @@ -1179,7 +1182,7 @@ TrexStatelessDpCore::push_pcap(uint8_t port_id, lp_port->set_event_id(event_id); /* delegate the command to the port */ - bool rc = lp_port->push_pcap(port_id, pcap_filename, ipg_usec, speedup, count, is_dual); + bool rc = lp_port->push_pcap(port_id, pcap_filename, ipg_usec, m_min_ipg_sec, speedup, count, is_dual); if (!rc) { /* report back that we stopped */ CNodeRing *ring = CMsgIns::Ins()->getCpDp()->getRingDpToCp(m_core->m_thread_id); @@ -1263,6 +1266,7 @@ bool CGenNodePCAP::create(uint8_t port_id, 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) { @@ -1275,13 +1279,14 @@ bool CGenNodePCAP::create(uint8_t port_id, m_count = count; m_is_dual = is_dual; m_dir = dir; + m_min_ipg_sec = min_ipg_sec; /* mark this node as slow path */ set_slow_path(true); if (ipg_usec != -1) { /* fixed IPG */ - m_ipg_sec = usec_to_sec(ipg_usec / speedup); + m_ipg_sec = std::max(min_ipg_sec, usec_to_sec(ipg_usec / speedup)); m_speedup = 0; } else { /* packet IPG */ |