X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_lcore.h;h=b8f4b7c093664ac6e72f56f9d68ffa6aa84cb5a2;hb=c662f30dbe45c0827261d42b8082d73ab9b2be8e;hp=f9308c40bce4dd934843efe533cbdc7ca13b7967;hpb=af75078fece3615088e561357c1e97603e43a5fe;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h index f9308c40bc..b8f4b7c093 100644 --- a/lib/librte_eal/common/include/rte_lcore.h +++ b/lib/librte_eal/common/include/rte_lcore.h @@ -30,7 +30,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * version: DPDK.L.1.2.3-3 */ #ifndef _RTE_LCORE_H_ @@ -93,15 +92,17 @@ rte_lcore_count(void) #include -#ifdef __DOXYGEN__ /** * Return the ID of the physical socket of the logical core we are * running on. * @return - * Socket ID + * the ID of current lcoreid's physical socket */ static inline unsigned -rte_socket_id(void); +rte_socket_id(void) +{ + return lcore_config[rte_lcore_id()].socket_id; +} /** * Get the ID of the physical socket of the specified lcore @@ -112,10 +113,10 @@ rte_socket_id(void); * the ID of lcoreid's physical socket */ static inline unsigned -rte_lcore_to_socket_id(unsigned lcore_id); - -#endif - +rte_lcore_to_socket_id(unsigned lcore_id) +{ + return lcore_config[lcore_id].socket_id; +} /** * Test if an lcore is enabled.