Message ID | 1418825854-30022-1-git-send-email-ogerlitz@mellanox.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On 12/17/2014 9:17 AM, Or Gerlitz wrote: > The MLX4_PROT_IB_IPV4 protocol should only be used with RoCEv2 and such. > Removing this wrong usage allows to run multicast applications over RoCE. > > Fixes: d487ee77740c ('IB/mlx4: Use IBoE (RoCE) IP based GIDs in the port GID table') > Reported-by: Carol Soto <clsoto@linux.vnet.ibm.com> > Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> > --- Roland, you missed picking this one (was sent to you whole two months ago) for 3.19 and meanwhile some code went into mlx4 from the net-next tree which will cause a small collision here. I am traveling now and can't send you the revised patch but it should be very easy to generate, just 1-2 lines added. I would suggest for you to rebase against Dave's net tree or Linus tree, you should also see it from 0-days builds if you wait few hours. > drivers/infiniband/hw/mlx4/main.c | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c > index e861330..ea69975 100644 > --- a/drivers/infiniband/hw/mlx4/main.c > +++ b/drivers/infiniband/hw/mlx4/main.c > @@ -1221,8 +1221,7 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) > struct mlx4_ib_qp *mqp = to_mqp(ibqp); > u64 reg_id; > struct mlx4_ib_steering *ib_steering = NULL; > - enum mlx4_protocol prot = (gid->raw[1] == 0x0e) ? > - MLX4_PROT_IB_IPV4 : MLX4_PROT_IB_IPV6; > + enum mlx4_protocol prot = MLX4_PROT_IB_IPV6; > > if (mdev->dev->caps.steering_mode == > MLX4_STEERING_MODE_DEVICE_MANAGED) { > @@ -1235,8 +1234,10 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) > !!(mqp->flags & > MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK), > prot, ®_id); > - if (err) > + if (err) { > + pr_err("multicast attach op failed, err %d\n", err); > goto err_malloc; > + } > > err = add_gid_entry(ibqp, gid); > if (err) > @@ -1284,8 +1285,7 @@ static int mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) > struct net_device *ndev; > struct mlx4_ib_gid_entry *ge; > u64 reg_id = 0; > - enum mlx4_protocol prot = (gid->raw[1] == 0x0e) ? > - MLX4_PROT_IB_IPV4 : MLX4_PROT_IB_IPV6; > + enum mlx4_protocol prot = MLX4_PROT_IB_IPV6; > > if (mdev->dev->caps.steering_mode == > MLX4_STEERING_MODE_DEVICE_MANAGED) { -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index e861330..ea69975 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -1221,8 +1221,7 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) struct mlx4_ib_qp *mqp = to_mqp(ibqp); u64 reg_id; struct mlx4_ib_steering *ib_steering = NULL; - enum mlx4_protocol prot = (gid->raw[1] == 0x0e) ? - MLX4_PROT_IB_IPV4 : MLX4_PROT_IB_IPV6; + enum mlx4_protocol prot = MLX4_PROT_IB_IPV6; if (mdev->dev->caps.steering_mode == MLX4_STEERING_MODE_DEVICE_MANAGED) { @@ -1235,8 +1234,10 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) !!(mqp->flags & MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK), prot, ®_id); - if (err) + if (err) { + pr_err("multicast attach op failed, err %d\n", err); goto err_malloc; + } err = add_gid_entry(ibqp, gid); if (err) @@ -1284,8 +1285,7 @@ static int mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) struct net_device *ndev; struct mlx4_ib_gid_entry *ge; u64 reg_id = 0; - enum mlx4_protocol prot = (gid->raw[1] == 0x0e) ? - MLX4_PROT_IB_IPV4 : MLX4_PROT_IB_IPV6; + enum mlx4_protocol prot = MLX4_PROT_IB_IPV6; if (mdev->dev->caps.steering_mode == MLX4_STEERING_MODE_DEVICE_MANAGED) {
The MLX4_PROT_IB_IPV4 protocol should only be used with RoCEv2 and such. Removing this wrong usage allows to run multicast applications over RoCE. Fixes: d487ee77740c ('IB/mlx4: Use IBoE (RoCE) IP based GIDs in the port GID table') Reported-by: Carol Soto <clsoto@linux.vnet.ibm.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> --- drivers/infiniband/hw/mlx4/main.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)