* (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_
#include <exec-env/rte_lcore.h>
-#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
* 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.