Skip to content

Commit

Permalink
eal: remove dead code on NUMA node detection
Browse files Browse the repository at this point in the history
RTE_EAL_ALLOW_INV_SOCKET_ID had been introduced and documented as used
with xen dom0 support (dropped for some time now).

Closely looking at this, the code was changed later and ensures that the
socket id is in the [0..RTE_MAX_NUMA_NODES] range anyway.

Let's drop this dead code and the build option with it.

Fixes: 94ef296 ("eal/linux: fix numa node detection")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
  • Loading branch information
david-marchand committed Oct 24, 2019
1 parent ed5d3d5 commit 8e35792
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion config/common_base
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ CONFIG_RTE_LOG_DP_LEVEL=RTE_LOG_INFO
CONFIG_RTE_LOG_HISTORY=256
CONFIG_RTE_BACKTRACE=y
CONFIG_RTE_LIBEAL_USE_HPET=n
CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n
CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
CONFIG_RTE_EAL_IGB_UIO=n
CONFIG_RTE_EAL_VFIO=n
Expand Down
1 change: 0 additions & 1 deletion config/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores'))
dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes'))
dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports'))
dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))
dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id'))
# values which have defaults which may be overridden
dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64)
Expand Down
9 changes: 0 additions & 9 deletions lib/librte_eal/common/eal_common_lcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,6 @@ rte_eal_cpu_init(void)

/* find socket first */
socket_id = eal_cpu_socket_id(lcore_id);
if (socket_id >= RTE_MAX_NUMA_NODES) {
#ifdef RTE_EAL_ALLOW_INV_SOCKET_ID
socket_id = 0;
#else
RTE_LOG(ERR, EAL, "Socket ID (%u) is greater than RTE_MAX_NUMA_NODES (%d)\n",
socket_id, RTE_MAX_NUMA_NODES);
return -1;
#endif
}
lcore_to_socket_id[lcore_id] = socket_id;

/* in 1:1 mapping, record related cpu detected state */
Expand Down

0 comments on commit 8e35792

Please sign in to comment.