All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] IB/mlx4: Allow to always block UD multicast loopback
@ 2014-04-21 18:09 Christoph Lameter
       [not found] ` <alpine.DEB.2.10.1404211308140.29240-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Christoph Lameter @ 2014-04-21 18:09 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Roland Dreier, Or Gerlitz

We need this option for many hosts to avoid backflow of multicast
packages. Could we get that merged?



>From 18ceae090b02b3055382e11c305dcb334d938122 Mon Sep 17 00:00:00 2001
From: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Date: Tue, 4 Mar 2014 17:20:00 +0200
Subject: [PATCH] IB/mlx4: Allow to always block UD multicast loopback

Currently, there's no way for user-space applications to specify
the IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK QP creation flags defined
by commit 47ee1b9 "IB/core: Add support for multicast loopback blocking".

As a result, applications who send and recieve on the same QP over
the same multicast group get all their packets bouncded back to them,
which is bad..

Add a module param to the mlx4_ib driver which allows to force all QP
attachements to be carried out with multicast loopback prevented.

Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/hw/mlx4/main.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index e81c554..fa01a9e 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -68,6 +68,10 @@ int mlx4_ib_sm_guid_assign = 1;
 module_param_named(sm_guid_assign, mlx4_ib_sm_guid_assign, int, 0444);
 MODULE_PARM_DESC(sm_guid_assign, "Enable SM alias_GUID assignment if sm_guid_assign > 0 (Default: 1)");

+int mlx4_block_loopback = 0;
+module_param_named(block_loopback, mlx4_block_loopback, int, 0644);
+MODULE_PARM_DESC(block_loopback, "Always block UD multicast loopback packets if > 0");
+
 static const char mlx4_ib_version[] =
 	DRV_NAME ": Mellanox ConnectX InfiniBand driver v"
 	DRV_VERSION " (" DRV_RELDATE ")\n";
@@ -1163,6 +1167,8 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
 	struct mlx4_ib_steering *ib_steering = NULL;
 	enum mlx4_protocol prot = (gid->raw[1] == 0x0e) ?
 		MLX4_PROT_IB_IPV4 : MLX4_PROT_IB_IPV6;
+	int block_mcast_loopback = (!!(mqp->flags & MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK)) |
+				   mlx4_block_loopback;

 	if (mdev->dev->caps.steering_mode ==
 	    MLX4_STEERING_MODE_DEVICE_MANAGED) {
@@ -1172,8 +1178,7 @@ static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
 	}

 	err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, mqp->port,
-				    !!(mqp->flags &
-				       MLX4_IB_QP_BLOCK_MULTICAST_LOOPBACK),
+				    block_mcast_loopback,
 				    prot, &reg_id);
 	if (err)
 		goto err_malloc;
-- 
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] 26+ messages in thread

end of thread, other threads:[~2014-05-06 20:47 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-21 18:09 [PATCH] IB/mlx4: Allow to always block UD multicast loopback Christoph Lameter
     [not found] ` <alpine.DEB.2.10.1404211308140.29240-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-21 20:44   ` Or Gerlitz
     [not found]     ` <CAJZOPZJfdaZ7QzgffzY9Ps-1aUCU+q_dSrj4XfekyfxNa-k+hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-21 21:06       ` Christoph Lameter
     [not found]         ` <alpine.DEB.2.10.1404211605390.29907-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-21 21:10           ` Or Gerlitz
     [not found]             ` <CAJZOPZ+FwPc3OSVyvk0i4=gX-x0zf_+M8zL1_t9HWmEKi5397Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-22  0:26               ` Christoph Lameter
     [not found]                 ` <alpine.DEB.2.10.1404211926050.31858-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-22 13:48                   ` Christoph Lameter
     [not found]                     ` <alpine.DEB.2.10.1404220844430.4876-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-22 16:01                       ` Or Gerlitz
     [not found]                         ` <53569261.9010805-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-04-29 17:32                           ` Christoph Lameter
     [not found]                             ` <alpine.DEB.2.10.1404291231250.26056-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-30 19:41                               ` Or Gerlitz
     [not found]                                 ` <CAJZOPZJUksc6f6FMhenWJe5uvEVQ898ZQoLD0ss6vSrMC42ZPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-30 23:18                                   ` Christoph Lameter
2014-04-30 23:28   ` Doug Ledford
     [not found] ` <53619638.48ae0e0a.2e40.ffffec09SMTPIN_ADDED_BROKEN@mx.google.com>
     [not found]   ` <53619638.48ae0e0a.2e40.ffffec09SMTPIN_ADDED_BROKEN-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2014-05-01  6:12     ` Or Gerlitz
     [not found]       ` <5361E5C7.5030805-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-05-01 15:34         ` Doug Ledford
     [not found]       ` <1980561.1785.1398958457283.JavaMail."DougALedford"@Phenom>
2014-05-05 17:53         ` Hefty, Sean
     [not found]           ` <1828884A29C6694DAF28B7E6B8A82373992F869F-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-05-05 22:54             ` Christoph Lameter
     [not found]               ` <alpine.DEB.2.10.1405051754260.5069-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-05 22:57                 ` Hefty, Sean
     [not found]                   ` <1828884A29C6694DAF28B7E6B8A82373992F899C-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-05-06  0:26                     ` Christoph Lameter
2014-05-06 19:16                     ` Christoph Lameter
     [not found]                       ` <alpine.DEB.2.10.1405061414460.4548-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-06 19:25                         ` Doug Ledford
     [not found]                       ` <53693749.64db420a.500a.ffffe917SMTPIN_ADDED_BROKEN@mx.google.com>
     [not found]                         ` <53693749.64db420a.500a.ffffe917SMTPIN_ADDED_BROKEN-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2014-05-06 20:08                           ` Christoph Lameter
     [not found]                             ` <alpine.DEB.2.10.1405061503550.5175-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-06 20:20                               ` Hefty, Sean
2014-05-06 20:47                               ` Doug Ledford
     [not found] ` <5361871e.c793420a.67de.2282SMTPIN_ADDED_BROKEN@mx.google.com>
     [not found]   ` <5361871e.c793420a.67de.2282SMTPIN_ADDED_BROKEN-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2014-05-01 14:09     ` Christoph Lameter
     [not found]       ` <alpine.DEB.2.10.1405010907570.10334-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-01 15:32         ` Doug Ledford
     [not found]       ` <53626915.25fc420a.01b7.7ebbSMTPIN_ADDED_BROKEN@mx.google.com>
     [not found]         ` <53626915.25fc420a.01b7.7ebbSMTPIN_ADDED_BROKEN-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2014-05-01 15:59           ` Christoph Lameter
     [not found]             ` <alpine.DEB.2.10.1405011059240.11342-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-05 17:31               ` Christoph Lameter

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.