Get PP params in line with rest of OCF

Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
Jan Musial 2019-09-18 11:11:51 +02:00
parent ecb3b25a33
commit 0e85ebe4a3
7 changed files with 14 additions and 14 deletions

View File

@ -820,7 +820,7 @@ ocf_promotion_t ocf_mngt_cache_promotion_get_policy(ocf_cache_t cache);
* @retval Non-zero Error occurred and parameter has not been set
*/
int ocf_mngt_cache_promotion_set_param(ocf_cache_t cache, uint8_t param_id,
uint64_t param_value);
uint32_t param_value);
/**
* @brief Get promotion policy parameter for given cache
@ -833,7 +833,7 @@ int ocf_mngt_cache_promotion_set_param(ocf_cache_t cache, uint8_t param_id,
* @retval Non-zero Error occurred and parameter has not been retrieved
*/
int ocf_mngt_cache_promotion_get_param(ocf_cache_t cache, uint8_t param_id,
uint64_t *param_value);
uint32_t *param_value);
/**
* @brief IO class configuration

View File

@ -2263,7 +2263,7 @@ ocf_promotion_t ocf_mngt_cache_promotion_get_policy(ocf_cache_t cache)
}
int ocf_mngt_cache_promotion_get_param(ocf_cache_t cache, uint8_t param_id,
uint64_t *param_value)
uint32_t *param_value)
{
int result;
@ -2278,7 +2278,7 @@ int ocf_mngt_cache_promotion_get_param(ocf_cache_t cache, uint8_t param_id,
}
int ocf_mngt_cache_promotion_set_param(ocf_cache_t cache, uint8_t param_id,
uint64_t param_value)
uint32_t param_value)
{
int result;

View File

@ -64,7 +64,7 @@ void nhit_deinit(ocf_promotion_policy_t policy)
}
ocf_error_t nhit_set_param(ocf_promotion_policy_t policy, uint8_t param_id,
uint64_t param_value)
uint32_t param_value)
{
struct nhit_policy_context *ctx = policy->ctx;
ocf_error_t result = 0;
@ -110,7 +110,7 @@ ocf_error_t nhit_set_param(ocf_promotion_policy_t policy, uint8_t param_id,
}
ocf_error_t nhit_get_param(ocf_promotion_policy_t policy, uint8_t param_id,
uint64_t *param_value)
uint32_t *param_value)
{
struct nhit_policy_context *ctx = policy->ctx;
ocf_error_t result = 0;

View File

@ -15,10 +15,10 @@ ocf_error_t nhit_init(ocf_cache_t cache, ocf_promotion_policy_t policy);
void nhit_deinit(ocf_promotion_policy_t policy);
ocf_error_t nhit_set_param(ocf_promotion_policy_t policy, uint8_t param_id,
uint64_t param_value);
uint32_t param_value);
ocf_error_t nhit_get_param(ocf_promotion_policy_t policy, uint8_t param_id,
uint64_t *param_value);
uint32_t *param_value);
void nhit_req_purge(ocf_promotion_policy_t policy,
struct ocf_request *req);

View File

@ -27,11 +27,11 @@ struct promotion_policy_ops {
/*!< Deinit and free promotion policy */
ocf_error_t (*set_param)(ocf_promotion_policy_t policy, uint8_t param_id,
uint64_t param_value);
uint32_t param_value);
/*!< Set promotion policy parameter */
ocf_error_t (*get_param)(ocf_promotion_policy_t policy, uint8_t param_id,
uint64_t *param_value);
uint32_t *param_value);
/*!< Get promotion policy parameter */
void (*req_purge)(ocf_promotion_policy_t policy,

View File

@ -87,7 +87,7 @@ ocf_error_t ocf_promotion_set_policy(ocf_promotion_policy_t policy,
}
ocf_error_t ocf_promotion_set_param(ocf_promotion_policy_t policy,
uint8_t param_id, uint64_t param_value)
uint8_t param_id, uint32_t param_value)
{
ocf_promotion_t type = policy->type;
ocf_error_t result = -OCF_ERR_INVAL;
@ -103,7 +103,7 @@ ocf_error_t ocf_promotion_set_param(ocf_promotion_policy_t policy,
}
ocf_error_t ocf_promotion_get_param(ocf_promotion_policy_t policy,
uint8_t param_id, uint64_t *param_value)
uint8_t param_id, uint32_t *param_value)
{
ocf_promotion_t type = policy->type;
ocf_error_t result = -OCF_ERR_INVAL;

View File

@ -51,7 +51,7 @@ ocf_error_t ocf_promotion_set_policy(ocf_promotion_policy_t policy,
* @retval ocf_error_t
*/
ocf_error_t ocf_promotion_set_param(ocf_promotion_policy_t policy,
uint8_t param_id, uint64_t param_value);
uint8_t param_id, uint32_t param_value);
/**
* @brief Get promotion policy parameter
@ -63,7 +63,7 @@ ocf_error_t ocf_promotion_set_param(ocf_promotion_policy_t policy,
* @retval ocf_error_t
*/
ocf_error_t ocf_promotion_get_param(ocf_promotion_policy_t policy,
uint8_t param_id, uint64_t *param_value);
uint8_t param_id, uint32_t *param_value);
/**
* @brief Update promotion policy after cache lines have been promoted to cache