diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2014-09-11 13:11:19 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-09-22 18:46:53 +0200 |
commit | 3dec48788817fce4a029cbab14f2b407ae78478f (patch) | |
tree | 9aa4bfeef116f997df68437d08abaa041aac85bd /drivers/infiniband/hw/mlx4/qp.c | |
parent | IB/mlx4: Don't update QP1 in native mode (diff) | |
download | linux-3dec48788817fce4a029cbab14f2b407ae78478f.tar.xz linux-3dec48788817fce4a029cbab14f2b407ae78478f.zip |
IB/mlx4: Do not allow APM under RoCE
Automatic Path Migration is not supported under RoCE. Therefore,
return a "not-supported" error if the caller attempts to set an
alternate path in a QP context.
In addition, if there are no IB ports configured, do not report
APM capability in the device flags returned by mlx4_ib_query_device.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/qp.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 25e0208588e6..393423c69c00 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -1424,6 +1424,12 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, int steer_qp = 0; int err = -EINVAL; + /* APM is not supported under RoCE */ + if (attr_mask & IB_QP_ALT_PATH && + rdma_port_get_link_layer(&dev->ib_dev, qp->port) == + IB_LINK_LAYER_ETHERNET) + return -ENOTSUPP; + context = kzalloc(sizeof *context, GFP_KERNEL); if (!context) return -ENOMEM; |