From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DC204423F0 for ; Mon, 16 Jan 2023 15:10:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EFDD40F18; Mon, 16 Jan 2023 15:10:54 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id F22D640042 for ; Mon, 16 Jan 2023 15:10:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673878253; x=1705414253; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=0WM4GVAPHuZgVcUcV+8GwOrxppV7D83t0XPhLzhHt7Y=; b=dbJXPO6jglUT9yARdsQWZq41pI6G/DC8N5YdrLKSuuVO+YVECqRXgOba cXQfubovkf71SdTYZIUCkSshyM3yUFaMaph6ZbgBxqKcBzLt+Swa7RgH3 lB0CbSygdvF/LkjAW3rfB8FFKVGuOGCKgm5Yd5GNgCFcVhGWyyTWvricc QudWKCNt6wpEd6ljc2qBvoS8zuQN7z7QfnLU2eQmUBPzPbLlEIHYadFv2 DPioLG1BjO5lpBA721x9NKwSF6YDFD7RdTIznHG3hAEWfvaZ/2hDZu/7s zr7cyqii2QQ4M7q+5mGMR1io27AZtxUlxGpA+GE3MdCpRbz2y3rIKuAVt w==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="323168505" X-IronPort-AV: E=Sophos;i="5.97,221,1669104000"; d="scan'208";a="323168505" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 06:10:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="659040376" X-IronPort-AV: E=Sophos;i="5.97,221,1669104000"; d="scan'208";a="659040376" Received: from silpixa00401183.ir.intel.com ([10.55.128.66]) by orsmga002.jf.intel.com with ESMTP; 16 Jan 2023 06:10:31 -0800 From: Tadhg Kearney To: stable@dpdk.org Cc: david.hunt@intel.com, reshma.pattan@intel.com, Tadhg Kearney , hamza.khan@intel.com Subject: [PATCH 20.11.7-rc1] examples/vm_power_manager: revert backported commit Date: Mon, 16 Jan 2023 14:10:28 +0000 Message-Id: <20230116141028.497949-1-tadhg.kearney@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Revert backported commit a244dfa7d784 ("examples/vm_power_manager: use safe list iterator") that adds compilation errors while compiling dpdk with vm_power_manager. Issue is caused by TAILQ_FOREACH being used without dependencies also having being backported. Fixes: a244dfa7d784 ("examples/vm_power_manager: use safe list iterator") Cc: hamza.khan@intel.com Signed-off-by: Tadhg Kearney --- examples/vm_power_manager/channel_manager.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c index 5e0bbbb4c9..0a28cb643b 100644 --- a/examples/vm_power_manager/channel_manager.c +++ b/examples/vm_power_manager/channel_manager.c @@ -23,7 +23,6 @@ #include #include #include -#include #include @@ -60,16 +59,16 @@ struct virtual_machine_info { virDomainInfo info; rte_spinlock_t config_spinlock; int allow_query; - RTE_TAILQ_ENTRY(virtual_machine_info) vms_info; + LIST_ENTRY(virtual_machine_info) vms_info; }; -RTE_TAILQ_HEAD(, virtual_machine_info) vm_list_head; +LIST_HEAD(, virtual_machine_info) vm_list_head; static struct virtual_machine_info * find_domain_by_name(const char *name) { struct virtual_machine_info *info; - RTE_TAILQ_FOREACH(info, &vm_list_head, vms_info) { + LIST_FOREACH(info, &vm_list_head, vms_info) { if (!strncmp(info->name, name, CHANNEL_MGR_MAX_NAME_LEN-1)) return info; } @@ -878,7 +877,7 @@ add_vm(const char *vm_name) new_domain->allow_query = 0; rte_spinlock_init(&(new_domain->config_spinlock)); - TAILQ_INSERT_HEAD(&vm_list_head, new_domain, vms_info); + LIST_INSERT_HEAD(&vm_list_head, new_domain, vms_info); return 0; } @@ -900,7 +899,7 @@ remove_vm(const char *vm_name) rte_spinlock_unlock(&vm_info->config_spinlock); return -1; } - TAILQ_REMOVE(&vm_list_head, vm_info, vms_info); + LIST_REMOVE(vm_info, vms_info); rte_spinlock_unlock(&vm_info->config_spinlock); rte_free(vm_info); return 0; @@ -953,7 +952,7 @@ channel_manager_init(const char *path __rte_unused) { virNodeInfo info; - TAILQ_INIT(&vm_list_head); + LIST_INIT(&vm_list_head); if (connect_hypervisor(path) < 0) { global_n_host_cpus = 64; global_hypervisor_available = 0; @@ -1005,9 +1004,9 @@ channel_manager_exit(void) { unsigned i; char mask[RTE_MAX_LCORE]; - struct virtual_machine_info *vm_info, *tmp; + struct virtual_machine_info *vm_info; - RTE_TAILQ_FOREACH_SAFE(vm_info, &vm_list_head, vms_info, tmp) { + LIST_FOREACH(vm_info, &vm_list_head, vms_info) { rte_spinlock_lock(&(vm_info->config_spinlock)); @@ -1022,7 +1021,7 @@ channel_manager_exit(void) } rte_spinlock_unlock(&(vm_info->config_spinlock)); - TAILQ_REMOVE(&vm_list_head, vm_info, vms_info); + LIST_REMOVE(vm_info, vms_info); rte_free(vm_info); } -- 2.25.1