summaryrefslogtreecommitdiffstats
path: root/src/bp_sim.cpp
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-11-02 13:46:05 +0200
committerimarom <imarom@cisco.com>2016-11-02 13:52:16 +0200
commit5ab7411f67636afc407701d4cf87a5060e5b8aa9 (patch)
tree261446f44c1f8d7edf5aa16c0f48c7ebe3a28c3d /src/bp_sim.cpp
parentaafa0ec65f83a6cb9f14782d90df42a8e6e412c3 (diff)
Trex threads - pin DPDK master thread to the master core
also, some names to the threads to make things clear and a script to show them Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'src/bp_sim.cpp')
-rwxr-xr-xsrc/bp_sim.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp
index 24959b7b..62e8d822 100755
--- a/src/bp_sim.cpp
+++ b/src/bp_sim.cpp
@@ -177,8 +177,8 @@ physical_thread_id_t CPlatformSocketInfoNoConfig::thread_virt_to_phy(virtual_thr
return (virt_id);
}
-bool CPlatformSocketInfoNoConfig::thread_phy_is_master(physical_thread_id_t phy_id){
- return (phy_id==0);
+physical_thread_id_t CPlatformSocketInfoNoConfig::get_master_phy_id() {
+ return (0);
}
bool CPlatformSocketInfoNoConfig::thread_phy_is_rx(physical_thread_id_t phy_id){
@@ -402,8 +402,8 @@ physical_thread_id_t CPlatformSocketInfoConfig::thread_virt_to_phy(virtual_threa
return ( m_thread_virt_to_phy[virt_id]);
}
-bool CPlatformSocketInfoConfig::thread_phy_is_master(physical_thread_id_t phy_id){
- return (m_platform->m_master_thread==phy_id?true:false);
+physical_thread_id_t CPlatformSocketInfoConfig::get_master_phy_id() {
+ return m_platform->m_master_thread;
}
bool CPlatformSocketInfoConfig::thread_phy_is_rx(physical_thread_id_t phy_id){
@@ -481,6 +481,10 @@ bool CPlatformSocketInfo::thread_phy_is_master(physical_thread_id_t phy_id){
return ( m_obj->thread_phy_is_master(phy_id));
}
+physical_thread_id_t CPlatformSocketInfo::get_master_phy_id() {
+ return ( m_obj->get_master_phy_id());
+}
+
bool CPlatformSocketInfo::thread_phy_is_rx(physical_thread_id_t phy_id) {
return ( m_obj->thread_phy_is_rx(phy_id));
}