Commit 5497adc6 authored by Maor Gottlieb's avatar Maor Gottlieb Committed by Doug Ledford

IB/mlx5: Save flow table priority handler instead of index

Saving the flow table priority object's pointer in the flow handle
is necessary for downstream patches since the sniffer flow table isn't
placed at the standard flow_db structure but in a different database.
Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 7055a294
...@@ -1654,7 +1654,7 @@ static int mlx5_ib_destroy_flow(struct ib_flow *flow_id) ...@@ -1654,7 +1654,7 @@ static int mlx5_ib_destroy_flow(struct ib_flow *flow_id)
} }
mlx5_del_flow_rule(handler->rule); mlx5_del_flow_rule(handler->rule);
put_flow_table(dev, &dev->flow_db.prios[handler->prio], true); put_flow_table(dev, handler->prio, true);
mutex_unlock(&dev->flow_db.lock); mutex_unlock(&dev->flow_db.lock);
kfree(handler); kfree(handler);
...@@ -1776,7 +1776,7 @@ static struct mlx5_ib_flow_handler *create_flow_rule(struct mlx5_ib_dev *dev, ...@@ -1776,7 +1776,7 @@ static struct mlx5_ib_flow_handler *create_flow_rule(struct mlx5_ib_dev *dev,
goto free; goto free;
} }
handler->prio = ft_prio - dev->flow_db.prios; handler->prio = ft_prio;
ft_prio->flow_table = ft; ft_prio->flow_table = ft;
free: free:
......
...@@ -150,7 +150,7 @@ struct mlx5_ib_flow_prio { ...@@ -150,7 +150,7 @@ struct mlx5_ib_flow_prio {
struct mlx5_ib_flow_handler { struct mlx5_ib_flow_handler {
struct list_head list; struct list_head list;
struct ib_flow ibflow; struct ib_flow ibflow;
unsigned int prio; struct mlx5_ib_flow_prio *prio;
struct mlx5_flow_rule *rule; struct mlx5_flow_rule *rule;
}; };
......
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