* [PATCH] mlx4: Non-xrc SRQs need an xrcd which will never be used by xrc
@ 2011-06-22 12:33 Jack Morgenstein
[not found] ` <201106221533.41053.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jack Morgenstein @ 2011-06-22 12:33 UTC (permalink / raw)
To: Sean Hefty
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, dotanb-VPRAkNaXOzVS1MOuV/RT9w
Non-xrc SRQs should be created with a domain number which will never
be assigned to an XRC TGT QP. This is so there is no possibility of such an SRQ
inadvertently receiving an XRC transmission.
XRC Domain number allocations begin with (dev->dev->caps.reserved_xrcds + 1);
Domain number (dev->dev->caps.reserved_xrcds) has been set aside to be used
for this purpose.
Signed-off-by: Jack Morgenstein <jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
---
Sean,
This was a little "glitch" that I noticed during my code review.
-Jack
diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c
index 361838f..39542f3 100644
--- a/drivers/infiniband/hw/mlx4/srq.c
+++ b/drivers/infiniband/hw/mlx4/srq.c
@@ -77,7 +77,7 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd,
struct mlx4_wqe_srq_next_seg *next;
struct mlx4_wqe_data_seg *scatter;
u32 cqn;
- u32 xrcdn;
+ u16 xrcdn;
int desc_size;
int buf_size;
int err;
@@ -179,7 +179,8 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd,
cqn = (init_attr->srq_type == IB_SRQT_XRC) ?
to_mcq(init_attr->ext.xrc.cq)->mcq.cqn : 0;
xrcdn = (init_attr->srq_type == IB_SRQT_XRC) ?
- to_mxrcd(init_attr->ext.xrc.xrcd)->xrcdn : 0;
+ to_mxrcd(init_attr->ext.xrc.xrcd)->xrcdn :
+ (u16) dev->dev->caps.reserved_xrcds;
err = mlx4_srq_alloc(dev->dev, to_mpd(pd)->pdn, cqn, xrcdn, &srq->mtt,
srq->db.dma, &srq->msrq);
if (err)
--
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] 3+ messages in thread
* RE: [PATCH] mlx4: Non-xrc SRQs need an xrcd which will never be used by xrc
[not found] ` <201106221533.41053.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2011-06-22 16:05 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373029A79-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Hefty, Sean @ 2011-06-22 16:05 UTC (permalink / raw)
To: Jack Morgenstein
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, dotanb-VPRAkNaXOzVS1MOuV/RT9w
> Non-xrc SRQs should be created with a domain number which will never
> be assigned to an XRC TGT QP. This is so there is no possibility of such
> an SRQ
> inadvertently receiving an XRC transmission.
>
> XRC Domain number allocations begin with (dev->dev->caps.reserved_xrcds +
> 1);
> Domain number (dev->dev->caps.reserved_xrcds) has been set aside to be
> used
> for this purpose.
>
> Signed-off-by: Jack Morgenstein <jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
>
> ---
> Sean,
> This was a little "glitch" that I noticed during my code review.
Thanks - If it's okay, I'll merge this change into the existing patches.
- Sean
--
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] 3+ messages in thread
* Re: [PATCH] mlx4: Non-xrc SRQs need an xrcd which will never be used by xrc
[not found] ` <1828884A29C6694DAF28B7E6B8A82373029A79-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2011-06-22 16:18 ` Jack Morgenstein
0 siblings, 0 replies; 3+ messages in thread
From: Jack Morgenstein @ 2011-06-22 16:18 UTC (permalink / raw)
To: Hefty, Sean
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, dotanb-VPRAkNaXOzVS1MOuV/RT9w
On Wednesday 22 June 2011 19:05, Hefty, Sean wrote:
> Sean,
> > This was a little "glitch" that I noticed during my code review.
>
> Thanks - If it's okay, I'll merge this change into the existing patches.
That's just fine!
-Jack
> - Sean
>
--
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] 3+ messages in thread
end of thread, other threads:[~2011-06-22 16:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-22 12:33 [PATCH] mlx4: Non-xrc SRQs need an xrcd which will never be used by xrc Jack Morgenstein
[not found] ` <201106221533.41053.jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-06-22 16:05 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373029A79-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-06-22 16:18 ` Jack Morgenstein
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.