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: cd4ab74206 ("net/mlx5: split flow item matcher and value translation")
Cc: stable@dpdk.org

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
This commit is contained in:
Shun Hao 2022-11-03 17:33:26 +02:00 committed by Raslan Darawsheh
parent aeca11f82a
commit 139f396bc0

View File

@ -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);