Commit 8c49f54a authored by Raed Salem's avatar Raed Salem Committed by Saeed Mahameed

net/mlx5: Fix 'DON'T_TRAP' functionality

The flow counters binding support commit introduced a code change where
none NULL 'rule_dest' is always passed to mlx5_add_flow_rules, this breaks
'DON'T_TRAP' rules insertion.

The fix uses the equivalent 'dest_num' value instead of dest pointer
at the failed check.

fixes: 3b3233fb ('IB/mlx5: Add flow counters binding support')
Signed-off-by: default avatarRaed Salem <raeds@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 443a8581
...@@ -1887,7 +1887,7 @@ mlx5_add_flow_rules(struct mlx5_flow_table *ft, ...@@ -1887,7 +1887,7 @@ mlx5_add_flow_rules(struct mlx5_flow_table *ft,
if (flow_act->action == MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO) { if (flow_act->action == MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO) {
if (!fwd_next_prio_supported(ft)) if (!fwd_next_prio_supported(ft))
return ERR_PTR(-EOPNOTSUPP); return ERR_PTR(-EOPNOTSUPP);
if (dest) if (dest_num)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
mutex_lock(&root->chain_lock); mutex_lock(&root->chain_lock);
next_ft = find_next_chained_ft(prio); next_ft = find_next_chained_ft(prio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment