From d7af282dc1cd629c251a937c9aa88a9a5a47030b Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 8 Oct 2015 17:39:51 +0200 Subject: first integration with DPDK layer --- src/stateless/cp/trex_stateless.h | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'src/stateless/cp/trex_stateless.h') diff --git a/src/stateless/cp/trex_stateless.h b/src/stateless/cp/trex_stateless.h index 02eda7e2..5c674fd6 100644 --- a/src/stateless/cp/trex_stateless.h +++ b/src/stateless/cp/trex_stateless.h @@ -83,9 +83,10 @@ class TrexStatelessCfg { public: /* default values */ TrexStatelessCfg() { - m_port_count = 0; - m_rpc_req_resp_cfg = NULL; - m_rpc_async_cfg = NULL; + m_port_count = 0; + m_dp_core_count = 0; + m_rpc_req_resp_cfg = NULL; + m_rpc_async_cfg = NULL; m_rpc_server_verbose = false; } @@ -93,6 +94,7 @@ public: const TrexRpcServerConfig *m_rpc_async_cfg; bool m_rpc_server_verbose; uint8_t m_port_count; + uint8_t m_dp_core_count; }; /** @@ -107,7 +109,7 @@ public: * reconfiguration is not allowed * an exception will be thrown */ - static void create(const TrexStatelessCfg &cfg); + static void configure(const TrexStatelessCfg &cfg); /** * destroy the instance @@ -129,9 +131,23 @@ public: return instance; } + /** + * starts the control plane side + * + */ + void launch_control_plane(); + + /** + * launch on a single DP core + * + */ + void launch_on_dp_core(); + TrexStatelessPort * get_port_by_id(uint8_t port_id); uint8_t get_port_count(); + uint8_t get_dp_core_count(); + /** * update all the stats (deep update) * (include all the ports and global stats) @@ -168,6 +184,9 @@ protected: std::vector m_ports; uint8_t m_port_count; + /* cores */ + uint8_t m_dp_core_count; + /* stats */ TrexStatelessStats m_stats; }; -- cgit 1.2.3-korg