From 139f396bc00475790d1d7e15942e308288b7a7e6 Mon Sep 17 00:00:00 2001 From: Shun Hao Date: Thu, 3 Nov 2022 17:33:26 +0200 Subject: [PATCH] net/mlx5: fix match mask for meter flow There's an issue introduced by the change of splitting item matcher and value translation, that the matcher mask value for color is not set correctly in meter policy flow creation. This patch fixes this by providing the correct color mask. Fixes: cd4ab742064a ("net/mlx5: split flow item matcher and value translation") Cc: stable@dpdk.org Signed-off-by: Shun Hao Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_flow_dv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 13b6037b33..acd7ea8b79 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9717,8 +9717,8 @@ flow_dv_translate_item_mpls(void *key, const struct rte_flow_item *item, * Flow matcher value. * @param[in] reg_type * Type of device metadata register - * @param[in] value - * Register value + * @param[in] data + * Register data * @param[in] mask * Register mask */ @@ -17122,7 +17122,7 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev, tbl_data = container_of(tbl_rsc, struct mlx5_flow_tbl_data_entry, tbl); if (priority < RTE_COLOR_RED) flow_dv_match_meta_reg(matcher.mask.buf, - (enum modify_reg)color_reg_c_idx, 0, color_mask); + (enum modify_reg)color_reg_c_idx, color_mask, color_mask); matcher.priority = priority; matcher.crc = rte_raw_cksum((const void *)matcher.mask.buf, matcher.mask.size);