summaryrefslogtreecommitdiffstats
path: root/src/stateless/dp/trex_stateless_dp_core.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-10-28 12:45:57 +0200
committerimarom <imarom@cisco.com>2015-10-28 12:45:57 +0200
commitcb8bc9bda11c951b8b91a635d8d4d6df8d5a0ab8 (patch)
treecf63a7ec23094b48bcf59e5c0d95aa6d6aeb4e26 /src/stateless/dp/trex_stateless_dp_core.cpp
parentea0b6efc3a41f425e46d81f4b6b8bbbf3238add1 (diff)
support for multiple streams
Diffstat (limited to 'src/stateless/dp/trex_stateless_dp_core.cpp')
-rw-r--r--src/stateless/dp/trex_stateless_dp_core.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp
index 20eadfc5..0262a80a 100644
--- a/src/stateless/dp/trex_stateless_dp_core.cpp
+++ b/src/stateless/dp/trex_stateless_dp_core.cpp
@@ -20,6 +20,7 @@ limitations under the License.
*/
#include <trex_stateless_dp_core.h>
#include <trex_stateless_messaging.h>
+#include <trex_stream.h>
#include <bp_sim.h>
@@ -74,10 +75,7 @@ TrexStatelessDpCore::handle_pkt_event(CGenNode *node) {
}
void
-TrexStatelessDpCore::start_const_traffic(const uint8_t *pkt,
- uint16_t pkt_len,
- double pps) {
-
+TrexStatelessDpCore::add_cont_stream(double pps, const uint8_t *pkt, uint16_t pkt_len) {
CGenNodeStateless *node = m_core->create_node_sl();
/* add periodic */
@@ -117,7 +115,13 @@ TrexStatelessDpCore::start_const_traffic(const uint8_t *pkt,
m_state = TrexStatelessDpCore::STATE_TRANSMITTING;
m_core->m_node_gen.add_node((CGenNode *)node);
+}
+void
+TrexStatelessDpCore::start_traffic(TrexStreamsCompiledObj *obj) {
+ for (auto single_stream : obj->m_objs) {
+ add_cont_stream(single_stream.m_pps, single_stream.m_pkt, single_stream.m_pkt_len);
+ }
}
void