eal: clean up export of socket id variable
Theres no need to export this variable. Its set and queried from an API call that doesn't exist in the hot path. Instead just export the rte_socket_id symbol and make the variable private to protect it from type changes. We should do this with the other exported variables too, but I think its too late in the release cycle to do that. tested using distributor_autotest (which uses rte_socket_id), successfully. Only tested on linux, as I don't currently have a bsd system spun up, but the changes are symmetric, and should be fine Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Cunming Liang <cunming.liang@intel.com> Acked-by: David Marchand <david.marchand@6wind.com>
This commit is contained in:
parent
ea5c23df30
commit
c3615e4a80
@ -10,7 +10,6 @@ DPDK_2.0 {
|
||||
pci_driver_list;
|
||||
per_lcore__lcore_id;
|
||||
per_lcore__rte_errno;
|
||||
per_lcore__socket_id;
|
||||
rte_cpu_check_supported;
|
||||
rte_cpu_get_flag_enabled;
|
||||
rte_cycles_vmware_tsc_map;
|
||||
@ -82,6 +81,7 @@ DPDK_2.0 {
|
||||
rte_set_log_level;
|
||||
rte_set_log_type;
|
||||
rte_snprintf;
|
||||
rte_socket_id;
|
||||
rte_strerror;
|
||||
rte_strsplit;
|
||||
rte_sys_gettid;
|
||||
|
@ -46,6 +46,13 @@
|
||||
|
||||
#include "eal_thread.h"
|
||||
|
||||
RTE_DECLARE_PER_LCORE(unsigned , _socket_id);
|
||||
|
||||
unsigned rte_socket_id(void)
|
||||
{
|
||||
return RTE_PER_LCORE(_socket_id);
|
||||
}
|
||||
|
||||
int eal_cpuset_socket_id(rte_cpuset_t *cpusetp)
|
||||
{
|
||||
unsigned cpu = 0;
|
||||
|
@ -81,7 +81,6 @@ struct lcore_config {
|
||||
extern struct lcore_config lcore_config[RTE_MAX_LCORE];
|
||||
|
||||
RTE_DECLARE_PER_LCORE(unsigned, _lcore_id); /**< Per thread "lcore id". */
|
||||
RTE_DECLARE_PER_LCORE(unsigned, _socket_id); /**< Per thread "socket id". */
|
||||
RTE_DECLARE_PER_LCORE(rte_cpuset_t, _cpuset); /**< Per thread "cpuset". */
|
||||
|
||||
/**
|
||||
@ -145,11 +144,7 @@ rte_lcore_index(int lcore_id)
|
||||
* @return
|
||||
* the ID of current lcoreid's physical socket
|
||||
*/
|
||||
static inline unsigned
|
||||
rte_socket_id(void)
|
||||
{
|
||||
return RTE_PER_LCORE(_socket_id);
|
||||
}
|
||||
unsigned rte_socket_id(void);
|
||||
|
||||
/**
|
||||
* Get the ID of the physical socket of the specified lcore
|
||||
|
@ -10,7 +10,6 @@ DPDK_2.0 {
|
||||
pci_driver_list;
|
||||
per_lcore__lcore_id;
|
||||
per_lcore__rte_errno;
|
||||
per_lcore__socket_id;
|
||||
rte_cpu_check_supported;
|
||||
rte_cpu_get_flag_enabled;
|
||||
rte_cycles_vmware_tsc_map;
|
||||
@ -88,6 +87,7 @@ DPDK_2.0 {
|
||||
rte_set_log_level;
|
||||
rte_set_log_type;
|
||||
rte_snprintf;
|
||||
rte_socket_id;
|
||||
rte_strerror;
|
||||
rte_strsplit;
|
||||
rte_sys_gettid;
|
||||
|
Loading…
x
Reference in New Issue
Block a user