From patchwork Fri Aug 19 02:14:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hefty, Sean" X-Patchwork-Id: 1078532 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 p7J2DW3x026514 for ; Fri, 19 Aug 2011 02:14:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753397Ab1HSCON (ORCPT ); Thu, 18 Aug 2011 22:14:13 -0400 Received: from mga03.intel.com ([143.182.124.21]:61615 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599Ab1HSCOI convert rfc822-to-8bit (ORCPT ); Thu, 18 Aug 2011 22:14:08 -0400 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 18 Aug 2011 19:14:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.68,248,1312182000"; d="scan'208";a="8771766" Received: from azsmsx603.amr.corp.intel.com ([10.2.161.23]) by AZSMGA002.ch.intel.com with ESMTP; 18 Aug 2011 19:14:07 -0700 Received: from fmsmsx104.amr.corp.intel.com (10.19.9.35) by azsmsx603.amr.corp.intel.com (10.2.161.23) with Microsoft SMTP Server (TLS) id 8.2.255.0; Thu, 18 Aug 2011 19:14:07 -0700 Received: from fmsmsx151.amr.corp.intel.com ([169.254.6.155]) by FMSMSX104.amr.corp.intel.com ([169.254.4.33]) with mapi id 14.01.0323.003; Thu, 18 Aug 2011 19:14:06 -0700 From: "Hefty, Sean" To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: "Hefty, Sean" Subject: [PATCH 15/20 v2] ib/cm: Do not automatically disconnect XRC TGT QPs Thread-Topic: [PATCH 15/20 v2] ib/cm: Do not automatically disconnect XRC TGT QPs Thread-Index: AcxeEqjOGjLvTC4vS0S28E+9rA7Y5g== Date: Fri, 19 Aug 2011 02:14:06 +0000 Message-ID: <1828884A29C6694DAF28B7E6B8A8237316E41A73@FMSMSX151.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] 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]); Fri, 19 Aug 2011 02:14:16 +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 --- 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 42a7a9b..4104ea2 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: