Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73aaa622 authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Greg Kroah-Hartman
Browse files

RDMA/mlx4: Return missed an error if device doesn't support steering

[ Upstream commit f4e56ec4452f48b8292dcf0e1c4bdac83506fb8b ]

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: c1c98501 ("IB/mlx4: Add support for steerable IB UD QPs")
Link: https://lore.kernel.org/r/91c61f6e60eb0240f8bbc321fda7a1d2986dd03c.1634023677.git.leonro@nvidia.com


Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 20dfad97
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1149,9 +1149,11 @@ static int create_qp_common(struct ib_pd *pd, struct ib_qp_init_attr *init_attr,
			if (dev->steering_support ==
			    MLX4_STEERING_MODE_DEVICE_MANAGED)
				qp->flags |= MLX4_IB_QP_NETIF;
			else
			else {
				err = -EINVAL;
				goto err;
			}
		}

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