net/mlx5: fix comparison sign in flow engine
The clang compiler warns on size mismatches of several comparisons. warning: comparison of integers of different signs To resolve those the right types is used/cast to. Fixes:3e8edd0ef8
("net/mlx5: update metadata register ID query") Fixes:e554b672aa
("net/mlx5: support flow tag") Fixes:c8f0abe7f8
("net/mlx5: fix meter color register consideration") Cc: stable@dpdk.org Signed-off-by: Tal Shnaiderman <talshn@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
This commit is contained in:
parent
084de7a108
commit
16047bd015
@ -798,7 +798,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
|
|||||||
start_reg = priv->mtr_color_reg != REG_C_2 ? REG_C_2 :
|
start_reg = priv->mtr_color_reg != REG_C_2 ? REG_C_2 :
|
||||||
(priv->mtr_reg_share ? REG_C_3 : REG_C_4);
|
(priv->mtr_reg_share ? REG_C_3 : REG_C_4);
|
||||||
skip_mtr_reg = !!(priv->mtr_en && start_reg == REG_C_2);
|
skip_mtr_reg = !!(priv->mtr_en && start_reg == REG_C_2);
|
||||||
if (id > (REG_C_7 - start_reg))
|
if (id > (uint32_t)(REG_C_7 - start_reg))
|
||||||
return rte_flow_error_set(error, EINVAL,
|
return rte_flow_error_set(error, EINVAL,
|
||||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||||
NULL, "invalid tag id");
|
NULL, "invalid tag id");
|
||||||
@ -814,7 +814,7 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
|
|||||||
*/
|
*/
|
||||||
if (skip_mtr_reg && config->flow_mreg_c
|
if (skip_mtr_reg && config->flow_mreg_c
|
||||||
[id + start_reg - REG_C_0] >= priv->mtr_color_reg) {
|
[id + start_reg - REG_C_0] >= priv->mtr_color_reg) {
|
||||||
if (id >= (REG_C_7 - start_reg))
|
if (id >= (uint32_t)(REG_C_7 - start_reg))
|
||||||
return rte_flow_error_set(error, EINVAL,
|
return rte_flow_error_set(error, EINVAL,
|
||||||
RTE_FLOW_ERROR_TYPE_ITEM,
|
RTE_FLOW_ERROR_TYPE_ITEM,
|
||||||
NULL, "invalid tag id");
|
NULL, "invalid tag id");
|
||||||
|
@ -955,7 +955,7 @@ flow_dv_convert_action_set_reg
|
|||||||
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
|
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
|
||||||
"too many items to modify");
|
"too many items to modify");
|
||||||
MLX5_ASSERT(conf->id != REG_NON);
|
MLX5_ASSERT(conf->id != REG_NON);
|
||||||
MLX5_ASSERT(conf->id < RTE_DIM(reg_to_field));
|
MLX5_ASSERT(conf->id < (enum modify_reg)RTE_DIM(reg_to_field));
|
||||||
actions[i] = (struct mlx5_modification_cmd) {
|
actions[i] = (struct mlx5_modification_cmd) {
|
||||||
.action_type = MLX5_MODIFICATION_TYPE_SET,
|
.action_type = MLX5_MODIFICATION_TYPE_SET,
|
||||||
.field = reg_to_field[conf->id],
|
.field = reg_to_field[conf->id],
|
||||||
|
@ -188,7 +188,7 @@ mlx5_flow_os_create_flow(void *matcher, void *match_value,
|
|||||||
void *actions[], void **flow)
|
void *actions[], void **flow)
|
||||||
{
|
{
|
||||||
struct mlx5_action *action;
|
struct mlx5_action *action;
|
||||||
int i;
|
size_t i;
|
||||||
struct mlx5_matcher *mlx5_matcher = matcher;
|
struct mlx5_matcher *mlx5_matcher = matcher;
|
||||||
struct mlx5_flow_dv_match_params *mlx5_match_value = match_value;
|
struct mlx5_flow_dv_match_params *mlx5_match_value = match_value;
|
||||||
uint32_t in[MLX5_ST_SZ_DW(devx_fs_rule_add_in)] = {0};
|
uint32_t in[MLX5_ST_SZ_DW(devx_fs_rule_add_in)] = {0};
|
||||||
|
Loading…
Reference in New Issue
Block a user