All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier@cisco.com>
To: Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	raisch@de.ibm.com, general@lists.openfabrics.org,
	micfaath@de.ibm.com, stefan.roscher@de.ibm.com
Subject: Re: [PATCH 1/1] IB/ehca: Disallow creating UC QP with SRQ
Date: Fri, 10 Oct 2008 14:41:39 -0700	[thread overview]
Message-ID: <adazllcku0c.fsf@cisco.com> (raw)
In-Reply-To: <200810011306.31544.hnguyen@linux.vnet.ibm.com> (Hoang-Nam Nguyen's message of "Wed, 1 Oct 2008 13:06:31 +0200")

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;

WARNING: multiple messages have this Message-ID (diff)
From: Roland Dreier <rdreier@cisco.com>
To: Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	general@lists.openfabrics.org, micfaath@de.ibm.com,
	raisch@de.ibm.com, stefan.roscher@de.ibm.com
Subject: Re: [PATCH 1/1] IB/ehca: Disallow creating UC QP with SRQ
Date: Fri, 10 Oct 2008 14:41:39 -0700	[thread overview]
Message-ID: <adazllcku0c.fsf@cisco.com> (raw)
In-Reply-To: <200810011306.31544.hnguyen@linux.vnet.ibm.com> (Hoang-Nam Nguyen's message of "Wed, 1 Oct 2008 13:06:31 +0200")

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;

  reply	other threads:[~2008-10-10 21:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2008-10-10 21:41   ` Roland Dreier
2008-10-13  7:34   ` Hoang-Nam Nguyen
2008-10-13  7:34     ` Hoang-Nam Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adazllcku0c.fsf@cisco.com \
    --to=rdreier@cisco.com \
    --cc=general@lists.openfabrics.org \
    --cc=hnguyen@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=micfaath@de.ibm.com \
    --cc=raisch@de.ibm.com \
    --cc=stefan.roscher@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.