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 A533D45CF5; Tue, 12 Nov 2024 15:01:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9250C427AC; Tue, 12 Nov 2024 15:01:31 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 8759B40649 for ; Tue, 12 Nov 2024 15:01:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731420089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sFvmFZxi9QHWGbRRoOL6JRGqjg6ZoK5IYfrKDdfoHag=; b=V9ACJn3TobEcqf1TkBn40eA2aTSmjPvWv6om1x2Ii08fy037q649ZZhHk/+arC152b0kV0 52RaVm26fho7cVqhgth/DRZgyym1M7brl8O155dJhmjQY3+sfM/inhNanjMhjnqgvDzFx+ 06Usp1yXIBagPlksCcQSPRLO7DXEDT4= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-691-0X9pJncpOGGIstPmA3TWtA-1; Tue, 12 Nov 2024 09:01:25 -0500 X-MC-Unique: 0X9pJncpOGGIstPmA3TWtA-1 X-Mimecast-MFC-AGG-ID: 0X9pJncpOGGIstPmA3TWtA Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4C9DC1955F34; Tue, 12 Nov 2024 14:01:24 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.218]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9ABDB30000DF; Tue, 12 Nov 2024 14:01:21 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Anatoly Burakov , David Hunt , Sivaprasad Tummala , Huisong Li Subject: [PATCH v2 1/2] power: fix build with libvirt Date: Tue, 12 Nov 2024 15:01:05 +0100 Message-ID: <20241112140107.1916734-1-david.marchand@redhat.com> In-Reply-To: <20241112103454.1543861-1-david.marchand@redhat.com> References: <20241112103454.1543861-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ndEfEG-xT_BzTc7d1e2F21jotVm2MV1Eo5MNnuTjvlQ_1731420084 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Following moving rte_power_guest* API from the power library to the kvm_vm driver, the symbols are not exposed anymore, since the library hosting them is the kvm_vm driver binary. Finish this cleanup by hosting the rte_power_guest_channel.h header in the driver, then version the symbols and add corresponding build dependencies in the vm_power_manager example. Fixes: 6f987b594fa6 ("power: refactor core power management") Signed-off-by: David Marchand --- Changes since v1: - fix meson dependency, - add missing header include, --- drivers/power/kvm_vm/meson.build | 1 + .../power/kvm_vm}/rte_power_guest_channel.h | 0 drivers/power/kvm_vm/version.map | 8 ++++++++ examples/vm_power_manager/channel_monitor.c | 1 + examples/vm_power_manager/channel_monitor.h | 1 + examples/vm_power_manager/guest_cli/main.c | 1 + examples/vm_power_manager/guest_cli/meson.build | 2 +- examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 1 + examples/vm_power_manager/meson.build | 2 +- lib/power/meson.build | 1 - lib/power/rte_power_cpufreq.h | 1 - lib/power/version.map | 2 -- 12 files changed, 15 insertions(+), 6 deletions(-) rename {lib/power => drivers/power/kvm_vm}/rte_power_guest_channel.h (100%) create mode 100644 drivers/power/kvm_vm/version.map diff --git a/drivers/power/kvm_vm/meson.build b/drivers/power/kvm_vm/meson.build index fe11179ab3..e921c012e9 100644 --- a/drivers/power/kvm_vm/meson.build +++ b/drivers/power/kvm_vm/meson.build @@ -10,5 +10,6 @@ sources = files( 'guest_channel.c', 'kvm_vm.c', ) +headers = files('rte_power_guest_channel.h') deps += ['power'] diff --git a/lib/power/rte_power_guest_channel.h b/drivers/power/kvm_vm/rte_power_guest_channel.h similarity index 100% rename from lib/power/rte_power_guest_channel.h rename to drivers/power/kvm_vm/rte_power_guest_channel.h diff --git a/drivers/power/kvm_vm/version.map b/drivers/power/kvm_vm/version.map new file mode 100644 index 0000000000..ffa676624b --- /dev/null +++ b/drivers/power/kvm_vm/version.map @@ -0,0 +1,8 @@ +DPDK_25 { + global: + + rte_power_guest_channel_receive_msg; + rte_power_guest_channel_send_msg; + + local: *; +}; diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c index d4e0d685c1..800f733a26 100644 --- a/examples/vm_power_manager/channel_monitor.c +++ b/examples/vm_power_manager/channel_monitor.c @@ -32,6 +32,7 @@ #include #endif #include +#include #include #include "channel_monitor.h" diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h index a9a257abd3..fff6348ca4 100644 --- a/examples/vm_power_manager/channel_monitor.h +++ b/examples/vm_power_manager/channel_monitor.h @@ -6,6 +6,7 @@ #define CHANNEL_MONITOR_H_ #include +#include #include "channel_manager.h" diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c index 6246cbd6b4..40d4cb6d49 100644 --- a/examples/vm_power_manager/guest_cli/main.c +++ b/examples/vm_power_manager/guest_cli/main.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/examples/vm_power_manager/guest_cli/meson.build b/examples/vm_power_manager/guest_cli/meson.build index a69f809e3b..00bc32526d 100644 --- a/examples/vm_power_manager/guest_cli/meson.build +++ b/examples/vm_power_manager/guest_cli/meson.build @@ -6,7 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' -deps += ['power'] +deps += ['power', 'power_kvm_vm'] sources = files( 'main.c', diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c index 803b6d1f82..14d1f3dd95 100644 --- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c +++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c @@ -19,6 +19,7 @@ #include #include +#include #include "vm_power_cli_guest.h" diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build index b866d8fd54..dcf23198eb 100644 --- a/examples/vm_power_manager/meson.build +++ b/examples/vm_power_manager/meson.build @@ -6,7 +6,7 @@ # To build this example as a standalone application with an already-installed # DPDK instance, use 'make' -deps += ['power'] +deps += ['power', 'power_kvm_vm'] if dpdk_conf.has('RTE_NET_BNXT') deps += ['net_bnxt'] diff --git a/lib/power/meson.build b/lib/power/meson.build index cd7c83b6e9..b3a7bc7b2e 100644 --- a/lib/power/meson.build +++ b/lib/power/meson.build @@ -22,7 +22,6 @@ headers = files( 'power_cpufreq.h', 'power_uncore_ops.h', 'rte_power_cpufreq.h', - 'rte_power_guest_channel.h', 'rte_power_pmd_mgmt.h', 'rte_power_qos.h', 'rte_power_uncore.h', diff --git a/lib/power/rte_power_cpufreq.h b/lib/power/rte_power_cpufreq.h index 73f9820bdf..82d274214b 100644 --- a/lib/power/rte_power_cpufreq.h +++ b/lib/power/rte_power_cpufreq.h @@ -13,7 +13,6 @@ #include #include -#include #include "power_cpufreq.h" diff --git a/lib/power/version.map b/lib/power/version.map index 920c8e79b3..9a36046a64 100644 --- a/lib/power/version.map +++ b/lib/power/version.map @@ -16,8 +16,6 @@ DPDK_25 { rte_power_get_env; rte_power_get_freq; rte_power_get_uncore_freq; - rte_power_guest_channel_receive_msg; - rte_power_guest_channel_send_msg; rte_power_init; rte_power_pmd_mgmt_get_emptypoll_max; rte_power_pmd_mgmt_get_pause_duration; -- 2.47.0