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 B392945CEF; Tue, 12 Nov 2024 09:20:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4455B402C3; Tue, 12 Nov 2024 09:20:20 +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 92A3E40298 for ; Tue, 12 Nov 2024 09:20:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731399619; 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=k+BYjs+36kySZsNwawFatMirMME4fgtBt4sf7jpm12A=; b=HFDb+I5tF5EfhVwaQ7LGyveVe49O94DRLZ8iT5XudCaeHaIcKCkcdpH/+cYTWMmEyWD6yq OcaPdh72Cu+Yc/B675Mc4f+qtMRp0VKNqGIQlAmKkmwmk1X/KR1CQmsf6fsGV+Ps/L7x/0 gNqzVqP0NEFCU5hvLflfSsHf0XIQFXA= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-614-c2OkuuHZPnCdteiHCmItQA-1; Tue, 12 Nov 2024 03:20:15 -0500 X-MC-Unique: c2OkuuHZPnCdteiHCmItQA-1 X-Mimecast-MFC-AGG-ID: c2OkuuHZPnCdteiHCmItQA Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2fcdfdef26dso26853631fa.3 for ; Tue, 12 Nov 2024 00:20:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731399614; x=1732004414; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k+BYjs+36kySZsNwawFatMirMME4fgtBt4sf7jpm12A=; b=YY2nYCeDS4ih7vaalLM+Ugk5An7bC6Dj6pkhWMHjJqo1aiyU/CsdFMTTHk9zyVBG/w IzokNUI10Ucf02HLBjcFjN5Q+vz/UJIyPHI7Sz9KhC5HKCd3v7H+0tCf7FmS00epiOq5 sAzcC2UCZmME9pzBJTnNHNIdhwOlKgVA+fXRjbv8XeMZV7sHkpYdQJSw70bQJvU0avkf 8uW1qD4m/FlyVA/MY7NGyaB7zMvyCpxpVG9e/Bh/Jur2xqx+wkNH/TxHLRXvIG+8ufgz Gc/3RSzWLJ26o+u2eCxGQoQk9WJ3eQ8E/89KoXGc1qpGvrTDlxO6MDRprVmAryZnKoWF 37Hg== X-Forwarded-Encrypted: i=1; AJvYcCV3DxhHqZk/GRgSUtv+Mad/3L8Yyi9FcRYLlfTjnSb2kKEaQnLCAcRhNnCoNFIQSTnzPOA=@dpdk.org X-Gm-Message-State: AOJu0Yxmn4L6JCKTrjNn5eUqIdmrEYGtj59o55jr462AL6Ao0A6w8Zpw nvGRyGhpB+ALCx5fAAPyV0NU7jLd5tYerTqHeNv80ZAT7Dbm1mDUsASjwrIRN1zUrVgWnajDQ2b WtfG0HzENG5ptmPSW6mLyeihMMlUNnpgE0LiZKi/AfmZVQjTxXfaUjx+Tp0TN11uD59yBMM9y38 ZGOMGIObWGN9H7SLk= X-Received: by 2002:a2e:bd02:0:b0:2fb:3d91:f218 with SMTP id 38308e7fff4ca-2ff202230ebmr72423761fa.26.1731399613882; Tue, 12 Nov 2024 00:20:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpipVFTEGNgpgPdTFuEHN1AwVv85FQJncdFSrO80VDf9B6O5y+x4myh5mwGTpjhQ+XiaZndMd54XeLAIwJiB4= X-Received: by 2002:a2e:bd02:0:b0:2fb:3d91:f218 with SMTP id 38308e7fff4ca-2ff202230ebmr72423531fa.26.1731399613455; Tue, 12 Nov 2024 00:20:13 -0800 (PST) MIME-Version: 1.0 References: <20241023051139.1066426-1-sivaprasad.tummala@amd.com> <20241028195556.450033-1-sivaprasad.tummala@amd.com> <5996777.Isy0gbHreE@thomas> In-Reply-To: <5996777.Isy0gbHreE@thomas> From: David Marchand Date: Tue, 12 Nov 2024 09:20:01 +0100 Message-ID: Subject: Re: [PATCH v10 0/6] power: refactor power management library To: Sivaprasad Tummala , Thomas Monjalon Cc: david.hunt@intel.com, anatoly.burakov@intel.com, jerinj@marvell.com, radu.nicolau@intel.com, gakhil@marvell.com, cristian.dumitrescu@intel.com, lihuisong@huawei.com, ferruh.yigit@amd.com, konstantin.ananyev@huawei.com, dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ugjLHPtCHXrOKceoMQHN8p9GuqOVxp5rOS8wPClKsKM_1731399614 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hello Siva, Thomas, On Sun, Nov 10, 2024 at 7:36=E2=80=AFPM Thomas Monjalon wrote: > > 28/10/2024 20:55, Sivaprasad Tummala: > > This patchset refactors the power management library, addressing both > > core and uncore power management. The primary changes involve the > > creation of dedicated directories for each driver within > > 'drivers/power/core/*' and 'drivers/power/uncore/*'. > > > > This refactor significantly improves code organization, enhances > > clarity, and boosts maintainability. It lays the foundation for more > > focused development on individual drivers and facilitates seamless > > integration of future enhancements, particularly the AMD uncore driver. > > > > Furthermore, this effort aims to streamline code maintenance by > > consolidating common functions for cpufreq and cppc across various > > core drivers, thus reducing code duplication. > > > > Sivaprasad Tummala (6): > > power: refactor core power management library > > power: refactor uncore power management library > > test/power: removed function pointer validations > > drivers/power: uncore support for AMD EPYC processors > > maintainers: update for drivers/power > > power: rename library sources for cpu frequency management > > I'm a bit sad there is not more reviews. > > I've moved the pointers check removal first, > renamed intel_pstate files (not the functions), > fixed few things like __cplusplus, include guards, > sorting and maintainers file. > > Applied This series breaks compilation of the vm_power_manager example as the "guest channel" API symbols are not provided by the power library (itself) anymore. ninja: Entering directory `/home/dmarchan/builds/main/build-gcc-shared' [3355/3373] Linking target examples/dpdk-guest_cli FAILED: examples/dpdk-guest_cli gcc -o examples/dpdk-guest_cli examples/dpdk-guest_cli.p/vm_power_manager_guest_cli_main.c.o examples/dpdk-guest_cli.p/vm_power_manager_guest_cli_parse.c.o examples/dpdk-guest_cli.p/vm_power_manager_guest_cli_vm_power_cli_guest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--no-as-needed -Wl,--undefined-version -pthread -Wl,--start-group -lm -ldl -lnuma -lfdt '-Wl,-rpath,$ORIGIN/../lib' -Wl,-rpath-link,/home/dmarchan/builds/main/build-gcc-shared/lib lib/librte_eal.so.25.0 lib/librte_kvargs.so.25.0 lib/librte_log.so.25.0 lib/librte_telemetry.so.25.0 lib/librte_mempool.so.25.0 lib/librte_ring.so.25.0 lib/librte_net.so.25.0 lib/librte_mbuf.so.25.0 lib/librte_ethdev.so.25.0 lib/librte_meter.so.25.0 lib/librte_cmdline.so.25.0 lib/librte_power.so.25.0 lib/librte_timer.so.25.0 -lpcap -lvirt /usr/lib64/libbsd.so /usr/lib64/libarchive.so -Wl,--end-group /usr/bin/ld: examples/dpdk-guest_cli.p/vm_power_manager_guest_cli_vm_power_= cli_guest.c.o: in function `check_response_cmd': /home/dmarchan/builds/main/build-gcc-shared/../../../git/pub/dpdk.org/main/= examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:382: undefined reference to `rte_power_guest_channel_receive_msg' /usr/bin/ld: examples/dpdk-guest_cli.p/vm_power_manager_guest_cli_vm_power_= cli_guest.c.o: in function `query_data': /home/dmarchan/builds/main/build-gcc-shared/../../../git/pub/dpdk.org/main/= examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:147: undefined reference to `rte_power_guest_channel_send_msg' /usr/bin/ld: examples/dpdk-guest_cli.p/vm_power_manager_guest_cli_vm_power_= cli_guest.c.o: in function `receive_capabilities': /home/dmarchan/builds/main/build-gcc-shared/../../../git/pub/dpdk.org/main/= examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:271: undefined reference to `rte_power_guest_channel_receive_msg' /usr/bin/ld: examples/dpdk-guest_cli.p/vm_power_manager_guest_cli_vm_power_= cli_guest.c.o: in function `send_policy': /home/dmarchan/builds/main/build-gcc-shared/../../../git/pub/dpdk.org/main/= examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:476: undefined reference to `rte_power_guest_channel_send_msg' /usr/bin/ld: examples/dpdk-guest_cli.p/vm_power_manager_guest_cli_vm_power_= cli_guest.c.o: in function `query_data': /home/dmarchan/builds/main/build-gcc-shared/../../../git/pub/dpdk.org/main/= examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:147: undefined reference to `rte_power_guest_channel_send_msg' /usr/bin/ld: examples/dpdk-guest_cli.p/vm_power_manager_guest_cli_vm_power_= cli_guest.c.o: in function `receive_freq_list': /home/dmarchan/builds/main/build-gcc-shared/../../../git/pub/dpdk.org/main/= examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:161: undefined reference to `rte_power_guest_channel_receive_msg' collect2: error: ld returned 1 exit status [3357/3373] Generating drivers/rte_common_cnxk.sym_chk with a custom command (wrapped by meson to capture output) ninja: build stopped: subcommand failed. Siva, please have a look quickly. Here is a quick fix written before first coffee of the day: $ git diff --cached 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 =3D files( 'guest_channel.c', 'kvm_vm.c', ) +headers =3D files('rte_power_guest_channel.h') deps +=3D ['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/versio= n.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-instal= led # DPDK instance, use 'make' -deps +=3D ['power'] +deps +=3D ['power', 'power/kvm_vm'] sources =3D 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-instal= led # DPDK instance, use 'make' -deps +=3D ['power'] +deps +=3D ['power', 'power/kvm_vm'] if dpdk_conf.has('RTE_NET_BNXT') deps +=3D ['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 =3D 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; --=20 David Marchand