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 CCE1D45CF0; Tue, 12 Nov 2024 11:35:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9549142D92; Tue, 12 Nov 2024 11:35:09 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 3943642D91 for ; Tue, 12 Nov 2024 11:35:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731407707; 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; bh=92k89OtPy83Dq9JJPV5q3NwwGKnoI6gLVgHLdfqzhTc=; b=PXxeiIh5iOTqH5e4CshWP5M0BFmtqyE5UAcTfKEqlGsxjaGD1XbBPnu4UeGkiLH7jSqosI SLn09R25oN7MiXDNgP0ek/HqfT90cG41iGgRWVuT5PwZK5rkIbr/JGRwBIkZfUFV+aT7OO ijMOZpr2MLCj2UarFTWPlT15WWF7S38= Received: from mx-prod-mc-03.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-526-VIdVLW2bPOS1U-ShjsGtIA-1; Tue, 12 Nov 2024 05:35:04 -0500 X-MC-Unique: VIdVLW2bPOS1U-ShjsGtIA-1 X-Mimecast-MFC-AGG-ID: VIdVLW2bPOS1U-ShjsGtIA Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 98D791955E8D; Tue, 12 Nov 2024 10:35:02 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.218]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2F5D01956086; Tue, 12 Nov 2024 10:34:59 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Anatoly Burakov , David Hunt , Sivaprasad Tummala , Huisong Li Subject: [PATCH 1/2] power: fix build with libvirt Date: Tue, 12 Nov 2024 11:34:53 +0100 Message-ID: <20241112103454.1543861-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 49q5KF6_C9YwB1JrIok0HmyeX8ha8FzB_pWjMMAG9QM_1731407703 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 --- 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/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 -- 9 files changed, 12 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/guest_cli/meson.build b/examples/vm_power_manager/guest_cli/meson.build index a69f809e3b..bc3916a170 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..1903b68ed9 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