* [PATCH] IB/mlx4: Fix wrong usage of IPv4 protocol for multicast attach/detach
@ 2014-12-17 14:17 Or Gerlitz
[not found] ` <1418825854-30022-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Or Gerlitz @ 2014-12-17 14:17 UTC (permalink / raw)
To: Roland Dreier
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Doug Ledford, Amir Vadai,
Or Gerlitz
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-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
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) {
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <1418825854-30022-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH] IB/mlx4: Fix wrong usage of IPv4 protocol for multicast attach/detach [not found] ` <1418825854-30022-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> @ 2015-02-18 5:10 ` Or Gerlitz 0 siblings, 0 replies; 2+ messages in thread From: Or Gerlitz @ 2015-02-18 5:10 UTC (permalink / raw) To: Roland Dreier; +Cc: linux-rdma, Roland Dreier, Amir Vadai 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-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> > Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> > --- 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-18 5:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 14:17 [PATCH] IB/mlx4: Fix wrong usage of IPv4 protocol for multicast attach/detach Or Gerlitz
[not found] ` <1418825854-30022-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-18 5:10 ` Or Gerlitz
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.