In non-template API implementation on HWS, the matcher mask is translated using DV item translation. This is used to find and reuse the same matcher in the PMD for rules insertion when possible.
The flags calculated previously for items should not be passed to avoid incorrectly recognizing the layers. In the meanwhile, unlike in template API, the group information is also needed for the mask translation. Fixes: 27d171b88031 ("net/mlx5: abstract flow action and enable reconfigure") Signed-off-by: Bing Zhao <bi...@nvidia.com> Acked-by: Dariusz Sosnowski <dsosnow...@nvidia.com> --- drivers/net/mlx5/mlx5_flow_dv.c | 1 + drivers/net/mlx5/mlx5_flow_hw.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 89057edbcf..a51d4dd1a4 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -14538,6 +14538,7 @@ __flow_dv_translate_items_hws(const struct rte_flow_item *items, .next_protocol = 0xff, .attr = &rattr, .rss_desc = &rss_desc, + .group = attr->group, }; int ret = 0; diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c index 470919fe8a..46f6665846 100644 --- a/drivers/net/mlx5/mlx5_flow_hw.c +++ b/drivers/net/mlx5/mlx5_flow_hw.c @@ -13682,7 +13682,7 @@ flow_hw_create_flow(struct rte_eth_dev *dev, enum mlx5_flow_type type, .rss_level = 0, .act_flags = action_flags, .tbl_type = 0, - }; + }; memset(&hw_act, 0, sizeof(hw_act)); if (attr->transfer) @@ -13702,7 +13702,7 @@ flow_hw_create_flow(struct rte_eth_dev *dev, enum mlx5_flow_type type, (*flow)->nt_rule = true; (*flow)->nt2hws->matcher = &matcher; ret = flow_dv_translate_items_hws(items, &flow_attr, &matcher.mask.buf, - MLX5_SET_MATCHER_HS_M, &item_flags, + MLX5_SET_MATCHER_HS_M, NULL, NULL, error); if (ret) -- 2.34.1