dapl_evd_qp_async_error_callb.c revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved. 2N/A * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * PURPOSE: implements QP callbacks from verbs 2N/A * dapl_evd_qp_async_error_callback 2N/A * The callback function registered with verbs for qp async erros 2N/A * This is an affiliated error and hence should be able to 2N/A * supply us with exact information on the error type and QP. 2N/A * However the Mellanox and IBM APIs for registering this callback 2N/A * The IBM API allows consumers to register the callback with 2N/A * ib_set_qp_async_error_eh_us ( 2N/A * ib_hca_handle_t hca_handle, 2N/A * ib_qp_async_handler_t handler ) 2N/A * Notice that this function does not take a context. The context is 2N/A * specified per QP in the call to ib_qp_create_us(). 2N/A * In contrast the Mellanox API requires that the context be specified 2N/A * when the funciton is registered: 2N/A * VAPI_set_async_event_handler ( 2N/A * IN VAPI_hca_hndl_t hca_hndl, 2N/A * IN VAPI_async_event_handler_t handler, 2N/A * IN void* private_data ) 2N/A * Therefore we always specify the context as the asyncronous EVD 2N/A * to be compatible with both APIs. 2N/A "--> dapl_evd_qp_async_error_callback: ep %p qp %p (%x) state %d\n",
2N/A * Transition to ERROR if we are connected; other states need to 2N/A * complete first (e.g. pending states) 2N/A * If dapls_ib_get_async_event is not successful, 2N/A * an event has been generated by the provide that 2N/A * we are not interested in. 2N/A "dapl_evd_qp_async_error_callback () returns\n");