summaryrefslogtreecommitdiffstats
path: root/src/stateless/dp/trex_stream_node.h
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-26 06:26:27 -0500
committerimarom <imarom@cisco.com>2015-11-26 06:26:27 -0500
commit59548ae8f65f8aa387900a321b437b8501046fde (patch)
tree6f6406331b7e2f7bc49192a7b240768ea5c88a1e /src/stateless/dp/trex_stream_node.h
parentd9a11302236095e055247295021bdfce6c988802 (diff)
Hanoch's review - changed update model to differential
also, graph is calculated on demand and once for each update
Diffstat (limited to 'src/stateless/dp/trex_stream_node.h')
-rw-r--r--src/stateless/dp/trex_stream_node.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/stateless/dp/trex_stream_node.h b/src/stateless/dp/trex_stream_node.h
index 5997376f..111af845 100644
--- a/src/stateless/dp/trex_stream_node.h
+++ b/src/stateless/dp/trex_stream_node.h
@@ -86,9 +86,8 @@ private:
TrexStream * m_ref_stream_info; /* the stream info */
CGenNodeStateless * m_next_stream;
- double m_base_pps;
/* pad to match the size of CGenNode */
- uint8_t m_pad_end[48];
+ uint8_t m_pad_end[56];
@@ -105,8 +104,9 @@ public:
* on the PPS and multiplier
*
*/
- void set_multiplier(double mul) {
- m_next_time_offset = 1.0 / (m_base_pps * mul) ;
+ void update_rate(double factor) {
+ /* update the inter packet gap */
+ m_next_time_offset = m_next_time_offset / factor;
}
/* we restart the stream, schedule it using stream isg */