diff options
author | imarom <imarom@cisco.com> | 2016-11-02 13:46:05 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-11-02 13:52:16 +0200 |
commit | 5ab7411f67636afc407701d4cf87a5060e5b8aa9 (patch) | |
tree | 261446f44c1f8d7edf5aa16c0f48c7ebe3a28c3d /src/bp_sim.h | |
parent | aafa0ec65f83a6cb9f14782d90df42a8e6e412c3 (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.h')
-rwxr-xr-x | src/bp_sim.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/bp_sim.h b/src/bp_sim.h index f7a1e73c..cd0f6a13 100755 --- a/src/bp_sim.h +++ b/src/bp_sim.h @@ -957,10 +957,16 @@ public: /* return the map betwean virtual to phy id */ virtual physical_thread_id_t thread_virt_to_phy(virtual_thread_id_t virt_id)=0; - virtual bool thread_phy_is_master(physical_thread_id_t phy_id)=0; + + virtual physical_thread_id_t get_master_phy_id() = 0; virtual bool thread_phy_is_rx(physical_thread_id_t phy_id)=0; virtual void dump(FILE *fd)=0; + + bool thread_phy_is_master(physical_thread_id_t phy_id) { + return (get_master_phy_id() == phy_id); + } + }; class CPlatformSocketInfoNoConfig : public CPlatformSocketInfoBase { @@ -999,7 +1005,7 @@ public: /* return the map betwean virtual to phy id */ physical_thread_id_t thread_virt_to_phy(virtual_thread_id_t virt_id); - bool thread_phy_is_master(physical_thread_id_t phy_id); + physical_thread_id_t get_master_phy_id(); bool thread_phy_is_rx(physical_thread_id_t phy_id); virtual void dump(FILE *fd); @@ -1045,7 +1051,7 @@ public: /* return the map betwean virtual to phy id */ physical_thread_id_t thread_virt_to_phy(virtual_thread_id_t virt_id); - bool thread_phy_is_master(physical_thread_id_t phy_id); + physical_thread_id_t get_master_phy_id(); bool thread_phy_is_rx(physical_thread_id_t phy_id); public: @@ -1110,6 +1116,7 @@ public: physical_thread_id_t thread_virt_to_phy(virtual_thread_id_t virt_id); bool thread_phy_is_master(physical_thread_id_t phy_id); + physical_thread_id_t get_master_phy_id(); bool thread_phy_is_rx(physical_thread_id_t phy_id); void dump(FILE *fd); |