summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp/trex_stateless.h
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-10-08 17:39:51 +0200
committerimarom <imarom@cisco.com>2015-10-08 17:39:51 +0200
commitd7af282dc1cd629c251a937c9aa88a9a5a47030b (patch)
tree87649c01f9f65bfd9acfbafa61f2f7ca901b6c64 /src/stateless/cp/trex_stateless.h
parentd56d0665470dd3c8959c8945162df13827b9d4c6 (diff)
first integration with DPDK layer
Diffstat (limited to 'src/stateless/cp/trex_stateless.h')
-rw-r--r--src/stateless/cp/trex_stateless.h27
1 files changed, 23 insertions, 4 deletions
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 <TrexStatelessPort *> m_ports;
uint8_t m_port_count;
+ /* cores */
+ uint8_t m_dp_core_count;
+
/* stats */
TrexStatelessStats m_stats;
};