From patchwork Fri Oct 16 23:52:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 54474 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9GNpvPt025876 for ; Fri, 16 Oct 2009 23:53:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751125AbZJPXxn (ORCPT ); Fri, 16 Oct 2009 19:53:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751182AbZJPXxn (ORCPT ); Fri, 16 Oct 2009 19:53:43 -0400 Received: from mga03.intel.com ([143.182.124.21]:24793 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbZJPXxm convert rfc822-to-8bit (ORCPT ); Fri, 16 Oct 2009 19:53:42 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 16 Oct 2009 16:53:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,576,1249282800"; d="scan'208";a="200003486" Received: from orsmsx604.amr.corp.intel.com ([10.22.226.87]) by azsmga001.ch.intel.com with ESMTP; 16 Oct 2009 16:52:58 -0700 Received: from orsmsx506.amr.corp.intel.com ([10.22.226.44]) by orsmsx604.amr.corp.intel.com ([10.250.113.17]) with mapi; Fri, 16 Oct 2009 16:52:58 -0700 From: "Davis, Arlin R" To: linux-rdma , "ofw@lists.openfabrics.org" CC: "Smith, Stan" , "Hefty, Sean" Date: Fri, 16 Oct 2009 16:52:56 -0700 Subject: [[PATCH 11/11] ucm: using UD type QP's, ucm reports wrong reject event when user rejects AH resolution request. Thread-Topic: [[PATCH 11/11] ucm: using UD type QP's, ucm reports wrong reject event when user rejects AH resolution request. Thread-Index: AcpOu8iT+0/a/S07TFyT30oAxStyQQ== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/dapl/openib_ucm/cm.c b/dapl/openib_ucm/cm.c index 7ce3aab..cc480c4 100644 --- a/dapl/openib_ucm/cm.c +++ b/dapl/openib_ucm/cm.c @@ -304,6 +304,13 @@ static int ucm_reject(ib_hca_transport_t *tp, ib_cm_msg_t *msg) smsg.sqpn = msg->dqpn; dapl_os_memcpy(&smsg.daddr, &msg->saddr, sizeof(union dcm_addr)); + + /* no dst_addr IB info in REQ, init lid, gid, get type from saddr */ + smsg.saddr.ib.lid = tp->addr.ib.lid; + smsg.saddr.ib.qp_type = msg->saddr.ib.qp_type; + dapl_os_memcpy(&smsg.saddr.ib.gid[0], + &tp->addr.ib.gid, 16); + dapl_os_memcpy(&smsg.saddr, &msg->daddr, sizeof(union dcm_addr)); dapl_dbg_log(DAPL_DBG_TYPE_CM, @@ -1736,10 +1743,11 @@ dapls_ib_reject_connection(IN dp_ib_cm_handle_t cm, if (psize > DCM_MAX_PDATA_SIZE) return DAT_LENGTH_ERROR; - /* cr_thread will destroy CR, update saddr lid, gid info */ + /* cr_thread will destroy CR, update saddr lid, gid, qp_type info */ dapl_os_lock(&cm->lock); cm->state = DCM_REJECTED; cm->msg.saddr.ib.lid = cm->hca->ib_trans.addr.ib.lid; + cm->msg.saddr.ib.qp_type = cm->msg.daddr.ib.qp_type; dapl_os_memcpy(&cm->msg.saddr.ib.gid[0], &cm->hca->ib_trans.addr.ib.gid, 16); cm->msg.op = htons(DCM_REJ_USER);