mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 15:11:31 +00:00
IB/mlx5: Use TIR number based on selector
Use TIR number based on selector, it should be done to differentiate between RSS QP to RAW one. Reported-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Tested-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
b2a232d21f
commit
d9f88e5ab9
@ -1849,6 +1849,7 @@ static struct ib_flow *mlx5_ib_create_flow(struct ib_qp *qp,
|
||||
int domain)
|
||||
{
|
||||
struct mlx5_ib_dev *dev = to_mdev(qp->device);
|
||||
struct mlx5_ib_qp *mqp = to_mqp(qp);
|
||||
struct mlx5_ib_flow_handler *handler = NULL;
|
||||
struct mlx5_flow_destination *dst = NULL;
|
||||
struct mlx5_ib_flow_prio *ft_prio;
|
||||
@ -1875,7 +1876,10 @@ static struct ib_flow *mlx5_ib_create_flow(struct ib_qp *qp,
|
||||
}
|
||||
|
||||
dst->type = MLX5_FLOW_DESTINATION_TYPE_TIR;
|
||||
dst->tir_num = to_mqp(qp)->raw_packet_qp.rq.tirn;
|
||||
if (mqp->flags & MLX5_IB_QP_RSS)
|
||||
dst->tir_num = mqp->rss_qp.tirn;
|
||||
else
|
||||
dst->tir_num = mqp->raw_packet_qp.rq.tirn;
|
||||
|
||||
if (flow_attr->type == IB_FLOW_ATTR_NORMAL) {
|
||||
if (flow_attr->flags & IB_FLOW_ATTR_FLAGS_DONT_TRAP) {
|
||||
|
@ -402,6 +402,7 @@ enum mlx5_ib_qp_flags {
|
||||
/* QP uses 1 as its source QP number */
|
||||
MLX5_IB_QP_SQPN_QP1 = 1 << 6,
|
||||
MLX5_IB_QP_CAP_SCATTER_FCS = 1 << 7,
|
||||
MLX5_IB_QP_RSS = 1 << 8,
|
||||
};
|
||||
|
||||
struct mlx5_umr_wr {
|
||||
|
@ -1449,6 +1449,7 @@ create_tir:
|
||||
kvfree(in);
|
||||
/* qpn is reserved for that QP */
|
||||
qp->trans_qp.base.mqp.qpn = 0;
|
||||
qp->flags |= MLX5_IB_QP_RSS;
|
||||
return 0;
|
||||
|
||||
err:
|
||||
|
Loading…
Reference in New Issue
Block a user