From 5ab7411f67636afc407701d4cf87a5060e5b8aa9 Mon Sep 17 00:00:00 2001 From: imarom Date: Wed, 2 Nov 2016 13:46:05 +0200 Subject: 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 --- src/bp_sim.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/bp_sim.cpp') 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)); } -- cgit 1.2.3-korg