mirror of https://gitee.com/openkylin/linux.git
RDMA/mlx5: Don't rely on FW to set zeros in ECE response
The FW returns zeros in case feature is not enabled, but it is better to
have the capability check and ensure that returned result is cleared.
Fixes: 3e09a427ae
("RDMA/mlx5: Get ECE options from FW during create QP")
Link: https://lore.kernel.org/r/20200602125548.172654-3-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
6512f11d38
commit
92cd667c0e
drivers/infiniband/hw/mlx5
|
@ -1906,6 +1906,7 @@ static int create_xrc_tgt_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
|
||||||
|
|
||||||
base->container_mibqp = qp;
|
base->container_mibqp = qp;
|
||||||
base->mqp.event = mlx5_ib_qp_event;
|
base->mqp.event = mlx5_ib_qp_event;
|
||||||
|
if (MLX5_CAP_GEN(mdev, ece_support))
|
||||||
params->resp.ece_options = MLX5_GET(create_qp_out, out, ece);
|
params->resp.ece_options = MLX5_GET(create_qp_out, out, ece);
|
||||||
|
|
||||||
spin_lock_irqsave(&dev->reset_flow_resource_lock, flags);
|
spin_lock_irqsave(&dev->reset_flow_resource_lock, flags);
|
||||||
|
@ -2082,6 +2083,7 @@ static int create_user_qp(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
||||||
|
|
||||||
base->container_mibqp = qp;
|
base->container_mibqp = qp;
|
||||||
base->mqp.event = mlx5_ib_qp_event;
|
base->mqp.event = mlx5_ib_qp_event;
|
||||||
|
if (MLX5_CAP_GEN(mdev, ece_support))
|
||||||
params->resp.ece_options = MLX5_GET(create_qp_out, out, ece);
|
params->resp.ece_options = MLX5_GET(create_qp_out, out, ece);
|
||||||
|
|
||||||
get_cqs(qp->type, init_attr->send_cq, init_attr->recv_cq,
|
get_cqs(qp->type, init_attr->send_cq, init_attr->recv_cq,
|
||||||
|
|
Loading…
Reference in New Issue