From patchwork Wed Jun 15 06:28:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hefty, Sean" X-Patchwork-Id: 881252 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5F6S6D1010041 for ; Wed, 15 Jun 2011 06:28:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752505Ab1FOG2N (ORCPT ); Wed, 15 Jun 2011 02:28:13 -0400 Received: from mga01.intel.com ([192.55.52.88]:38404 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752717Ab1FOG2H convert rfc822-to-8bit (ORCPT ); Wed, 15 Jun 2011 02:28:07 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 14 Jun 2011 23:28:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,369,1304319600"; d="scan'208";a="16388519" Received: from orsmsx604.amr.corp.intel.com ([10.22.226.87]) by fmsmga002.fm.intel.com with ESMTP; 14 Jun 2011 23:28:06 -0700 Received: from orsmsx105.amr.corp.intel.com (10.22.225.132) by orsmsx604.amr.corp.intel.com (10.22.226.87) with Microsoft SMTP Server (TLS) id 8.2.255.0; Tue, 14 Jun 2011 23:28:06 -0700 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.26]) by ORSMSX105.amr.corp.intel.com ([169.254.4.165]) with mapi id 14.01.0289.001; Tue, 14 Jun 2011 23:28:06 -0700 From: "Hefty, Sean" To: "linux-rdma (linux-rdma@vger.kernel.org)" Subject: [PATCH 14/17] ib/cm: Do not automatically disconnect XRC TGT QPs Thread-Topic: [PATCH 14/17] ib/cm: Do not automatically disconnect XRC TGT QPs Thread-Index: AcwrJJSmxRoi+sxwTk+dT+Hi3QhDjg== Date: Wed, 15 Jun 2011 06:28:05 +0000 Message-ID: <1828884A29C6694DAF28B7E6B8A8237302104E@ORSMSX101.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.9.131.214] MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 15 Jun 2011 06:28:15 +0000 (UTC) Because an XRC TGT QP can end up being shared among multiple processes, don't have the ib_cm automatically send a DREQ when the user space process that owns the ib_cm_id exits. Disconnect can be initiated by the user directly, otherwise, the owner of the XRC INI QP controls the connection. Note that as a result of the process exiting, the ib_cm will stop tracking the XRC connection on the target side. For the purposes of disconnecting, this isn't a big deal. The ib_cm will respond to the DREQ appropriately. For other messages, mainly LAP, the cm will reject the request, since there's no one available to route the request to. Signed-off-by: Sean Hefty --- This is a simple way of handling XRX TGT QPs. A more complex method can always be added later if and when it is ever necessary. drivers/infiniband/core/cm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 7577c1a..67c7da4 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -889,6 +889,8 @@ retest: break; case IB_CM_ESTABLISHED: spin_unlock_irq(&cm_id_priv->lock); + if (cm_id_priv->qp_type == IB_QPT_XRC_TGT) + break; ib_send_cm_dreq(cm_id, NULL, 0); goto retest; case IB_CM_DREQ_SENT: