From a6af2a8e624c62d9a347215321c6562f28879d97 Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 3 Dec 2015 06:07:20 -0500 Subject: various fixes (each one is a minor one) --- src/stateless/cp/trex_streams_compiler.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/stateless/cp/trex_streams_compiler.h') diff --git a/src/stateless/cp/trex_streams_compiler.h b/src/stateless/cp/trex_streams_compiler.h index a4c12f8d..c1cf3811 100644 --- a/src/stateless/cp/trex_streams_compiler.h +++ b/src/stateless/cp/trex_streams_compiler.h @@ -157,6 +157,7 @@ public: return m_rate_events; } + private: void add_rate_event(const rate_event_st &ev) { -- cgit From 3aa3a83fe7b7d066ac910140c58cef1939de2baa Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 3 Dec 2015 11:14:22 -0500 Subject: burst bug - generate compiler object per core send message per core instead of duplicating it --- src/stateless/cp/trex_streams_compiler.h | 36 +++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'src/stateless/cp/trex_streams_compiler.h') diff --git a/src/stateless/cp/trex_streams_compiler.h b/src/stateless/cp/trex_streams_compiler.h index c1cf3811..93a63061 100644 --- a/src/stateless/cp/trex_streams_compiler.h +++ b/src/stateless/cp/trex_streams_compiler.h @@ -38,9 +38,10 @@ class GraphNodeMap; */ class TrexStreamsCompiledObj { friend class TrexStreamsCompiler; + public: - TrexStreamsCompiledObj(uint8_t port_id, double m_mul); + TrexStreamsCompiledObj(uint8_t port_id); ~TrexStreamsCompiledObj(); struct obj_st { @@ -56,32 +57,22 @@ public: return (m_port_id); } - /** - * clone the compiled object - * - */ - TrexStreamsCompiledObj * clone(); - - double get_multiplier(){ - return (m_mul); - } - bool get_all_streams_continues(){ return (m_all_continues); } void Dump(FILE *fd); + TrexStreamsCompiledObj* clone(); + private: - void add_compiled_stream(TrexStream * stream, - uint32_t my_dp_id, int next_dp_id); - void add_compiled_stream(TrexStream * stream); + void add_compiled_stream(TrexStream *stream); + std::vector m_objs; bool m_all_continues; uint8_t m_port_id; - double m_mul; }; class TrexStreamsCompiler { @@ -93,7 +84,13 @@ public: * @author imarom (28-Oct-15) * */ - bool compile(const std::vector &streams, TrexStreamsCompiledObj &obj, std::string *fail_msg = NULL); + bool compile(uint8_t port_id, + uint8_t dp_core_count, + double factor, + const std::vector &streams, + std::vector &objs, + std::string *fail_msg = NULL); + /** * @@ -115,8 +112,13 @@ private: void add_warning(const std::string &warning); void err(const std::string &err); + void compile_stream(const TrexStream *stream, + double factor, + uint8_t dp_core_count, + std::vector &objs, + GraphNodeMap &nodes); + std::vector m_warnings; - }; class TrexStreamsGraph; -- cgit From 23e1f07edcd8289f09a1477c416ce260d1a0a804 Mon Sep 17 00:00:00 2001 From: imarom Date: Sun, 6 Dec 2015 03:53:35 -0500 Subject: moved gtest to new compile API --- src/stateless/cp/trex_streams_compiler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stateless/cp/trex_streams_compiler.h') diff --git a/src/stateless/cp/trex_streams_compiler.h b/src/stateless/cp/trex_streams_compiler.h index 93a63061..e193a749 100644 --- a/src/stateless/cp/trex_streams_compiler.h +++ b/src/stateless/cp/trex_streams_compiler.h @@ -85,10 +85,10 @@ public: * */ bool compile(uint8_t port_id, - uint8_t dp_core_count, - double factor, const std::vector &streams, std::vector &objs, + uint8_t dp_core_count = 1, + double factor = 1.0, std::string *fail_msg = NULL); -- cgit