On Tue, 15 Oct 2024 02:49:53 +0000
Sivaprasad Tummala <sivaprasad.tumm...@amd.com> wrote:

> 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 (5):
>   power: refactor core power management library
>   power: refactor uncore power management library
>   test/power: removed function pointer validations
>   power/amd_uncore: uncore support for AMD EPYC processors
>   maintainers: update for drivers/power
> 
>  MAINTAINERS                                   |   1 +
>  app/test/test_power.c                         |  95 -----
>  app/test/test_power_cpufreq.c                 |  52 ---
>  app/test/test_power_kvm_vm.c                  |  36 --
>  drivers/meson.build                           |   1 +
>  .../power/acpi/acpi_cpufreq.c                 |  22 +-
>  .../power/acpi/acpi_cpufreq.h                 |   6 +-
>  drivers/power/acpi/meson.build                |  10 +
>  .../power/amd_pstate/amd_pstate_cpufreq.c     |  24 +-
>  .../power/amd_pstate/amd_pstate_cpufreq.h     |   8 +-
>  drivers/power/amd_pstate/meson.build          |  10 +
>  drivers/power/amd_uncore/amd_uncore.c         | 329 ++++++++++++++++++
>  drivers/power/amd_uncore/amd_uncore.h         | 226 ++++++++++++
>  drivers/power/amd_uncore/meson.build          |  20 ++
>  .../power/cppc/cppc_cpufreq.c                 |  22 +-
>  .../power/cppc/cppc_cpufreq.h                 |   8 +-
>  drivers/power/cppc/meson.build                |  10 +
>  .../power/intel_uncore/intel_uncore.c         |  18 +-
>  .../power/intel_uncore/intel_uncore.h         |   8 +-
>  drivers/power/intel_uncore/meson.build        |   6 +
>  .../power/kvm_vm}/guest_channel.c             |   0
>  .../power/kvm_vm}/guest_channel.h             |   0
>  .../power/kvm_vm/kvm_vm.c                     |  22 +-
>  .../power/kvm_vm/kvm_vm.h                     |   6 +-
>  drivers/power/kvm_vm/meson.build              |  16 +
>  drivers/power/meson.build                     |  14 +
>  drivers/power/pstate/meson.build              |  10 +
>  .../power/pstate/pstate_cpufreq.c             |  22 +-
>  .../power/pstate/pstate_cpufreq.h             |   6 +-
>  examples/l3fwd-power/main.c                   |  12 +-
>  lib/power/meson.build                         |   9 +-
>  lib/power/power_common.c                      |   2 +-
>  lib/power/power_common.h                      |  16 +-
>  lib/power/rte_power.c                         | 287 +++++----------
>  lib/power/rte_power.h                         | 139 +++++---
>  lib/power/rte_power_cpufreq_api.h             | 208 +++++++++++
>  lib/power/rte_power_uncore.c                  | 207 +++++------
>  lib/power/rte_power_uncore.h                  |  87 +++--
>  lib/power/rte_power_uncore_ops.h              | 239 +++++++++++++
>  lib/power/version.map                         |  15 +
>  40 files changed, 1605 insertions(+), 624 deletions(-)
>  rename lib/power/power_acpi_cpufreq.c => drivers/power/acpi/acpi_cpufreq.c 
> (95%)
>  rename lib/power/power_acpi_cpufreq.h => drivers/power/acpi/acpi_cpufreq.h 
> (98%)
>  create mode 100644 drivers/power/acpi/meson.build
>  rename lib/power/power_amd_pstate_cpufreq.c => 
> drivers/power/amd_pstate/amd_pstate_cpufreq.c (95%)
>  rename lib/power/power_amd_pstate_cpufreq.h => 
> drivers/power/amd_pstate/amd_pstate_cpufreq.h (97%)
>  create mode 100644 drivers/power/amd_pstate/meson.build
>  create mode 100644 drivers/power/amd_uncore/amd_uncore.c
>  create mode 100644 drivers/power/amd_uncore/amd_uncore.h
>  create mode 100644 drivers/power/amd_uncore/meson.build
>  rename lib/power/power_cppc_cpufreq.c => drivers/power/cppc/cppc_cpufreq.c 
> (95%)
>  rename lib/power/power_cppc_cpufreq.h => drivers/power/cppc/cppc_cpufreq.h 
> (97%)
>  create mode 100644 drivers/power/cppc/meson.build
>  rename lib/power/power_intel_uncore.c => 
> drivers/power/intel_uncore/intel_uncore.c (95%)
>  rename lib/power/power_intel_uncore.h => 
> drivers/power/intel_uncore/intel_uncore.h (97%)
>  create mode 100644 drivers/power/intel_uncore/meson.build
>  rename {lib/power => drivers/power/kvm_vm}/guest_channel.c (100%)
>  rename {lib/power => drivers/power/kvm_vm}/guest_channel.h (100%)
>  rename lib/power/power_kvm_vm.c => drivers/power/kvm_vm/kvm_vm.c (82%)
>  rename lib/power/power_kvm_vm.h => drivers/power/kvm_vm/kvm_vm.h (98%)
>  create mode 100644 drivers/power/kvm_vm/meson.build
>  create mode 100644 drivers/power/meson.build
>  create mode 100644 drivers/power/pstate/meson.build
>  rename lib/power/power_pstate_cpufreq.c => 
> drivers/power/pstate/pstate_cpufreq.c (96%)
>  rename lib/power/power_pstate_cpufreq.h => 
> drivers/power/pstate/pstate_cpufreq.h (98%)
>  create mode 100644 lib/power/rte_power_cpufreq_api.h
>  create mode 100644 lib/power/rte_power_uncore_ops.h
> 

This is showing some build problems.



*Build Failed #1:
OS: RHEL94-64
Target: x86_64-native-linuxapp-gcc+shared
FAILED: app/dpdk-test 
gcc  -o app/dpdk-test app/dpdk-test.p/test_commands.c.o 
app/dpdk-test.p/test_test.c.o app/dpdk-test.p/test_packet_burst_generator.c.o 
app/dpdk-test.p/test_sample_packet_forward.c.o 
app/dpdk-test.p/test_virtual_pmd.c.o app/dpdk-test.p/test_test_acl.c.o 
app/dpdk-test.p/test_test_alarm.c.o app/dpdk-test.p/test_test_argparse.c.o 
app/dpdk-test.p/test_test_atomic.c.o app/dpdk-test.p/test_test_barrier.c.o 
app/dpdk-test.p/test_test_bitcount.c.o app/dpdk-test.p/test_test_bitmap.c.o 
app/dpdk-test.p/test_test_bitops.c.o app/dpdk-test.p/test_test_bitset.c.o 
app/dpdk-test.p/test_test_bitratestats.c.o app/dpdk-test.p/test_test_bpf.c.o 
app/dpdk-test.p/test_test_byteorder.c.o app/dpdk-test.p/test_test_cksum.c.o 
app/dpdk-test.p/test_test_cksum_perf.c.o app/dpdk-test.p/test_test_cmdline.c.o 
app/dpdk-test.p/test_test_cmdline_cirbuf.c.o 
app/dpdk-test.p/test_test_cmdline_etheraddr.c.o 
app/dpdk-test.p/test_test_cmdline_ipaddr.c.o 
app/dpdk-test.p/test_test_cmdline_lib.c.o app/dpdk-test.p/test_test_cmdline_
 num.c.o app/dpdk-test.p/test_test_cmdline_portlist.c.o 
app/dpdk-test.p/test_test_cmdline_string.c.o 
app/dpdk-test.p/test_test_common.c.o app/dpdk-test.p/test_test_compressdev.c.o 
app/dpdk-test.p/test_test_cpuflags.c.o app/dpdk-test.p/test_test_crc.c.o 
app/dpdk-test.p/test_test_cryptodev.c.o 
app/dpdk-test.p/test_test_cryptodev_asym.c.o 
app/dpdk-test.p/test_test_cryptodev_blockcipher.c.o 
app/dpdk-test.p/test_test_cryptodev_crosscheck.c.o 
app/dpdk-test.p/test_test_cryptodev_security_ipsec.c.o 
app/dpdk-test.p/test_test_cryptodev_security_pdcp.c.o 
app/dpdk-test.p/test_test_cryptodev_security_tls_record.c.o 
app/dpdk-test.p/test_test_cycles.c.o app/dpdk-test.p/test_test_debug.c.o 
app/dpdk-test.p/test_test_devargs.c.o app/dpdk-test.p/test_test_dispatcher.c.o 
app/dpdk-test.p/test_test_distributor.c.o 
app/dpdk-test.p/test_test_distributor_perf.c.o 
app/dpdk-test.p/test_test_dmadev.c.o app/dpdk-test.p/test_test_dmadev_api.c.o 
app/dpdk-test.p/test_test_eal_flags.c.o app/dpdk-test.p/test_test_eal
 _fs.c.o app/dpdk-test.p/test_test_efd.c.o 
app/dpdk-test.p/test_test_efd_perf.c.o app/dpdk-test.p/test_test_errno.c.o 
app/dpdk-test.p/test_test_ethdev_api.c.o 
app/dpdk-test.p/test_test_ethdev_link.c.o 
app/dpdk-test.p/test_test_event_crypto_adapter.c.o 
app/dpdk-test.p/test_test_event_dma_adapter.c.o 
app/dpdk-test.p/test_test_event_eth_rx_adapter.c.o 
app/dpdk-test.p/test_test_event_eth_tx_adapter.c.o 
app/dpdk-test.p/test_test_event_ring.c.o 
app/dpdk-test.p/test_test_event_timer_adapter.c.o 
app/dpdk-test.p/test_test_eventdev.c.o 
app/dpdk-test.p/test_test_external_mem.c.o 
app/dpdk-test.p/test_test_fbarray.c.o app/dpdk-test.p/test_test_fib.c.o 
app/dpdk-test.p/test_test_fib6.c.o app/dpdk-test.p/test_test_fib6_perf.c.o 
app/dpdk-test.p/test_test_fib_perf.c.o 
app/dpdk-test.p/test_test_func_reentrancy.c.o 
app/dpdk-test.p/test_test_graph.c.o app/dpdk-test.p/test_test_graph_perf.c.o 
app/dpdk-test.p/test_test_hash.c.o app/dpdk-test.p/test_test_hash_functions.c.o 
app/dpdk-test.p/test_test_hash_mul
 tiwriter.c.o app/dpdk-test.p/test_test_hash_perf.c.o 
app/dpdk-test.p/test_test_hash_readwrite.c.o 
app/dpdk-test.p/test_test_hash_readwrite_lf_perf.c.o 
app/dpdk-test.p/test_test_interrupts.c.o app/dpdk-test.p/test_test_ipfrag.c.o 
app/dpdk-test.p/test_test_ipsec.c.o app/dpdk-test.p/test_test_ipsec_perf.c.o 
app/dpdk-test.p/test_test_ipsec_sad.c.o app/dpdk-test.p/test_test_kvargs.c.o 
app/dpdk-test.p/test_test_latencystats.c.o app/dpdk-test.p/test_test_lcores.c.o 
app/dpdk-test.p/test_test_link_bonding.c.o 
app/dpdk-test.p/test_test_link_bonding_mode4.c.o 
app/dpdk-test.p/test_test_link_bonding_rssconf.c.o 
app/dpdk-test.p/test_test_logs.c.o app/dpdk-test.p/test_test_lpm.c.o 
app/dpdk-test.p/test_test_lpm6.c.o app/dpdk-test.p/test_test_lpm6_perf.c.o 
app/dpdk-test.p/test_test_lpm_perf.c.o app/dpdk-test.p/test_test_malloc.c.o 
app/dpdk-test.p/test_test_malloc_perf.c.o app/dpdk-test.p/test_test_mbuf.c.o 
app/dpdk-test.p/test_test_mcslock.c.o app/dpdk-test.p/test_test_member.c.o 
app/dpdk-test.p/tes
 t_test_member_perf.c.o app/dpdk-test.p/test_test_memcpy.c.o 
app/dpdk-test.p/test_test_memcpy_perf.c.o app/dpdk-test.p/test_test_memory.c.o 
app/dpdk-test.p/test_test_mempool.c.o 
app/dpdk-test.p/test_test_mempool_perf.c.o 
app/dpdk-test.p/test_test_memzone.c.o app/dpdk-test.p/test_test_meter.c.o 
app/dpdk-test.p/test_test_metrics.c.o 
app/dpdk-test.p/test_test_mp_secondary.c.o 
app/dpdk-test.p/test_test_net_ether.c.o app/dpdk-test.p/test_test_pcapng.c.o 
app/dpdk-test.p/test_test_pdcp.c.o app/dpdk-test.p/test_test_pdump.c.o 
app/dpdk-test.p/test_test_per_lcore.c.o app/dpdk-test.p/test_test_pflock.c.o 
app/dpdk-test.p/test_test_pie.c.o app/dpdk-test.p/test_test_pmd_perf.c.o 
app/dpdk-test.p/test_test_pmd_ring.c.o 
app/dpdk-test.p/test_test_pmd_ring_perf.c.o app/dpdk-test.p/test_test_power.c.o 
app/dpdk-test.p/test_test_power_cpufreq.c.o 
app/dpdk-test.p/test_test_power_intel_uncore.c.o 
app/dpdk-test.p/test_test_power_kvm_vm.c.o 
app/dpdk-test.p/test_test_prefetch.c.o app/dpdk-test.p/test_test_ptr_
 compress.c.o app/dpdk-test.p/test_test_rand_perf.c.o 
app/dpdk-test.p/test_test_rawdev.c.o app/dpdk-test.p/test_test_rcu_qsbr.c.o 
app/dpdk-test.p/test_test_rcu_qsbr_perf.c.o 
app/dpdk-test.p/test_test_reassembly_perf.c.o 
app/dpdk-test.p/test_test_reciprocal_division.c.o 
app/dpdk-test.p/test_test_reciprocal_division_perf.c.o 
app/dpdk-test.p/test_test_red.c.o app/dpdk-test.p/test_test_reorder.c.o 
app/dpdk-test.p/test_test_rib.c.o app/dpdk-test.p/test_test_rib6.c.o 
app/dpdk-test.p/test_test_ring.c.o 
app/dpdk-test.p/test_test_ring_hts_stress.c.o 
app/dpdk-test.p/test_test_ring_mpmc_stress.c.o 
app/dpdk-test.p/test_test_ring_mt_peek_stress.c.o 
app/dpdk-test.p/test_test_ring_mt_peek_stress_zc.c.o 
app/dpdk-test.p/test_test_ring_perf.c.o 
app/dpdk-test.p/test_test_ring_rts_stress.c.o 
app/dpdk-test.p/test_test_ring_st_peek_stress.c.o 
app/dpdk-test.p/test_test_ring_st_peek_stress_zc.c.o 
app/dpdk-test.p/test_test_ring_stress.c.o app/dpdk-test.p/test_test_rwlock.c.o 
app/dpdk-test.p/test_test_sched.c
 .o app/dpdk-test.p/test_test_security.c.o 
app/dpdk-test.p/test_test_security_inline_macsec.c.o 
app/dpdk-test.p/test_test_security_inline_proto.c.o 
app/dpdk-test.p/test_test_security_proto.c.o 
app/dpdk-test.p/test_test_seqlock.c.o 
app/dpdk-test.p/test_test_service_cores.c.o 
app/dpdk-test.p/test_test_spinlock.c.o app/dpdk-test.p/test_test_stack.c.o 
app/dpdk-test.p/test_test_stack_perf.c.o 
app/dpdk-test.p/test_test_string_fns.c.o app/dpdk-test.p/test_test_table.c.o 
app/dpdk-test.p/test_test_table_acl.c.o 
app/dpdk-test.p/test_test_table_combined.c.o 
app/dpdk-test.p/test_test_table_pipeline.c.o 
app/dpdk-test.p/test_test_table_ports.c.o 
app/dpdk-test.p/test_test_table_tables.c.o app/dpdk-test.p/test_test_tailq.c.o 
app/dpdk-test.p/test_test_telemetry_data.c.o 
app/dpdk-test.p/test_test_telemetry_json.c.o 
app/dpdk-test.p/test_test_thash.c.o app/dpdk-test.p/test_test_thash_perf.c.o 
app/dpdk-test.p/test_test_threads.c.o app/dpdk-test.p/test_test_ticketlock.c.o 
app/dpdk-test.p/test_test_timer.c
 .o app/dpdk-test.p/test_test_timer_perf.c.o 
app/dpdk-test.p/test_test_timer_racecond.c.o 
app/dpdk-test.p/test_test_timer_secondary.c.o 
app/dpdk-test.p/test_test_trace.c.o app/dpdk-test.p/test_test_trace_perf.c.o 
app/dpdk-test.p/test_test_trace_register.c.o app/dpdk-test.p/test_test_vdev.c.o 
app/dpdk-test.p/test_test_version.c.o -Wl,--as-needed -Wl,--no-undefined 
-Wl,-O1 -Wl,--no-as-needed -pthread -Wl,--start-group -lm -ldl -lnuma -lfdt 
'-Wl,-rpath,$ORIGIN/../lib:$ORIGIN/../drivers:XXXXXXXXXXXXXXX' 
-Wl,-rpath-link,/root/RHEL94-64_K5.14.0_GCC11.4.1/x86_64-native-linuxapp-gcc+shared/33487/dpdk/x86_64-native-linuxapp-gcc+shared/lib
 
-Wl,-rpath-link,/root/RHEL94-64_K5.14.0_GCC11.4.1/x86_64-native-linuxapp-gcc+shared/33487/dpdk/x86_64-native-linuxapp-gcc+shared/drivers
 lib/librte_cmdline.so.25.0 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_net.so.25.0 
lib/librte_mbuf.so.25.0 lib/librte_mempool.so.25.0 lib/librte_ring.so.25
 .0 drivers/librte_net_ring.so.25.0 lib/librte_ethdev.so.25.0 
lib/librte_meter.so.25.0 drivers/librte_bus_pci.so.25.0 lib/librte_pci.so.25.0 
drivers/librte_bus_vdev.so.25.0 lib/librte_acl.so.25.0 lib/librte_argparse
.so.25.0 lib/librte_hash.so.25.0 lib/librte_rcu.so.25.0 
lib/librte_metrics.so.25.0 lib/librte_bitratestats.so.25.0 
lib/librte_bpf.so.25.0 lib/librte_compressdev.so.25.0 
lib/librte_cryptodev.so.25.0 lib/librte_security.so.25.0 
lib/librte_dispatcher.so.25.0 lib/librte_eventdev.so.25.0 
lib/librte_timer.so.25.0 lib/librte_dmadev.so.25.0 
lib/librte_distributor.so.25.0 lib/librte_efd.so.25.0 lib/librte_fib.so.25.0 
lib/librte_rib.so.25.0 lib/librte_table.so.25.0 lib/librte_port.so.25.0 
lib/librte_sched.so.25.0 lib/librte_ip_frag.so.25.0 lib/librte_lpm.so.25.0 
lib/librte_graph.so.25.0 lib/librte_pcapng.so.25.0 lib/librte_ipsec.so.25.0 
lib/librte_latencystats.so.25.0 drivers/librte_net_bond.so.25.0 
lib/librte_member.so.25.0 lib/librte_pdcp.so.25.0 lib/librte_reorder.so.25.0 
lib/librte_pdump.so.25.0 lib/librte_power.so.25.0 lib/librte_rawdev.so.25.0 
lib/librte_stack.so.25.0 lib/librte_pipeline.so.25.0 
drivers/librte_crypto_scheduler.so.25.0 /usr/lib64/libz.so 
/usr/lib64/libpcap.so /usr/lib64/l
 ibelf.so -Wl,--end-group
/usr/bin/ld: app/dpdk-test.p/test_test_power_cpufreq.c.o: in function 
`test_power_caps':
test_power_cpufreq.c:(.text+0x15): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: app/dpdk-test.p/test_test_power_cpufreq.c.o: in function 
`test_power_cpufreq':
test_power_cpufreq.c:(.text+0x48d): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: test_power_cpufreq.c:(.text+0x4ac): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: test_power_cpufreq.c:(.text+0x4c8): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: test_power_cpufreq.c:(.text+0x4e4): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: 
app/dpdk-test.p/test_test_power_cpufreq.c.o:test_power_cpufreq.c:(.text+0x516): 
more undefined references to `rte_power_get_core_ops' follow
/usr/bin/ld: app/dpdk-test.p/test_test_power_intel_uncore.c.o: in function 
`test_power_intel_uncore':
test_power_intel_uncore.c:(.text+0x19): undefined reference to 
`rte_power_get_uncore_ops'
/usr/bin/ld: test_power_intel_uncore.c:(.text+0x3a): undefined reference to 
`rte_power_get_uncore_ops'
/usr/bin/ld: test_power_intel_uncore.c:(.text+0x46): undefined reference to 
`rte_power_get_uncore_ops'
/usr/bin/ld: test_power_intel_uncore.c:(.text+0x61): undefined reference to 
`rte_power_get_uncore_ops'
/usr/bin/ld: test_power_intel_uncore.c:(.text+0x75): undefined reference to 
`rte_power_get_uncore_ops'
/usr/bin/ld: 
app/dpdk-test.p/test_test_power_intel_uncore.c.o:test_power_intel_uncore.c:(.text+0x81):
 more undefined references to `rte_power_get_uncore_ops' follow
/usr/bin/ld: app/dpdk-test.p/test_test_power_kvm_vm.c.o: in function 
`test_power_kvm_vm':
test_power_kvm_vm.c:(.text+0x54): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: test_power_kvm_vm.c:(.text+0x6a): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: test_power_kvm_vm.c:(.text+0x80): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: test_power_kvm_vm.c:(.text+0x96): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: test_power_kvm_vm.c:(.text+0xac): undefined reference to 
`rte_power_get_core_ops'
/usr/bin/ld: 
app/dpdk-test.p/test_test_power_kvm_vm.c.o:test_power_kvm_vm.c:(.text+0xc2): 
more undefined references to `rte_power_get_core_ops' follow
collect2: error: ld returned 1 exit status
ninja: build stopped


Reply via email to