patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH 17.11] eal: remove dead code on NUMA node detection
@ 2020-01-03 11:13 David Marchand
  2020-01-07 11:27 ` Luca Boccassi
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2020-01-03 11:13 UTC (permalink / raw)
  To: stable; +Cc: luca.boccassi

[ upstream commit 8e35792c5325f9fd2cb7cfab507aa23fc956ced7 ]

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")

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 config/common_base                       |  1 -
 lib/librte_eal/common/eal_common_lcore.c | 11 -----------
 2 files changed, 12 deletions(-)

diff --git a/config/common_base b/config/common_base
index 7b4792293e..4355cad3b4 100644
--- a/config/common_base
+++ b/config/common_base
@@ -99,7 +99,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/lib/librte_eal/common/eal_common_lcore.c b/lib/librte_eal/common/eal_common_lcore.c
index 0db1555b58..723f2b2bd0 100644
--- a/lib/librte_eal/common/eal_common_lcore.c
+++ b/lib/librte_eal/common/eal_common_lcore.c
@@ -84,17 +84,6 @@ rte_eal_cpu_init(void)
 		lcore_config[lcore_id].core_role = ROLE_RTE;
 		lcore_config[lcore_id].core_id = eal_cpu_core_id(lcore_id);
 		lcore_config[lcore_id].socket_id = eal_cpu_socket_id(lcore_id);
-		if (lcore_config[lcore_id].socket_id >= RTE_MAX_NUMA_NODES) {
-#ifdef RTE_EAL_ALLOW_INV_SOCKET_ID
-			lcore_config[lcore_id].socket_id = 0;
-#else
-			RTE_LOG(ERR, EAL, "Socket ID (%u) is greater than "
-				"RTE_MAX_NUMA_NODES (%d)\n",
-				lcore_config[lcore_id].socket_id,
-				RTE_MAX_NUMA_NODES);
-			return -1;
-#endif
-		}
 		RTE_LOG(DEBUG, EAL, "Detected lcore %u as "
 				"core %u on socket %u\n",
 				lcore_id, lcore_config[lcore_id].core_id,
-- 
2.23.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 17.11] eal: remove dead code on NUMA node detection
  2020-01-03 11:13 [dpdk-stable] [PATCH 17.11] eal: remove dead code on NUMA node detection David Marchand
@ 2020-01-07 11:27 ` Luca Boccassi
  0 siblings, 0 replies; 2+ messages in thread
From: Luca Boccassi @ 2020-01-07 11:27 UTC (permalink / raw)
  To: David Marchand, stable

On Fri, 2020-01-03 at 12:13 +0100, David Marchand wrote:
> [ upstream commit 8e35792c5325f9fd2cb7cfab507aa23fc956ced7 ]
> 
> 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")
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  config/common_base                       |  1 -
>  lib/librte_eal/common/eal_common_lcore.c | 11 -----------
>  2 files changed, 12 deletions(-)

Thanks, applied

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03 11:13 [dpdk-stable] [PATCH 17.11] eal: remove dead code on NUMA node detection David Marchand
2020-01-07 11:27 ` Luca Boccassi

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox