* [PATCH 1/1] IB/ehca: Disallow creating UC QP with SRQ
@ 2008-10-01 11:06 Hoang-Nam Nguyen
2008-10-10 21:41 ` Roland Dreier
0 siblings, 1 reply; 3+ messages in thread
From: Hoang-Nam Nguyen @ 2008-10-01 11:06 UTC (permalink / raw)
To: Roland Dreier, linux-kernel, linuxppc-dev, general
Cc: micfaath, raisch, stefan.roscher
IB/ehca: Disallow creating QP for UC with SRQ
This patch prevents a UC QP to be created with SRQ, since current
firmware does not support this feature.
Signed-off-by: Michael Faath <micfaath@de.ibm.com>
---
drivers/infiniband/hw/ehca/ehca_qp.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index b6bcee0..46897cd 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -460,6 +460,12 @@ static struct ehca_qp *internal_create_qp(
struct ehca_qp *my_srq =
container_of(init_attr->srq, struct ehca_qp, ib_srq);
+ if (qp_type == IB_QPT_UC) {
+ ehca_err(pd->device, "UC with SRQ not supported");
+ atomic_dec(&shca->num_qps);
+ return ERR_PTR(-EINVAL);
+ }
+
has_srq = 1;
parms.ext_type = EQPT_SRQBASE;
parms.srq_qpn = my_srq->real_qp_num;
--
1.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] IB/ehca: Disallow creating UC QP with SRQ
2008-10-01 11:06 [PATCH 1/1] IB/ehca: Disallow creating UC QP with SRQ Hoang-Nam Nguyen
@ 2008-10-10 21:41 ` Roland Dreier
2008-10-13 7:34 ` Hoang-Nam Nguyen
0 siblings, 1 reply; 3+ messages in thread
From: Roland Dreier @ 2008-10-10 21:41 UTC (permalink / raw)
To: Hoang-Nam Nguyen
Cc: linux-kernel, linuxppc-dev, raisch, general, micfaath,
stefan.roscher
thanks, applied -- it didn't apply to the latest tree, because of the
flush CQE changes, so I merged it manually as below -- let me know if
this is wrong:
commit 0540bbbe455e123a1692d26205ad1a29983883b0
Author: Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
Date: Fri Oct 10 14:40:39 2008 -0700
IB/ehca: Don't allow creating UC QP with SRQ
This patch prevents a UC QP to be created attached to an SRQ, since
current firmware does not support this feature.
Signed-off-by: Michael Faath <micfaath@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index 4dbe287..40b578d 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -502,6 +502,12 @@ static struct ehca_qp *internal_create_qp(
if (init_attr->srq) {
my_srq = container_of(init_attr->srq, struct ehca_qp, ib_srq);
+ if (qp_type == IB_QPT_UC) {
+ ehca_err(pd->device, "UC with SRQ not supported");
+ atomic_dec(&shca->num_qps);
+ return ERR_PTR(-EINVAL);
+ }
+
has_srq = 1;
parms.ext_type = EQPT_SRQBASE;
parms.srq_qpn = my_srq->real_qp_num;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] IB/ehca: Disallow creating UC QP with SRQ
2008-10-10 21:41 ` Roland Dreier
@ 2008-10-13 7:34 ` Hoang-Nam Nguyen
0 siblings, 0 replies; 3+ messages in thread
From: Hoang-Nam Nguyen @ 2008-10-13 7:34 UTC (permalink / raw)
To: Roland Dreier
Cc: linux-kernel, linuxppc-dev, raisch, general, micfaath,
stefan.roscher
Hi Roland,
That looks good to me.
Thanks for all help.
Nam
On Friday 10 October 2008 23:41, Roland Dreier wrote:
> thanks, applied -- it didn't apply to the latest tree, because of the
> flush CQE changes, so I merged it manually as below -- let me know if
> this is wrong:
>
> commit 0540bbbe455e123a1692d26205ad1a29983883b0
> Author: Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
> Date: Fri Oct 10 14:40:39 2008 -0700
>
> IB/ehca: Don't allow creating UC QP with SRQ
>
> This patch prevents a UC QP to be created attached to an SRQ, since
> current firmware does not support this feature.
>
> Signed-off-by: Michael Faath <micfaath@de.ibm.com>
> Signed-off-by: Roland Dreier <rolandd@cisco.com>
>
> diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
> index 4dbe287..40b578d 100644
> --- a/drivers/infiniband/hw/ehca/ehca_qp.c
> +++ b/drivers/infiniband/hw/ehca/ehca_qp.c
> @@ -502,6 +502,12 @@ static struct ehca_qp *internal_create_qp(
> if (init_attr->srq) {
> my_srq = container_of(init_attr->srq, struct ehca_qp, ib_srq);
>
> + if (qp_type == IB_QPT_UC) {
> + ehca_err(pd->device, "UC with SRQ not supported");
> + atomic_dec(&shca->num_qps);
> + return ERR_PTR(-EINVAL);
> + }
> +
> has_srq = 1;
> parms.ext_type = EQPT_SRQBASE;
> parms.srq_qpn = my_srq->real_qp_num;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-13 8:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-01 11:06 [PATCH 1/1] IB/ehca: Disallow creating UC QP with SRQ Hoang-Nam Nguyen
2008-10-10 21:41 ` Roland Dreier
2008-10-13 7:34 ` Hoang-Nam Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).