From: Ori Kam <or...@nvidia.com>

Due to mlx5dr internal logic calling the rule_create function
must have items structure.

This commit create such temp structure.

Fixes: fa16fead9a68 ("net/mlx5/hws: support rule update after its creation")
Cc: ere...@nvidia.com

Signed-off-by: Ori Kam <or...@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index ea43ebb78b..2148f5a63a 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -2987,6 +2987,7 @@ flow_hw_async_flow_create_by_index(struct rte_eth_dev 
*dev,
                          void *user_data,
                          struct rte_flow_error *error)
 {
+       struct rte_flow_item items[] = {{.type = RTE_FLOW_ITEM_TYPE_END,}};
        struct mlx5_priv *priv = dev->data->dev_private;
        struct mlx5dr_rule_attr rule_attr = {
                .queue_id = queue,
@@ -3050,7 +3051,7 @@ flow_hw_async_flow_create_by_index(struct rte_eth_dev 
*dev,
                goto free;
        }
        ret = mlx5dr_rule_create(table->matcher,
-                                0, NULL, action_template_index, rule_acts,
+                                0, items, action_template_index, rule_acts,
                                 &rule_attr, (struct mlx5dr_rule *)flow->rule);
        if (likely(!ret))
                return (struct rte_flow *)flow;
-- 
2.39.2

Reply via email to