Skip to content

Commit f4e56ec

Browse files
rleonjgunthorpe
authored andcommitted
RDMA/mlx4: Return missed an error if device doesn't support steering
The error flow fixed in this patch is not possible because all kernel users of create QP interface check that device supports steering before set IB_QP_CREATE_NETIF_QP flag. Fixes: c1c9850 ("IB/mlx4: Add support for steerable IB UD QPs") Link: https://lore.kernel.org/r/91c61f6e60eb0240f8bbc321fda7a1d2986dd03c.1634023677.git.leonro@nvidia.com Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 9d8f247 commit f4e56ec

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/infiniband/hw/mlx4

‎drivers/infiniband/hw/mlx4/qp.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,8 +1099,10 @@ static int create_qp_common(struct ib_pd *pd, struct ib_qp_init_attr *init_attr,
10991099
if (dev->steering_support ==
11001100
MLX4_STEERING_MODE_DEVICE_MANAGED)
11011101
qp->flags |= MLX4_IB_QP_NETIF;
1102-
else
1102+
else {
1103+
err = -EINVAL;
11031104
goto err;
1105+
}
11041106
}
11051107

11061108
err = set_kernel_sq_size(dev, &init_attr->cap, qp_type, qp);

0 commit comments

Comments
 (0)