logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rte_power_uncore.h

Author

       Generated automatically by Doxygen for DPDK from the source code.

DPDK                                             Version 24.11.2                           rte_power_uncore.h(3)

Detailed Description

       Uncore Frequency Management

       Definition in file rte_power_uncore.h.

Function Documentation

__rte_experimentalintrte_power_set_uncore_env(enumrte_uncore_power_mgmt_envenv)
       Set the default uncore power management implementation. This has to be called prior to calling any other
       rte_power_uncore_*() API. It is thread safe. New env can be set only in uninitialized state.
       rte_power_unset_uncore_env must be called if different env was already set.

       Parametersenv env. The environment in which to initialise Uncore Power Management for.

       Returns

           • 0 on success.

           • Negative on error.

   __rte_experimentalvoidrte_power_unset_uncore_env(void)
       Unset  the  global  uncore  environment  configuration.  This  can  only be called after all threads have
       completed.

   __rte_experimentalenumrte_uncore_power_mgmt_envrte_power_get_uncore_env(void)
       Get the default uncore power management implementation.

       Returns
           power_management_env The configured environment.

   intrte_power_uncore_init(unsignedintpkg,unsignedintdie)
       Initialize uncore frequency management for  specific  die  on  a  package.  It  will  get  the  available
       frequencies and prepare to set new die frequencies.

       This function should NOT be called in the fast path.

       Parameterspkg Package number. Each physical CPU in a system is referred to as a package.
           die Die number. Each package can have several dies connected together via the uncore mesh.

       Returns

           • 0 on success.

           • Negative on error.

   intrte_power_uncore_exit(unsignedintpkg,unsignedintdie)
       Exit  uncore  frequency  management  on  a specific die on a package. It will restore uncore min and* max
       values to previous values before initialization of API.

       This function should NOT be called in the fast path.

       Parameterspkg Package number. Each physical CPU in a system is referred to as a package.
           die Die number. Each package can have several dies connected together via the uncore mesh.

       Returns

           • 0 on success.

           • Negative on error.

   uint32_trte_power_get_uncore_freq(unsignedintpkg,unsignedintdie)
       Return the current index of available frequencies of a specific die on a package. It should be  protected
       outside of this function for threadsafe.

       This function should NOT be called in the fast path.

       Parameterspkg Package number. Each physical CPU in a system is referred to as a package.
           die Die number. Each package can have several dies connected together via the uncore mesh.

       Returns
           The  current index of available frequencies. If error, it will return 'RTE_POWER_INVALID_FREQ_INDEX =
           (~0)'.

   intrte_power_set_uncore_freq(unsignedintpkg,unsignedintdie,uint32_tindex)
       Set minimum and maximum uncore frequency for specified die on a package  to  specified  index  value.  It
       should be protected outside of this function for threadsafe.

       This function should NOT be called in the fast path.

       Parameterspkg Package number. Each physical CPU in a system is referred to as a package.
           die Die number. Each package can have several dies connected together via the uncore mesh.
           index The index of available frequencies.

       Returns

           • 1 on success with frequency changed.

           • 0 on success without frequency changed.

           • Negative on error.

   intrte_power_uncore_freq_max(unsignedintpkg,unsignedintdie)
       Set minimum and maximum uncore frequency for specified die on a package to maximum value according to the
       available frequencies. It should be protected outside of this function for threadsafe.

       This function should NOT be called in the fast path.

       Parameterspkg Package number. Each physical CPU in a system is referred to as a package.
           die Die number. Each package can have several dies connected together via the uncore mesh.

       Returns

           • 1 on success with frequency changed.

           • 0 on success without frequency changed.

           • Negative on error.

   intrte_power_uncore_freq_min(unsignedintpkg,unsignedintdie)
       Set minimum and maximum uncore frequency for specified die on a package to minimum value according to the
       available frequencies. It should be protected outside of this function for threadsafe.

       This function should NOT be called in the fast path.

       Parameterspkg Package number. Each physical CPU in a system is referred to as a package.
           die Die number. Each package can have several dies connected together via the uncore mesh.

       Returns

           • 1 on success with frequency changed.

           • 0 on success without frequency changed.

           • Negative on error.

   __rte_experimentalintrte_power_uncore_freqs(unsignedintpkg,unsignedintdie,uint32_t*freqs,uint32_tnum)
       Return the list of available frequencies in the index array.

       This function should NOT be called in the fast path.

       Parameterspkg Package number. Each physical CPU in a system is referred to as a package.
           die Die number. Each package can have several dies connected together via the uncore mesh.
           freqs The buffer array to save the frequencies.
           num The number of frequencies to get.

       Returns

           • The number of available index's in frequency array.

           • Negative on error.

   intrte_power_uncore_get_num_freqs(unsignedintpkg,unsignedintdie)
       Return the list length of available frequencies in the index array.

       This function should NOT be called in the fast path.

       Parameterspkg Package number. Each physical CPU in a system is referred to as a package.
           die Die number. Each package can have several dies connected together via the uncore mesh.

       Returns

           • The number of available index's in frequency array.

           • Negative on error.

   unsignedintrte_power_uncore_get_num_pkgs(void)
       Return the number of packages (CPUs) on a system by parsing the uncore sysfs directory.

       This function should NOT be called in the fast path.

       Returns

           • Zero on error.

           • Number of package on system on success.

   unsignedintrte_power_uncore_get_num_dies(unsignedintpkg)
       Return the number of dies for pakckages (CPUs) specified from parsing the uncore sysfs directory.

       This function should NOT be called in the fast path.

       Parameterspkg Package number. Each physical CPU in a system is referred to as a package.

       Returns

           • Zero on error.

           • Number of dies for package on sucecss.

Name

       rte_power_uncore.h

Synopsis

       #include 'power_uncore_ops.h'

   Functions
       __rte_experimental int rte_power_set_uncore_env (enum rte_uncore_power_mgmt_env env)
       __rte_experimental void rte_power_unset_uncore_env (void)
       __rte_experimental enum rte_uncore_power_mgmt_env rte_power_get_uncore_env (void)
       int rte_power_uncore_init (unsigned int pkg, unsigned int die)
       int rte_power_uncore_exit (unsigned int pkg, unsigned int die)
       uint32_t rte_power_get_uncore_freq (unsigned int pkg, unsigned int die)
       int rte_power_set_uncore_freq (unsigned int pkg, unsigned int die, uint32_t index)
       int rte_power_uncore_freq_max (unsigned int pkg, unsigned int die)
       int rte_power_uncore_freq_min (unsigned int pkg, unsigned int die)
       __rte_experimental int rte_power_uncore_freqs (unsigned int pkg, unsigned int die, uint32_t *freqs,
           uint32_t num)
       int rte_power_uncore_get_num_freqs (unsigned int pkg, unsigned int die)
       unsigned int rte_power_uncore_get_num_pkgs (void)
       unsigned int rte_power_uncore_get_num_dies (unsigned int pkg)

See Also