* [dpdk-dev] [PATCH] eal: remove dead code on NUMA node detection
@ 2019-10-22 19:34 David Marchand
2019-10-22 21:36 ` Stephen Hemminger
2019-10-23 17:49 ` Burakov, Anatoly
0 siblings, 2 replies; 4+ messages in thread
From: David Marchand @ 2019-10-22 19:34 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson, stable, Thomas Monjalon
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: 94ef2964148a ("eal/linux: fix numa node detection")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
config/common_base | 1 -
config/meson.build | 1 -
lib/librte_eal/common/eal_common_lcore.c | 9 ---------
3 files changed, 11 deletions(-)
diff --git a/config/common_base b/config/common_base
index 2323159..ef4c1c4 100644
--- a/config/common_base
+++ b/config/common_base
@@ -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
diff --git a/config/meson.build b/config/meson.build
index a27f731..37b1b25 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -162,7 +162,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)
diff --git a/lib/librte_eal/common/eal_common_lcore.c b/lib/librte_eal/common/eal_common_lcore.c
index 38af260..59a2fd1 100644
--- a/lib/librte_eal/common/eal_common_lcore.c
+++ b/lib/librte_eal/common/eal_common_lcore.c
@@ -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 */
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] eal: remove dead code on NUMA node detection
2019-10-22 19:34 [dpdk-dev] [PATCH] eal: remove dead code on NUMA node detection David Marchand
@ 2019-10-22 21:36 ` Stephen Hemminger
2019-10-23 17:49 ` Burakov, Anatoly
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2019-10-22 21:36 UTC (permalink / raw)
To: David Marchand; +Cc: dev, bruce.richardson, stable, Thomas Monjalon
On Tue, 22 Oct 2019 21:34:17 +0200
David Marchand <david.marchand@redhat.com> wrote:
> 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: 94ef2964148a ("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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] eal: remove dead code on NUMA node detection
2019-10-22 19:34 [dpdk-dev] [PATCH] eal: remove dead code on NUMA node detection David Marchand
2019-10-22 21:36 ` Stephen Hemminger
@ 2019-10-23 17:49 ` Burakov, Anatoly
2019-10-24 12:56 ` David Marchand
1 sibling, 1 reply; 4+ messages in thread
From: Burakov, Anatoly @ 2019-10-23 17:49 UTC (permalink / raw)
To: David Marchand, dev; +Cc: bruce.richardson, stable, Thomas Monjalon
On 22-Oct-19 8:34 PM, David Marchand wrote:
> 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: 94ef2964148a ("eal/linux: fix numa node detection")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
--
Thanks,
Anatoly
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] eal: remove dead code on NUMA node detection
2019-10-23 17:49 ` Burakov, Anatoly
@ 2019-10-24 12:56 ` David Marchand
0 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2019-10-24 12:56 UTC (permalink / raw)
To: David Marchand
Cc: dev, Bruce Richardson, dpdk stable, Thomas Monjalon, Burakov, Anatoly
On Wed, Oct 23, 2019 at 7:49 PM Burakov, Anatoly
<anatoly.burakov@intel.com> wrote:
>
> On 22-Oct-19 8:34 PM, David Marchand wrote:
> > 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: 94ef2964148a ("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>
Applied.
--
David Marchand
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-24 12:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 19:34 [dpdk-dev] [PATCH] eal: remove dead code on NUMA node detection David Marchand
2019-10-22 21:36 ` Stephen Hemminger
2019-10-23 17:49 ` Burakov, Anatoly
2019-10-24 12:56 ` David Marchand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).