diff options
author | imarom <imarom@cisco.com> | 2016-01-07 04:38:38 -0500 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-01-07 04:52:14 -0500 |
commit | 2dff2ccf6fd6e4dae2556c1cf392473989a826b9 (patch) | |
tree | f294070fc49d0c6cf1b7733dd42c6bbe281e71be /src/stateless | |
parent | 72ca9e76d4c6a5fe48e8cd7e1e49b9e54e40fca9 (diff) |
yet another stateless simulation phase
Diffstat (limited to 'src/stateless')
-rw-r--r-- | src/stateless/cp/trex_stateless_port.cpp | 10 | ||||
-rw-r--r-- | src/stateless/cp/trex_stateless_port.h | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/stateless/cp/trex_stateless_port.cpp b/src/stateless/cp/trex_stateless_port.cpp index aa34e87b..0055b5ef 100644 --- a/src/stateless/cp/trex_stateless_port.cpp +++ b/src/stateless/cp/trex_stateless_port.cpp @@ -589,6 +589,16 @@ TrexStatelessPort::validate(void) { } + +void +TrexStatelessPort::get_port_effective_rate(uint64_t &bps, uint64_t &pps) { + if (!m_graph_obj) { + return; + } + bps = m_graph_obj->get_max_bps() * m_factor; + pps = m_graph_obj->get_max_pps() * m_factor; +} + /************* Trex Port Owner **************/ TrexPortOwner::TrexPortOwner() { diff --git a/src/stateless/cp/trex_stateless_port.h b/src/stateless/cp/trex_stateless_port.h index 784bf4c0..d0e75744 100644 --- a/src/stateless/cp/trex_stateless_port.h +++ b/src/stateless/cp/trex_stateless_port.h @@ -302,6 +302,17 @@ public: return m_owner; } + + /** + * get the port effective rate (on a started / paused port) + * + * @author imarom (07-Jan-16) + * + * @param bps + * @param pps + */ + void get_port_effective_rate(uint64_t &bps, uint64_t &pps); + private: |