From patchwork Fri Dec 12 16:50:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 5484181 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66B4FBEEA8 for ; Fri, 12 Dec 2014 16:51:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B7F420103 for ; Fri, 12 Dec 2014 16:51:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6371E20122 for ; Fri, 12 Dec 2014 16:51:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030610AbaLLQv0 (ORCPT ); Fri, 12 Dec 2014 11:51:26 -0500 Received: from mga09.intel.com ([134.134.136.24]:5864 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030303AbaLLQv0 (ORCPT ); Fri, 12 Dec 2014 11:51:26 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 12 Dec 2014 08:49:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,565,1413270000"; d="scan'208";a="652947836" Received: from cst-linux.jf.intel.com ([10.23.221.72]) by orsmga002.jf.intel.com with ESMTP; 12 Dec 2014 08:50:49 -0800 From: arlin.r.davis@intel.com To: linux-rdma@vger.kernel.org Cc: Arlin Davis Subject: [PATCH 1/4] common: return appropriate handles with affiliated EP and EVD async events Date: Fri, 12 Dec 2014 08:50:40 -0800 Message-Id: <1418403043-2221-2-git-send-email-arlin.r.davis@intel.com> X-Mailer: git-send-email 1.7.3 In-Reply-To: <1418403043-2221-1-git-send-email-arlin.r.davis@intel.com> References: <1418403043-2221-1-git-send-email-arlin.r.davis@intel.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Arlin Davis Signed-off-by: Arlin Davis --- dapl/common/dapl_evd_cq_async_error_callb.c | 4 +-- dapl/common/dapl_evd_qp_async_error_callb.c | 33 +-------------------------- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/dapl/common/dapl_evd_cq_async_error_callb.c b/dapl/common/dapl_evd_cq_async_error_callb.c index 2bd2a93..2edbce0 100644 --- a/dapl/common/dapl_evd_cq_async_error_callb.c +++ b/dapl/common/dapl_evd_cq_async_error_callb.c @@ -77,9 +77,7 @@ dapl_evd_cq_async_error_callback(IN ib_hca_handle_t ib_hca_handle, dat_status = dapls_evd_post_async_error_event(async_evd, DAT_ASYNC_ERROR_EVD_OVERFLOW, - (DAT_IA_HANDLE) - async_evd->header. - owner_ia); + (DAT_HANDLE) evd); if (dat_status != DAT_SUCCESS) { dapl_os_panic("async EVD overflow\n"); diff --git a/dapl/common/dapl_evd_qp_async_error_callb.c b/dapl/common/dapl_evd_qp_async_error_callb.c index bc05d0f..6ea9edb 100644 --- a/dapl/common/dapl_evd_qp_async_error_callb.c +++ b/dapl/common/dapl_evd_qp_async_error_callb.c @@ -60,36 +60,6 @@ dapl_evd_qp_async_error_callback(IN ib_hca_handle_t ib_hca_handle, IN ib_error_record_t * cause_ptr, IN void *context) { - /* - * This is an affiliated error and hence should be able to - * supply us with exact information on the error type and QP. - * - * However the Mellanox and IBM APIs for registering this callback - * are different. - * - * The IBM API allows consumers to register the callback with - * - * ib_int32_t - * ib_set_qp_async_error_eh_us ( - * ib_hca_handle_t hca_handle, - * ib_qp_async_handler_t handler ) - * - * Notice that this function does not take a context. The context is - * specified per QP in the call to ib_qp_create_us(). - * - * In contrast the Mellanox API requires that the context be specified - * when the funciton is registered: - * - * VAPI_ret_t - * VAPI_set_async_event_handler ( - * IN VAPI_hca_hndl_t hca_hndl, - * IN VAPI_async_event_handler_t handler, - * IN void* private_data ) - * - * Therefore we always specify the context as the asyncronous EVD - * to be compatible with both APIs. - */ - DAPL_IA *ia_ptr; DAPL_EP *ep_ptr; DAPL_EVD *async_evd; @@ -138,8 +108,7 @@ dapl_evd_qp_async_error_callback(IN ib_hca_handle_t ib_hca_handle, */ (void)dapls_evd_post_async_error_event(async_evd, async_event, - async_evd->header. - owner_ia); + (DAT_HANDLE) ep_ptr); } dapl_dbg_log(DAPL_DBG_TYPE_CALLBACK | DAPL_DBG_TYPE_EXCEPTION, "%s() returns\n", __FUNCTION__);