* [PATCH for-next] IB/mlx5: Add block multicast loopback support
@ 2014-04-01 21:10 Or Gerlitz
[not found] ` <1396386616-17846-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Or Gerlitz @ 2014-04-01 21:10 UTC (permalink / raw)
To: roland-DgEjT+Ai2ygdnm+yROfE0A
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, cl-vYTEC60ixJUAvxtiuMwx3w,
Eli Cohen, Eli Cohen, Or Gerlitz
From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Add support for the block multicast loopback QP creation flag along
the proper firmware API for that.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/hw/mlx5/main.c | 2 ++
drivers/infiniband/hw/mlx5/qp.c | 12 ++++++++++++
include/linux/mlx5/device.h | 1 +
include/linux/mlx5/qp.h | 1 +
4 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 7b9c078..7470f8b 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -282,6 +282,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
props->sig_guard_cap = IB_GUARD_T10DIF_CRC |
IB_GUARD_T10DIF_CSUM;
}
+ if (flags & MLX5_DEV_CAP_FLAG_BLOCK_MCAST)
+ props->device_cap_flags |= IB_DEVICE_BLOCK_MULTICAST_LOOPBACK;
props->vendor_id = be32_to_cpup((__be32 *)(out_mad->data + 36)) &
0xffffff;
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index ae788d2..dc930ed 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -807,6 +807,15 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
spin_lock_init(&qp->sq.lock);
spin_lock_init(&qp->rq.lock);
+ if (init_attr->create_flags & IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK) {
+ if (!(dev->mdev.caps.flags & MLX5_DEV_CAP_FLAG_BLOCK_MCAST)) {
+ mlx5_ib_dbg(dev, "block multicast loopback isn't supported\n");
+ return -EINVAL;
+ } else {
+ qp->flags |= MLX5_IB_QP_BLOCK_MULTICAST_LOOPBACK;
+ }
+ }
+
if (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR)
qp->sq_signal_bits = MLX5_WQE_CTRL_CQ_UPDATE;
@@ -878,6 +887,9 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
if (qp->wq_sig)
in->ctx.flags_pd |= cpu_to_be32(MLX5_QP_ENABLE_SIG);
+ if (qp->flags & MLX5_IB_QP_BLOCK_MULTICAST_LOOPBACK)
+ in->ctx.flags_pd |= cpu_to_be32(MLX5_QP_BLOCK_MCAST);
+
if (qp->scat_cqe && is_connected(init_attr->qp_type)) {
int rcqe_sz;
int scqe_sz;
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index 407bdb6..3406cfb 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -179,6 +179,7 @@ enum {
MLX5_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9,
MLX5_DEV_CAP_FLAG_APM = 1LL << 17,
MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 18,
+ MLX5_DEV_CAP_FLAG_BLOCK_MCAST = 1LL << 23,
MLX5_DEV_CAP_FLAG_ON_DMND_PG = 1LL << 24,
MLX5_DEV_CAP_FLAG_CQ_MODER = 1LL << 29,
MLX5_DEV_CAP_FLAG_RESIZE_CQ = 1LL << 30,
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h
index f829ad8..9709b30 100644
--- a/include/linux/mlx5/qp.h
+++ b/include/linux/mlx5/qp.h
@@ -146,6 +146,7 @@ enum {
enum {
MLX5_QP_LAT_SENSITIVE = 1 << 28,
+ MLX5_QP_BLOCK_MCAST = 1 << 30,
MLX5_QP_ENABLE_SIG = 1 << 31,
};
--
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] 6+ messages in thread
* Re: [PATCH for-next] IB/mlx5: Add block multicast loopback support
[not found] ` <1396386616-17846-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2014-04-21 17:56 ` Christoph Lameter
[not found] ` <alpine.DEB.2.10.1404211256240.29240-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Lameter @ 2014-04-21 17:56 UTC (permalink / raw)
To: Or Gerlitz
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
Eli Cohen, Eli Cohen
On Wed, 2 Apr 2014, Or Gerlitz wrote:
> From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
>
> Add support for the block multicast loopback QP creation flag along
> the proper firmware API for that.
Could we get this merged? We need this on a lot of systems.
--
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] 6+ messages in thread
* Re: [PATCH for-next] IB/mlx5: Add block multicast loopback support
[not found] ` <alpine.DEB.2.10.1404211256240.29240-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
@ 2014-04-21 18:25 ` Roland Dreier
[not found] ` <CAG4TOxPx5q_rtP1f5ba3H0t8BdM5Svqz7xpArOKgXj6JM=X0ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Roland Dreier @ 2014-04-21 18:25 UTC (permalink / raw)
To: Christoph Lameter
Cc: Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Eli Cohen, Eli Cohen
commit f360d88a2efd upstream.
On Mon, Apr 21, 2014 at 10:56 AM, Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org> wrote:
> On Wed, 2 Apr 2014, Or Gerlitz wrote:
>
>> From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
>>
>> Add support for the block multicast loopback QP creation flag along
>> the proper firmware API for that.
>
> Could we get this merged? We need this on a lot of systems.
>
--
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] 6+ messages in thread
* Re: [PATCH for-next] IB/mlx5: Add block multicast loopback support
[not found] ` <CAG4TOxPx5q_rtP1f5ba3H0t8BdM5Svqz7xpArOKgXj6JM=X0ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-21 18:59 ` Christoph Lameter
[not found] ` <alpine.DEB.2.10.1404211358280.29907-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Lameter @ 2014-04-21 18:59 UTC (permalink / raw)
To: Roland Dreier
Cc: Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Eli Cohen, Eli Cohen
On Mon, 21 Apr 2014, Roland Dreier wrote:
> commit f360d88a2efd upstream.
Great. Is there a corresponding patch for mlx4? Dont see that in the
kernel and we have mostly mlx4.
--
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] 6+ messages in thread
* Re: [PATCH for-next] IB/mlx5: Add block multicast loopback support
[not found] ` <alpine.DEB.2.10.1404211358280.29907-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
@ 2014-04-21 20:39 ` Roland Dreier
[not found] ` <CAG4TOxMb2RmKsKmRUhRM_OXE7bE1Snie6dfjy9r1esAmK2B_Fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Roland Dreier @ 2014-04-21 20:39 UTC (permalink / raw)
To: Christoph Lameter
Cc: Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Eli Cohen, Eli Cohen
Is something more than commit 521e575b9a73 (from 2008) required?
On Mon, Apr 21, 2014 at 11:59 AM, Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org> wrote:
> On Mon, 21 Apr 2014, Roland Dreier wrote:
>
>> commit f360d88a2efd upstream.
>
> Great. Is there a corresponding patch for mlx4? Dont see that in the
> kernel and we have mostly mlx4.
>
--
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] 6+ messages in thread
* Re: [PATCH for-next] IB/mlx5: Add block multicast loopback support
[not found] ` <CAG4TOxMb2RmKsKmRUhRM_OXE7bE1Snie6dfjy9r1esAmK2B_Fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-21 21:05 ` Christoph Lameter
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Lameter @ 2014-04-21 21:05 UTC (permalink / raw)
To: Roland Dreier
Cc: Or Gerlitz, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Eli Cohen, Eli Cohen
On Mon, 21 Apr 2014, Roland Dreier wrote:
> Is something more than commit 521e575b9a73 (from 2008) required?
Reviewing that right now. If it does what it seems to do then we are fine.
--
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] 6+ messages in thread
end of thread, other threads:[~2014-04-21 21:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-01 21:10 [PATCH for-next] IB/mlx5: Add block multicast loopback support Or Gerlitz
[not found] ` <1396386616-17846-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-04-21 17:56 ` Christoph Lameter
[not found] ` <alpine.DEB.2.10.1404211256240.29240-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-21 18:25 ` Roland Dreier
[not found] ` <CAG4TOxPx5q_rtP1f5ba3H0t8BdM5Svqz7xpArOKgXj6JM=X0ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-21 18:59 ` Christoph Lameter
[not found] ` <alpine.DEB.2.10.1404211358280.29907-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-21 20:39 ` Roland Dreier
[not found] ` <CAG4TOxMb2RmKsKmRUhRM_OXE7bE1Snie6dfjy9r1esAmK2B_Fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-21 21:05 ` 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.