From patchwork Tue Aug 15 03:52:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 130321 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC3A143069; Tue, 15 Aug 2023 05:52:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3BDD43251; Tue, 15 Aug 2023 05:52:50 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mails.dpdk.org (Postfix) with ESMTP id 0772941104 for ; Tue, 15 Aug 2023 05:52:49 +0200 (CEST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7DDF2623E6; Tue, 15 Aug 2023 03:52:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CDFFC433C9; Tue, 15 Aug 2023 03:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692071567; bh=xgwsGenNQ2/EuQJWt3NtG2gxSZFtRwfO3KI2h8UGChA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TBiw0JSNapQiGKFpsm+C3MlfEKeQgQn+dSV/3iksJDOO2iGnD9+JPDeTikV6NnV2w bPlQjyuVj/FZVZI7VhZRobus1k7EnOigY4usJGIzY7hI8Wnn+5edXoqk8nF/BaFDKK AEzoZtCWUGIwwkAQIcAgBW9+Qrn2Ob2UYrN4t1PQAonw4OTnShCjdV3mYrChpWRJb0 Vg8ue1dkF38ANkwLRkI7mg7OucKSFpKN+YxJIEnJXNGhLd4vR+3oLOWuhTtqSfSWoi gMfp5WWwmPEbMOw0TiAfWt7yDlhHEKkZHg/0h5w+KcJkBqQRdBnfBZ77iAsgm8uVE3 H6x29JNwzg36w== From: okaya@kernel.org To: Cc: dev@dpdk.org, Graham Whyte , Sinan Kaya Subject: [PATCH v3 1/7] eal: fixes for re-initialization issues Date: Mon, 14 Aug 2023 23:52:33 -0400 Message-Id: <20230815035239.1365591-2-okaya@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230815035239.1365591-1-okaya@kernel.org> References: <20230815035239.1365591-1-okaya@kernel.org> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Graham Whyte reinitialize the solib link list and clean the globals holding state for parsing. Signed-off-by: Sinan Kaya Signed-off-by: Graham Whyte --- lib/eal/common/eal_common_options.c | 7 +++++++ lib/eal/linux/eal.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c index 062f1d8d9c..7043b6e2fd 100644 --- a/lib/eal/common/eal_common_options.c +++ b/lib/eal/common/eal_common_options.c @@ -1981,6 +1981,13 @@ compute_ctrl_threads_cpuset(struct internal_config *internal_cfg) memcpy(cpuset, &lcore_config[rte_get_main_lcore()].cpuset, sizeof(*cpuset)); } + + /* Reinitialize solib_list */ + TAILQ_INIT(&solib_list); + + main_lcore_parsed = 0; + mem_parsed = 0; + core_parsed = 0; } int diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index c6efd92014..650fb5f5a9 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -79,6 +79,8 @@ struct lcore_config lcore_config[RTE_MAX_LCORE]; int rte_cycles_vmware_tsc_map; +static uint32_t run_once; + int eal_clean_runtime_dir(void) { @@ -505,6 +507,7 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg) socket_arg[i] = val; } + __atomic_store_n(&run_once, 0, __ATOMIC_RELAXED); return 0; } @@ -967,7 +970,6 @@ int rte_eal_init(int argc, char **argv) { int i, fctret, ret; - static uint32_t run_once; uint32_t has_run = 0; char cpuset[RTE_CPU_AFFINITY_STR_LEN]; char thread_name[RTE_MAX_THREAD_NAME_LEN];