From: "Hunt, David" <david.hunt@intel.com>
To: Tadhg Kearney <tadhg.kearney@intel.com>, <stable@dpdk.org>
Cc: <reshma.pattan@intel.com>, <hamza.khan@intel.com>
Subject: Re: [PATCH 20.11.7-rc1] examples/vm_power_manager: revert backported commit
Date: Mon, 23 Jan 2023 14:06:12 +0000 [thread overview]
Message-ID: <d11fe900-d45c-0741-0d70-c83ca2f8b4b3@intel.com> (raw)
In-Reply-To: <20230116141028.497949-1-tadhg.kearney@intel.com>
Hi Tadhg,
On 16/01/2023 14:10, Tadhg Kearney wrote:
> 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 <tadhg.kearney@intel.com>
> ---
> 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 <rte_log.h>
> #include <rte_atomic.h>
> #include <rte_spinlock.h>
> -#include <rte_tailq.h>
>
> #include <libvirt/libvirt.h>
>
> @@ -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);
> }
>
Tested this patch set and it fixes the compilation issue. Thanks.
Tested-by: David Hunt <david.hunt@intel.com>
prev parent reply other threads:[~2023-01-23 14:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 14:10 Tadhg Kearney
2023-01-23 14:06 ` Hunt, David [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d11fe900-d45c-0741-0d70-c83ca2f8b4b3@intel.com \
--to=david.hunt@intel.com \
--cc=hamza.khan@intel.com \
--cc=reshma.pattan@intel.com \
--cc=stable@dpdk.org \
--cc=tadhg.kearney@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).