lib/event: remove get/set_core_freqs API from governor
Those calls went unused, in favor or much more useful up/down/min/max variants. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I432896196a1a6edfc6799c8658df49567f73d457 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8788 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
7bf66ff5ac
commit
12fcf7e1d5
@ -172,21 +172,9 @@ struct spdk_governor_capabilities {
|
|||||||
struct spdk_governor {
|
struct spdk_governor {
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
/* freqs - the buffer array to save the frequencies; num - the number of frequencies to get; return - the number of available frequencies */
|
|
||||||
uint32_t (*get_core_freqs)(uint32_t lcore_id, uint32_t *freqs, uint32_t num);
|
|
||||||
|
|
||||||
/* return - current frequency on success, 0 on failure */
|
/* return - current frequency on success, 0 on failure */
|
||||||
uint32_t (*get_core_curr_freq)(uint32_t lcore_id);
|
uint32_t (*get_core_curr_freq)(uint32_t lcore_id);
|
||||||
|
|
||||||
/**
|
|
||||||
* freq_index - index of available frequencies returned from get_core_freqs call
|
|
||||||
*
|
|
||||||
* return
|
|
||||||
* - 1 on success with frequency changed.
|
|
||||||
* - 0 on success without frequency changed.
|
|
||||||
* - Negative on error.
|
|
||||||
*/
|
|
||||||
int (*set_core_freq)(uint32_t lcore_id, uint32_t freq_index);
|
|
||||||
int (*core_freq_up)(uint32_t lcore_id);
|
int (*core_freq_up)(uint32_t lcore_id);
|
||||||
int (*core_freq_down)(uint32_t lcore_id);
|
int (*core_freq_down)(uint32_t lcore_id);
|
||||||
int (*set_core_freq_max)(uint32_t lcore_id);
|
int (*set_core_freq_max)(uint32_t lcore_id);
|
||||||
|
@ -39,13 +39,6 @@
|
|||||||
|
|
||||||
#include <rte_power.h>
|
#include <rte_power.h>
|
||||||
|
|
||||||
|
|
||||||
static uint32_t
|
|
||||||
_get_core_freqs(uint32_t lcore_id, uint32_t *freqs, uint32_t num)
|
|
||||||
{
|
|
||||||
return rte_power_freqs(lcore_id, freqs, num);
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint32_t
|
static uint32_t
|
||||||
_get_core_curr_freq(uint32_t lcore_id)
|
_get_core_curr_freq(uint32_t lcore_id)
|
||||||
{
|
{
|
||||||
@ -70,12 +63,6 @@ _get_core_curr_freq(uint32_t lcore_id)
|
|||||||
return freqs[freq_index];
|
return freqs[freq_index];
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
_set_core_freq(uint32_t lcore_id, uint32_t freq_index)
|
|
||||||
{
|
|
||||||
return rte_power_set_freq(lcore_id, freq_index);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_core_freq_up(uint32_t lcore_id)
|
_core_freq_up(uint32_t lcore_id)
|
||||||
{
|
{
|
||||||
@ -163,9 +150,7 @@ _deinit_core(uint32_t lcore_id)
|
|||||||
|
|
||||||
static struct spdk_governor dpdk_governor = {
|
static struct spdk_governor dpdk_governor = {
|
||||||
.name = "dpdk_governor",
|
.name = "dpdk_governor",
|
||||||
.get_core_freqs = _get_core_freqs,
|
|
||||||
.get_core_curr_freq = _get_core_curr_freq,
|
.get_core_curr_freq = _get_core_curr_freq,
|
||||||
.set_core_freq = _set_core_freq,
|
|
||||||
.core_freq_up = _core_freq_up,
|
.core_freq_up = _core_freq_up,
|
||||||
.core_freq_down = _core_freq_down,
|
.core_freq_down = _core_freq_down,
|
||||||
.set_core_freq_max = _set_core_freq_max,
|
.set_core_freq_max = _set_core_freq_max,
|
||||||
|
@ -764,9 +764,7 @@ core_freq_max(uint32_t lcore)
|
|||||||
|
|
||||||
static struct spdk_governor governor = {
|
static struct spdk_governor governor = {
|
||||||
.name = "dpdk_governor",
|
.name = "dpdk_governor",
|
||||||
.get_core_freqs = NULL,
|
|
||||||
.get_core_curr_freq = NULL,
|
.get_core_curr_freq = NULL,
|
||||||
.set_core_freq = NULL,
|
|
||||||
.core_freq_up = core_freq_up,
|
.core_freq_up = core_freq_up,
|
||||||
.core_freq_down = core_freq_down,
|
.core_freq_down = core_freq_down,
|
||||||
.set_core_freq_max = core_freq_max,
|
.set_core_freq_max = core_freq_max,
|
||||||
|
Loading…
Reference in New Issue
Block a user