From patchwork Wed Oct 28 23:19:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 56378 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 n9SNJEWF004317 for ; Wed, 28 Oct 2009 23:19:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753923AbZJ1XTJ (ORCPT ); Wed, 28 Oct 2009 19:19:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754801AbZJ1XTJ (ORCPT ); Wed, 28 Oct 2009 19:19:09 -0400 Received: from mga14.intel.com ([143.182.124.37]:13054 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753923AbZJ1XTI convert rfc822-to-8bit (ORCPT ); Wed, 28 Oct 2009 19:19:08 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 28 Oct 2009 16:19:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,642,1249282800"; d="scan'208";a="204955360" Received: from orsmsx601.amr.corp.intel.com ([10.22.226.213]) by azsmga001.ch.intel.com with ESMTP; 28 Oct 2009 16:19:12 -0700 Received: from orsmsx506.amr.corp.intel.com ([10.22.226.44]) by orsmsx601.amr.corp.intel.com ([10.22.226.213]) with mapi; Wed, 28 Oct 2009 16:19:12 -0700 From: "Davis, Arlin R" To: linux-rdma , "ofw@lists.openfabrics.org" Date: Wed, 28 Oct 2009 16:19:12 -0700 Subject: [PATCH 3/5] uDAPL v2: ucm: change some debug message levels, check for valid UD REPLY during retries Thread-Topic: [PATCH 3/5] uDAPL v2: ucm: change some debug message levels, check for valid UD REPLY during retries Thread-Index: AcpYJQ7yzx6WOhgHQLWKpNDWvA/orw== 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 07b8458..b28e911 100644 --- a/dapl/openib_ucm/cm.c +++ b/dapl/openib_ucm/cm.c @@ -395,12 +395,22 @@ static void ucm_process_recv(ib_hca_transport_t *tp, } dapl_os_unlock(&cm->lock); break; - + case DCM_RELEASED: + /* UD reply retried, ignore */ + if (ntohs(msg->op) != DCM_REP) { + dapl_log(DAPL_DBG_TYPE_WARN, + " ucm_recv: UNKNOWN operation" + " <- op %d, %s spsp %d sqpn %d\n", + ntohs(msg->op), dapl_cm_state_str(cm->state), + ntohs(msg->sport), ntohl(msg->sqpn)); + } + dapl_os_unlock(&cm->lock); + break; default: dapl_log(DAPL_DBG_TYPE_WARN, " ucm_recv: UNKNOWN state" - " <- op %d, st %d spsp %d sqpn %d\n", - ntohs(msg->op), cm->state, + " <- op %d, %s spsp %d sqpn %d\n", + ntohs(msg->op), dapl_cm_state_str(cm->state), ntohs(msg->sport), ntohl(msg->sqpn)); dapl_os_unlock(&cm->lock); break; @@ -479,7 +489,7 @@ retry_listenq: /* not match on listenq for valid request, send reject */ if (ntohs(msg->op) == DCM_REQ && !found) ucm_reject(tp, msg); -#if DAPL_DBG + if (!found) { dapl_log(DAPL_DBG_TYPE_WARN, " ucm_recv: NO MATCH op %s 0x%x %d i0x%x c0x%x" @@ -490,7 +500,7 @@ retry_listenq: ntohs(msg->saddr.ib.lid), ntohs(msg->sport), ntohl(msg->saddr.ib.qpn)); } -#endif + return found; } @@ -813,8 +823,18 @@ DAT_RETURN dapli_cm_disconnect(dp_ib_cm_handle_t cm) case DCM_DISC_PENDING: /* DREQ timeout, resend until retries exhausted */ cm->msg.op = htons(DCM_DREQ); - if (cm->retries >= cm->hca->ib_trans.retries) + if (cm->retries >= cm->hca->ib_trans.retries) { + dapl_log(DAPL_DBG_TYPE_ERR, + " CM_DREQ: RETRIES EXHAUSTED:" + " 0x%x %d 0x%x -> 0x%x %d 0x%x\n", + htons(cm->msg.saddr.ib.lid), + htonl(cm->msg.saddr.ib.qpn), + htons(cm->msg.sport), + htons(cm->msg.daddr.ib.lid), + htonl(cm->msg.dqpn), + htons(cm->msg.dport)); finalize = 1; + } break; case DCM_DISC_RECV: /* DREQ received, send DREP and schedule event */ @@ -857,7 +877,7 @@ dapli_cm_connect(DAPL_EP *ep, dp_ib_cm_handle_t cm) } if (cm->retries == cm->hca->ib_trans.retries) { - dapl_log(DAPL_DBG_TYPE_WARN, + dapl_log(DAPL_DBG_TYPE_ERR, " CM_REQ: RETRIES EXHAUSTED:" " 0x%x %d 0x%x -> 0x%x %d 0x%x\n", htons(cm->msg.saddr.ib.lid), @@ -1289,8 +1309,8 @@ static int ucm_reply(dp_ib_cm_handle_t cm) } if (cm->retries == cm->hca->ib_trans.retries) { - dapl_log(DAPL_DBG_TYPE_WARN, - " CM_REP: RETRIES EXHAUSTED" + dapl_log(DAPL_DBG_TYPE_ERR, + " CM_REPLY: RETRIES EXHAUSTED" " 0x%x %d 0x%x -> 0x%x %d 0x%x\n", htons(cm->msg.saddr.ib.lid), htons(cm->msg.sport),