[Openib-windows] RE: UD AV in UL return the wrong
Fab Tillier
ftillier at silverstorm.com
Thu Aug 4 13:49:06 PDT 2005
> From: Yossi Leybovich [mailto:sleybo at mellanox.co.il]
> Sent: Thursday, August 04, 2005 7:31 AM
>
> We tried to run simple UL test over UD QP .
>
> It looks like the av handle use the wrong value ( we got completion with error
> (local operational error)
...
> Either mlnx_post_create_av return the wrong structure to ib_creat_av or the
> ib_post_send use
> the wrong h_av structure.
The VAPI code includes hca_data.h, which defines a structure for what the AV
looks like. The problem is this structure was created to get things to build,
and doesn't match the actual usage.
I moved the hca_data.h file from hw\mt23108\vapi\user to hw\mt23108\user.
Do that and then apply this patch and see if that solves your problem. If it
does, let me know and I'll commit this change.
- Fab
Index: core/al/user/ual_ca.c
===================================================================
--- core/al/user/ual_ca.c (revision 52)
+++ core/al/user/ual_ca.c (working copy)
@@ -271,17 +271,13 @@
if( h_ca->obj.p_ci_ca->h_ci_ca && uvp_intf.pre_query_ca )
{
/* Pre call to the UVP library */
- status = uvp_intf.pre_query_ca(
- h_ca->obj.p_ci_ca->h_ci_ca, &ca_ioctl );
+ status = uvp_intf.pre_query_ca( h_ca->obj.p_ci_ca->h_ci_ca,
+ p_ca_attr, *p_size, &ca_ioctl.in.umv_buf );
if( status != IB_SUCCESS )
{
- if (ca_ioctl.out.status == IB_INSUFFICIENT_MEMORY )
- {
- *p_size = ca_ioctl.out.byte_cnt;
- }
- AL_EXIT( AL_DBG_CA );
- return status;
+ AL_EXIT( AL_DBG_CA );
+ return status;
}
}
Index: inc/user/iba/ib_uvp.h
===================================================================
--- inc/user/iba/ib_uvp.h (revision 52)
+++ inc/user/iba/ib_uvp.h (working copy)
@@ -36,8 +36,6 @@
#include <complib/cl_types.h>
#include <iba/ib_types.h>
#include <iba/ib_ci.h>
-#include <iba/ib_al.h>
-#include <iba/ib_al_ioctl.h>
/****h* UAL_UVP_Interface/Overview user-mode Verbs
* NAME
@@ -251,7 +249,9 @@
typedef ib_api_status_t
(AL_API *uvp_pre_query_ca) (
IN ib_ca_handle_t
h_uvp_ca,
- IN OUT ual_query_ca_ioctl_t
*p_ca_ioctl );
+ IN ib_ca_attr_t
*p_ca_attr,
+ IN size_t
byte_count,
+ IN ci_umv_buf_t
*p_umv_buf );
/*
* DESCRIPTION
@@ -2733,47 +2733,6 @@
/********/
-/****f* user-mode Verbs/uvp_err_handler
-* NAME
-* uvp_err_handler -- Vendor's handler for QP/CQ error notification
-*
-* SYNOPSIS
-*/
-
-typedef void
-(AL_API *uvp_err_handler) (
- IN const ib_async_event_rec_t* const
p_err_rec );
-
-/*
-* DESCRIPTION
-* uvp_err_handler() is an optional error handler implemented by vendor.
-* If the handler is provided, UAL will notify asynchronous errors for
-* resources (e.g QP/CQ errors). Vendor could do any tracking as needed.
-*
-* PARAMETERS
-* p_err_rec
-* [in ] On input, the error record contains the code for resource
error.
-* The context is as appropriate for the resource. The vendor's
-* error handler could take appropriate action based on the type
-* of error and the context provided. The following table
-* provides how to interpret the context based on the error code.
-* Update for any more error code.
-* -----------------------------------
-* Error Context
-* -----------------------------------
-* QPERROR ib_qp_handle_t
-* CQERROR ib_cq_handle_t
-*
-* RETURN VALUE
-* NONE
-*
-* PORTABILITY
-* User mode.
-*
-* SEE ALSO
-*
-********/
-
/********/
/****s* user-mode Verbs/uvp_interface_t
@@ -2906,14 +2865,6 @@
uvp_pre_detach_mcast pre_detach_mcast;
uvp_post_detach_mcast_t post_detach_mcast;
- /*
- * Error notification
- * If the vendor provides these functions, UAL will
- * invoke these functions when a QP/CQ error is reported by AL.
- *
- */
- uvp_err_handler err_handler;
-
} uvp_interface_t;
/********/
Index: hw/mt23108/vapi/user/hca_data.h
===================================================================
--- hw/mt23108/vapi/user/hca_data.h (revision 52)
+++ hw/mt23108/vapi/user/hca_data.h (working copy)
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
- *
- * This software is available to you under the OpenIB.org BSD license
- * below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * $Id$
- */
-
-#include <iba/ib_types.h>
-#include <iba/ib_uvp.h>
-
-
-typedef struct _ib_av
-{
- HHUL_ud_av_hndl_t h_av;
-};
Index: hw/mt23108/user/SOURCES
===================================================================
--- hw/mt23108/user/SOURCES (revision 52)
+++ hw/mt23108/user/SOURCES (working copy)
@@ -14,7 +14,6 @@
mlnx_ual_av.c \
mlnx_ual_ca.c \
mlnx_ual_cq.c \
- mlnx_ual_errh.c \
mlnx_ual_main.c \
mlnx_ual_mcast.c \
mlnx_ual_mrw.c \
Index: hw/mt23108/user/mlnx_ual_cq.c
===================================================================
--- hw/mt23108/user/mlnx_ual_cq.c (revision 52)
+++ hw/mt23108/user/mlnx_ual_cq.c (working copy)
@@ -235,7 +235,7 @@
sizeof (mlnx_ual_cq_info_t *));
CL_ASSERT(p_new_cq);
- *ph_uvp_cq = (uvp_cq_handle_t) p_new_cq;
+ *ph_uvp_cq = p_new_cq;
if ( ioctl_status == IB_SUCCESS )
{
@@ -354,7 +354,7 @@
void
mlnx_post_resize_cq (
- IN const uvp_cq_handle_t h_uvp_cq,
+ IN const ib_cq_handle_t h_uvp_cq,
IN ib_api_status_t ioctl_status,
IN const uint32_t size,
IN OUT ci_umv_buf_t *p_umv_buf)
@@ -434,7 +434,7 @@
ib_api_status_t
mlnx_pre_query_cq (
- IN const uvp_cq_handle_t h_uvp_cq,
+ IN const ib_cq_handle_t h_uvp_cq,
IN OUT ci_umv_buf_t *p_umv_buf)
{
FUNC_ENTER;
@@ -447,7 +447,7 @@
void
mlnx_post_query_cq (
- IN const uvp_cq_handle_t h_uvp_cq,
+ IN const ib_cq_handle_t h_uvp_cq,
IN ib_api_status_t ioctl_status,
IN OUT ci_umv_buf_t *p_umv_buf)
{
@@ -459,7 +459,7 @@
ib_api_status_t
mlnx_pre_destroy_cq (
- IN const uvp_cq_handle_t h_uvp_cq)
+ IN const ib_cq_handle_t h_uvp_cq)
{
FUNC_ENTER;
FUNC_EXIT;
@@ -469,7 +469,7 @@
void
mlnx_post_destroy_cq (
- IN const uvp_cq_handle_t h_uvp_cq,
+ IN const ib_cq_handle_t h_uvp_cq,
IN ib_api_status_t ioctl_status)
{
mlnx_ual_cq_info_t *p_cq_info = (mlnx_ual_cq_info_t *) ((void*)h_uvp_cq);
Index: hw/mt23108/user/mlnx_ual_osbypass.c
===================================================================
--- hw/mt23108/user/mlnx_ual_osbypass.c (revision 52)
+++ hw/mt23108/user/mlnx_ual_osbypass.c (working copy)
@@ -69,202 +69,6 @@
}
-inline static VAPI_wr_opcode_t
-map_itom_wr_opcode (
- IN ib_wr_type_t ibal_opcode,
- IN boolean_t imm)
-{
- VAPI_wr_opcode_t vapi_opcode;
-
- switch (ibal_opcode)
- {
- case WR_SEND:
- vapi_opcode = VAPI_SEND;
- break;
- case WR_RDMA_WRITE:
- vapi_opcode = VAPI_RDMA_WRITE;
- break;
- case WR_RDMA_READ:
- vapi_opcode = VAPI_RDMA_READ;
- break;
- case WR_COMPARE_SWAP:
- vapi_opcode = VAPI_ATOMIC_FETCH_AND_ADD;
- break;
- default:
- vapi_opcode = VAPI_SEND;
- break;
- }
-
- if (imm & (VAPI_SEND == vapi_opcode || VAPI_RDMA_WRITE == vapi_opcode))
- {
- vapi_opcode++;
- }
-
- return vapi_opcode;
-}
-
-
-ib_api_status_t
-map_itom_send_desc (
- IN IB_ts_t qp_type,
- IN ib_send_wr_t *p_i_wqe,
- OUT VAPI_sr_desc_t *p_m_swqe,
- OUT u_int64_t
*p_tot_len)
-{
- boolean_t imm = FALSE;
- u_int32_t idx;
- register VAPI_sg_lst_entry_t *p_sg_list;
- register ib_local_ds_t *p_i_ds;
-
- switch (qp_type)
- {
- case IB_TS_UD:
- {
- mlnx_ual_av_info_t *p_av_info = NULL;
-
- CL_TRACE (MLNX_TRACE_LVL_8, mlnx_dbg_lvl, ("Mapping UD QP\n"));
-
- p_av_info = (mlnx_ual_av_info_t *) p_i_wqe->dgrm.ud.h_av;
- CL_ASSERT (p_av_info);
-
- p_m_swqe->remote_qp = CL_NTOH32 (p_i_wqe->dgrm.ud.remote_qp);
- p_m_swqe->remote_qkey = CL_NTOH32 (p_i_wqe->dgrm.ud.remote_qkey);
- p_m_swqe->remote_ah = p_av_info->hhul_av_hndl;
- break;
- }
- case IB_TS_RC:
- {
- CL_TRACE (MLNX_TRACE_LVL_8, mlnx_dbg_lvl, ("Mapping RC QP\n"));
- p_m_swqe->remote_addr = p_i_wqe->remote_ops.vaddr;
- p_m_swqe->r_key = p_i_wqe->remote_ops.rkey;
- p_m_swqe->compare_add = p_i_wqe->remote_ops.atomic1;
- p_m_swqe->swap = p_i_wqe->remote_ops.atomic2;
- break;
- }
- case IB_TS_RD:
- case IB_TS_UC:
- default:
- CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
- ("Mapping RD/UC QP (unsupported\n"));
- return IB_UNSUPPORTED;
- }
-
- imm = (0 != (p_i_wqe->send_opt & IB_SEND_OPT_IMMEDIATE));
- p_m_swqe->fence = (MT_bool)(0 != (p_i_wqe->send_opt & IB_SEND_OPT_FENCE));
- p_m_swqe->set_se = (MT_bool)(0 != (p_i_wqe->send_opt &
IB_SEND_OPT_SOLICITED));
- p_m_swqe->comp_type = (p_i_wqe->send_opt & IB_SEND_OPT_SIGNALED) ?
- VAPI_SIGNALED : VAPI_UNSIGNALED;
- p_m_swqe->id = p_i_wqe->wr_id;
- p_m_swqe->opcode = map_itom_wr_opcode (p_i_wqe->wr_type, imm);
-
- if (imm)
- {
- p_m_swqe->imm_data = CL_NTOH32 (p_i_wqe->immediate_data);
- }
-
- p_m_swqe->sg_lst_len = p_i_wqe->num_ds;
- p_sg_list = p_m_swqe->sg_lst_p;
- p_i_ds = p_i_wqe->ds_array;
- *p_tot_len = 0;
-
- for (idx = 0; idx < p_i_wqe->num_ds; idx++)
- {
- p_sg_list->addr = (VAPI_virt_addr_t) (MT_virt_addr_t) p_i_ds->vaddr;
- p_sg_list->len = p_i_ds->length;
- p_sg_list->lkey = p_i_ds->lkey;
- p_sg_list++;
- *p_tot_len += p_i_ds->length + 4; // in_line data size + 4-byte length
- p_i_ds++;
- }
-
- CL_TRACE (MLNX_TRACE_LVL_8, mlnx_dbg_lvl, ("send: rqpn 0x%x qkey 0x%x\n",
- p_m_swqe->remote_qp, p_m_swqe->remote_qkey));
-
- return IB_SUCCESS;
-}
-
-
-ib_api_status_t
-map_itom_recv_desc (
- IN ib_recv_wr_t *p_i_wqe,
- OUT VAPI_rr_desc_t *p_m_rwqe)
-{
- u_int32_t idx;
- register VAPI_sg_lst_entry_t *p_sg_list;
- register ib_local_ds_t *p_i_ds;
-
- p_m_rwqe->id = (VAPI_wr_id_t)p_i_wqe->wr_id;
- p_m_rwqe->sg_lst_len = p_i_wqe->num_ds;
- p_m_rwqe->comp_type = VAPI_SIGNALED;
-
- p_sg_list = p_m_rwqe->sg_lst_p;
- p_i_ds = p_i_wqe->ds_array;
- for (idx = 0; idx < p_i_wqe->num_ds; idx++)
- {
- p_sg_list->addr = (VAPI_virt_addr_t) (MT_virt_addr_t) p_i_ds->vaddr;
- p_sg_list->len = p_i_ds->length;
- p_sg_list->lkey = (VAPI_lkey_t)p_i_ds->lkey;
- p_sg_list++;
- p_i_ds++;
- }
-
- return IB_SUCCESS;
-}
-
-
-int
-map_mtoi_cqe_status (
- IN VAPI_wc_status_t m_status)
-{
- switch (m_status)
- {
- case IB_COMP_SUCCESS: return (IB_WCS_SUCCESS);
- case IB_COMP_LOC_LEN_ERR: return (IB_WCS_LOCAL_LEN_ERR);
- case IB_COMP_LOC_QP_OP_ERR: return (IB_WCS_LOCAL_OP_ERR);
-// case IB_COMP_LOC_EE_OP_ERR: return (IB_WCS_LOCAL_EEC_OP_ERR);
- case IB_COMP_LOC_PROT_ERR: return (IB_WCS_LOCAL_PROTECTION_ERR);
- case IB_COMP_WR_FLUSH_ERR: return (IB_WCS_WR_FLUSHED_ERR);
- case IB_COMP_MW_BIND_ERR: return (IB_WCS_MEM_WINDOW_BIND_ERR);
- case IB_COMP_REM_INV_REQ_ERR: return (IB_WCS_REM_INVALID_REQ_ERR);
- case IB_COMP_REM_ACCESS_ERR: return (IB_WCS_REM_ACCESS_ERR);
- case IB_COMP_REM_OP_ERR: return (IB_WCS_REM_OP_ERR);
- case IB_COMP_RETRY_EXC_ERR: return (IB_WCS_TIMEOUT_RETRY_ERR);
- case IB_COMP_RNR_RETRY_EXC_ERR: return (IB_WCS_RNR_RETRY_ERR);
-// case IB_COMP_REM_INV_RD_REQ_ERR: return
(IB_WCS_REM_INVALID_RD_REQ_ERR);
- case IB_COMP_REM_ABORT_ERR: return (IB_WCS_REM_ACCESS_ERR);
-// case IB_COMP_INV_EECN_ERR: return (IB_WCS_INVALID_EECN);
-// case IB_COMP_INV_EEC_STATE_ERR: return (IB_WCS_INVALID_EEC_STATE);
- case IB_COMP_FATAL_ERR: return (IB_WCS_REM_ACCESS_ERR);
- case IB_COMP_GENERAL_ERR: return (IB_WCS_REM_ACCESS_ERR);
- default:
- CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
- ("Failed to map m_cqe->status %d\n", m_status));
- return IB_WCS_REM_ACCESS_ERR;
- }
-
-}
-
-
-int
-map_mtoi_cqe_type (
- IN VAPI_cqe_opcode_t m_op)
-{
- switch (m_op)
- {
- case VAPI_CQE_SQ_SEND_DATA: return IB_WC_SEND;
- case VAPI_CQE_SQ_RDMA_WRITE: return IB_WC_RDMA_WRITE;
- case VAPI_CQE_SQ_RDMA_READ: return IB_WC_RDMA_READ;
- case VAPI_CQE_SQ_COMP_SWAP: return IB_WC_COMPARE_SWAP;
- case VAPI_CQE_SQ_FETCH_ADD: return IB_WC_FETCH_ADD;
- case VAPI_CQE_SQ_BIND_MRW: return IB_WC_MW_BIND;
- case VAPI_CQE_RQ_SEND_DATA: return IB_WC_RECV;
- case VAPI_CQE_RQ_RDMA_WITH_IMM: return IB_WC_RECV_RDMA_WRITE;
- default:
- return IB_WC_SEND;
- }
-}
-
-
static VAPI_mrw_acl_t
map_itom_access_ctrl (
IN ib_access_t i_acl)
Index: hw/mt23108/user/mlnx_ual_pd.c
===================================================================
--- hw/mt23108/user/mlnx_ual_pd.c (revision 52)
+++ hw/mt23108/user/mlnx_ual_pd.c (working copy)
@@ -58,7 +58,7 @@
ib_api_status_t
mlnx_pre_allocate_pd (
- IN const uvp_ca_handle_t h_uvp_ca,
+ IN const ib_ca_handle_t h_uvp_ca,
IN OUT ci_umv_buf_t *p_umv_buf)
{
ib_api_status_t status = IB_SUCCESS;
@@ -208,7 +208,7 @@
sizeof (mlnx_ual_pd_info_t*)),
sizeof (mlnx_ual_pd_info_t *));
CL_ASSERT(p_new_pd);
- *ph_uvp_pd = (uvp_pd_handle_t) p_new_pd;
+ *ph_uvp_pd = (ib_pd_handle_t) p_new_pd;
if ( ioctl_status == IB_SUCCESS )
{
@@ -266,7 +266,7 @@
ib_api_status_t
mlnx_pre_deallocate_pd (
- IN const uvp_pd_handle_t h_uvp_pd)
+ IN const ib_pd_handle_t h_uvp_pd)
{
ib_api_status_t status = IB_SUCCESS;
mlnx_ual_pd_info_t *p_pd_info = (mlnx_ual_pd_info_t *)((void *)h_uvp_pd);
@@ -305,7 +305,7 @@
void
mlnx_post_deallocate_pd (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN ib_api_status_t ioctl_status )
{
mlnx_ual_pd_info_t *p_pd_info = (mlnx_ual_pd_info_t *)((void *)h_uvp_pd);
Index: hw/mt23108/user/mlnx_ual_mrw.c
===================================================================
--- hw/mt23108/user/mlnx_ual_mrw.c (revision 52)
+++ hw/mt23108/user/mlnx_ual_mrw.c (working copy)
@@ -75,7 +75,7 @@
ib_api_status_t
mlnx_pre_register_mr (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN const ib_mr_create_t *p_mr_create,
IN OUT ci_umv_buf_t *p_umv_buf)
{
@@ -92,11 +92,11 @@
void
mlnx_post_register_mr (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN ib_api_status_t ioctl_status,
IN const uint32_t *p_lkey,
IN const uint32_t *p_rkey,
- OUT const uvp_mr_handle_t *ph_uvp_mr,
+ OUT const ib_mr_handle_t *ph_uvp_mr,
IN OUT ci_umv_buf_t *p_umv_buf)
{
FUNC_ENTER;
@@ -107,7 +107,7 @@
ib_api_status_t
mlnx_pre_query_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_mr_handle_t h_uvp_mr,
IN OUT ci_umv_buf_t *p_umv_buf)
{
FUNC_ENTER;
@@ -123,7 +123,7 @@
void
mlnx_post_query_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_mr_handle_t h_uvp_mr,
IN ib_api_status_t ioctl_status,
IN const ib_mr_attr_t *p_mr_query,
IN OUT ci_umv_buf_t *p_umv_buf)
@@ -136,8 +136,8 @@
ib_api_status_t
mlnx_pre_modify_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
- IN const uvp_pd_handle_t h_uvp_pd OPTIONAL,
+ IN const ib_mr_handle_t h_uvp_mr,
+ IN const ib_pd_handle_t h_uvp_pd OPTIONAL,
IN const ib_mr_mod_t mr_mod_mask,
IN const ib_mr_create_t *p_mr_create OPTIONAL,
IN OUT ci_umv_buf_t *p_umv_buf)
@@ -155,8 +155,8 @@
void
mlnx_post_modify_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
- IN const uvp_pd_handle_t h_uvp_pd OPTIONAL,
+ IN const ib_mr_handle_t h_uvp_mr,
+ IN const ib_pd_handle_t h_uvp_pd OPTIONAL,
IN ib_api_status_t ioctl_status,
IN const uint32_t *p_lkey,
IN const uint32_t *p_rkey,
@@ -170,8 +170,8 @@
ib_api_status_t
mlnx_pre_register_smr (
- IN const uvp_pd_handle_t h_uvp_pd,
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_pd_handle_t h_uvp_pd,
+ IN const ib_mr_handle_t h_uvp_mr,
IN const ib_access_t access_ctrl,
IN void *p_vaddr,
IN OUT ci_umv_buf_t *p_umv_buf)
@@ -189,13 +189,13 @@
void
mlnx_post_register_smr (
- IN const uvp_pd_handle_t h_uvp_pd,
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_pd_handle_t h_uvp_pd,
+ IN const ib_mr_handle_t h_uvp_mr,
IN ib_api_status_t ioctl_status,
IN const void *p_vaddr,
IN const uint32_t *p_lkey,
IN const uint32_t *p_rkey,
- OUT const uvp_mr_handle_t *ph_uvp_smr,
+ OUT const ib_mr_handle_t *ph_uvp_smr,
IN OUT ci_umv_buf_t *p_umv_buf)
{
FUNC_ENTER;
@@ -206,7 +206,7 @@
ib_api_status_t
mlnx_pre_deregister_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_mr_handle_t h_uvp_mr,
IN OUT ci_umv_buf_t *p_umv_buf)
{
FUNC_ENTER;
@@ -217,7 +217,7 @@
void
mlnx_post_deregister_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_mr_handle_t h_uvp_mr,
IN OUT ci_umv_buf_t *p_umv_buf)
{
FUNC_ENTER;
@@ -228,7 +228,7 @@
ib_api_status_t
mlnx_pre_create_mw (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN OUT ci_umv_buf_t *p_umv_buf)
{
ib_api_status_t status = IB_SUCCESS;
@@ -310,7 +310,7 @@
cl_memcpy (&p_new_mw, p_umv_buf->p_inout_buf, p_umv_buf->input_size);
- *ph_uvp_mw = (uvp_mw_handle_t) p_new_mw;
+ *ph_uvp_mw = (ib_mw_handle_t) p_new_mw;
if (IB_SUCCESS == status)
{
@@ -351,7 +351,7 @@
ib_api_status_t
mlnx_pre_query_mw (
- IN const uvp_mw_handle_t h_uvp_mw,
+ IN const ib_mw_handle_t h_uvp_mw,
IN OUT ci_umv_buf_t *p_umv_buf)
{
FUNC_ENTER;
@@ -384,7 +384,7 @@
ib_api_status_t
mlnx_pre_destroy_mw (
- IN const uvp_mw_handle_t h_uvp_mw)
+ IN const ib_mw_handle_t h_uvp_mw)
{
FUNC_ENTER;
FUNC_EXIT;
@@ -394,7 +394,7 @@
void
mlnx_post_destroy_mw (
- IN const uvp_mw_handle_t h_uvp_mw,
+ IN const ib_mw_handle_t h_uvp_mw,
IN ib_api_status_t ioctl_status)
{
ib_api_status_t status = IB_SUCCESS;
Index: hw/mt23108/user/mlnx_ual_av.c
===================================================================
--- hw/mt23108/user/mlnx_ual_av.c (revision 52)
+++ hw/mt23108/user/mlnx_ual_av.c (working copy)
@@ -134,7 +134,7 @@
ib_api_status_t
mlnx_pre_create_av (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN const ib_av_attr_t *p_av_attr,
IN OUT ci_umv_buf_t *p_umv_buf)
{
@@ -214,7 +214,7 @@
THHUL_pdm_create_ud_av (p_hobul->hhul_hca_hndl,
p_pd_info->hhul_pd_hndl,
&hhul_av,
- &p_new_av->hhul_av_hndl))
+ &p_new_av->h_av))
{
CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
("FAILED to create usermode UD AV\n"));
@@ -224,7 +224,7 @@
p_new_av->p_i_av_attr = p_av_attr;
p_new_av->h_uvp_pd = h_uvp_pd;
- *ph_uvp_av = (uvp_av_handle_t) p_new_av;
+ *ph_uvp_av = p_new_av;
p_umv_buf->p_inout_buf = NULL;
}
@@ -251,7 +251,7 @@
ib_api_status_t
mlnx_pre_query_av (
- IN const uvp_av_handle_t h_uvp_av,
+ IN const ib_av_handle_t h_uvp_av,
IN OUT ci_umv_buf_t *p_umv_buf )
{
FUNC_ENTER;
@@ -289,7 +289,7 @@
ib_api_status_t
mlnx_pre_modify_av (
- IN const uvp_av_handle_t h_uvp_av,
+ IN const ib_av_handle_t h_uvp_av,
IN const ib_av_attr_t *p_addr_vector,
IN OUT ci_umv_buf_t *p_umv_buf)
{
@@ -313,7 +313,7 @@
if (HH_OK !=
THHUL_pdm_modify_ud_av (p_hobul->hhul_hca_hndl,
- p_av_info->hhul_av_hndl,
+ p_av_info->h_av,
&hhul_av))
{
CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
@@ -333,7 +333,7 @@
void
mlnx_post_modify_av (
- IN const uvp_av_handle_t h_uvp_av,
+ IN const ib_av_handle_t h_uvp_av,
IN ib_api_status_t ioctl_status,
IN OUT ci_umv_buf_t *p_umv_buf)
{
@@ -345,7 +345,7 @@
ib_api_status_t
mlnx_pre_destroy_av (
- IN const uvp_av_handle_t h_uvp_av)
+ IN const ib_av_handle_t h_uvp_av)
{
FUNC_ENTER;
FUNC_EXIT;
@@ -355,7 +355,7 @@
void
mlnx_post_destroy_av (
- IN const uvp_av_handle_t h_uvp_av,
+ IN const ib_av_handle_t h_uvp_av,
IN ib_api_status_t ioctl_status)
{
mlnx_ual_hobul_t *p_hobul;
@@ -373,7 +373,7 @@
if (HH_OK !=
THHUL_pdm_destroy_ud_av (p_hobul->hhul_hca_hndl,
- p_av_info->hhul_av_hndl))
+ p_av_info->h_av))
{
CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
("Failed to destroy av\n"));
Index: hw/mt23108/user/mlnx_ual_mcast.c
===================================================================
--- hw/mt23108/user/mlnx_ual_mcast.c (revision 52)
+++ hw/mt23108/user/mlnx_ual_mcast.c (working copy)
@@ -57,7 +57,7 @@
ib_api_status_t
mlnx_pre_attach_mcast (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN const ib_gid_t *p_mcast_gid,
IN const uint16_t mcast_lid,
IN OUT ci_umv_buf_t *p_umv_buf)
@@ -79,9 +79,9 @@
void
mlnx_post_attach_mcast (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN ib_api_status_t ioctl_status,
- OUT uvp_mcast_handle_t *ph_mcast,
+ OUT ib_mcast_handle_t *ph_mcast,
IN OUT ci_umv_buf_t *p_umv_buf)
{
FUNC_ENTER;
@@ -93,7 +93,7 @@
ib_api_status_t
mlnx_pre_detach_mcast (
- IN uvp_mcast_handle_t h_uvp_mcast,
+ IN ib_mcast_handle_t h_uvp_mcast,
IN OUT ci_umv_buf_t *p_umv_buf)
{
FUNC_ENTER;
@@ -111,7 +111,7 @@
void
mlnx_post_detach_mcast (
- IN uvp_mcast_handle_t h_uvp_mcast,
+ IN ib_mcast_handle_t h_uvp_mcast,
IN ib_api_status_t ioctl_status,
IN OUT ci_umv_buf_t *p_umv_buf)
{
Index: hw/mt23108/user/mlnx_ual_qp.c
===================================================================
--- hw/mt23108/user/mlnx_ual_qp.c (revision 52)
+++ hw/mt23108/user/mlnx_ual_qp.c (working copy)
@@ -77,7 +77,7 @@
ib_api_status_t
mlnx_pre_create_qp (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN const ib_qp_create_t *p_create_attr,
IN OUT ci_umv_buf_t *p_umv_buf)
{
@@ -271,7 +271,7 @@
sizeof (mlnx_ual_qp_info_t *)), sizeof (mlnx_ual_qp_info_t *));
CL_ASSERT(p_new_qp);
- *ph_uvp_qp = (uvp_qp_handle_t) p_new_qp;
+ *ph_uvp_qp = (ib_qp_handle_t) p_new_qp;
if ( ioctl_status == IB_SUCCESS )
{
@@ -333,7 +333,7 @@
ib_api_status_t
mlnx_pre_modify_qp (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN const ib_qp_mod_t *p_modify_attr,
IN OUT ci_umv_buf_t *p_umv_buf)
{
@@ -364,7 +364,7 @@
void
mlnx_post_modify_qp (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN ib_api_status_t ioctl_status,
IN OUT ci_umv_buf_t *p_umv_buf)
{
@@ -436,7 +436,7 @@
ib_api_status_t
mlnx_pre_query_qp (
- IN uvp_qp_handle_t h_uvp_qp,
+ IN ib_qp_handle_t h_uvp_qp,
IN OUT ci_umv_buf_t *p_umv_buf)
{
UNREFERENCED_PARAMETER(h_uvp_qp);
@@ -454,7 +454,7 @@
void
mlnx_post_query_qp (
- IN uvp_qp_handle_t
h_uvp_qp,
+ IN ib_qp_handle_t
h_uvp_qp,
IN ib_api_status_t
ioctl_status,
IN OUT ib_qp_attr_t
*p_query_attr,
IN OUT ci_umv_buf_t
*p_umv_buf)
@@ -480,7 +480,7 @@
ib_api_status_t
mlnx_pre_destroy_qp (
- IN const uvp_qp_handle_t h_uvp_qp)
+ IN const ib_qp_handle_t h_uvp_qp)
{
UNREFERENCED_PARAMETER(h_uvp_qp);
FUNC_ENTER;
@@ -491,7 +491,7 @@
void
mlnx_post_destroy_qp (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN ib_api_status_t ioctl_status)
{
mlnx_ual_qp_info_t *p_qp_info = (mlnx_ual_qp_info_t *)((void *) h_uvp_qp);
Index: hw/mt23108/user/mlnx_ual_ca.c
===================================================================
--- hw/mt23108/user/mlnx_ual_ca.c (revision 52)
+++ hw/mt23108/user/mlnx_ual_ca.c (working copy)
@@ -132,74 +132,55 @@
ib_api_status_t
mlnx_pre_query_ca (
- IN uvp_ca_handle_t h_uvp_ca,
- IN OUT ual_query_ca_ioctl_t *p_ca_ioctl )
+ IN ib_ca_handle_t
h_uvp_ca,
+ IN ib_ca_attr_t
*p_ca_attr,
+ IN size_t
byte_count,
+ IN ci_umv_buf_t
*p_umv_buf )
{
- ib_api_status_t status = IB_SUCCESS;
- mlnx_ual_hobul_t *p_hobul = (mlnx_ual_hobul_t *)((void*)h_uvp_ca);
+ ib_api_status_t status = IB_SUCCESS;
- FUNC_ENTER;
+ FUNC_ENTER;
- CL_ASSERT(p_hobul);
- CL_ASSERT(p_ca_ioctl);
+ CL_ASSERT(h_uvp_ca);
- /* hca_ul_info should be filled up by open_ca() */
- if ( p_hobul->p_hca_ul_info->status != HH_HCA_STATUS_OPENED )
- {
- CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
- ("Device is not opened\n"));
- status = IB_INVALID_CA_HANDLE;
- return status;
- }
- /* first time call query_ca */
- if ( !p_hobul->p_hca_attr )
- {
- /* assume if user buffer is valid then byte_cnt is valid too
- * so we can preallocate ca attr buffer for post ioctl data saving
- */
- if ( p_ca_ioctl->in.p_ca_attr != NULL )
+ /* hca_ul_info should be filled up by open_ca() */
+ if ( h_uvp_ca->p_hca_ul_info->status != HH_HCA_STATUS_OPENED )
{
- p_hobul->p_hca_attr = cl_zalloc(p_ca_ioctl->in.byte_cnt);
- if (! p_hobul->p_hca_attr )
- {
- CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
- ("Failed to alloc new_ca\n"));
- status = IB_INSUFFICIENT_RESOURCES;
- return status;
- }
- }
- p_ca_ioctl->in.umv_buf.input_size =
sizeof(HH_hca_dev_t)+sizeof(u_int32_t);
- if (p_ca_ioctl->in.umv_buf.input_size)
- {
- p_ca_ioctl->in.umv_buf.output_size =
p_ca_ioctl->in.umv_buf.input_size;
- p_ca_ioctl->in.umv_buf.p_inout_buf =
cl_zalloc(p_ca_ioctl->in.umv_buf.input_size);
- if (p_ca_ioctl->in.umv_buf.p_inout_buf == NULL)
- {
CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
- ("Failed to alloc priv buffer memory\n"));
- status = IB_INSUFFICIENT_RESOURCES;
- }
- }
- }
- else
- {
- /* user query for attr size */
- if ( ! p_ca_ioctl->in.p_ca_attr )
- {
- p_ca_ioctl->out.byte_cnt = p_hobul->p_hca_attr->size;
- status = IB_INSUFFICIENT_MEMORY;
- p_ca_ioctl->out.status = status ;
+ ("Device is not opened\n"));
+ status = IB_INVALID_CA_HANDLE;
+ return status;
}
- /* user query for ca attributes */
- else
+ /*
+ * First time call query_ca - populate our internal cached attributes
+ * so we can access the GID table. Note that query_ca calls *always*
+ * get their attributes from the kernel.
+ */
+ if ( !h_uvp_ca->p_hca_attr )
{
- cl_memcpy (p_ca_ioctl->in.p_ca_attr, p_hobul->p_hca_attr,
- min (p_ca_ioctl->in.byte_cnt, p_hobul->p_hca_attr->size
));
+ /*
+ * Assume if user buffer is valid then byte_cnt is valid too
+ * so we can preallocate ca attr buffer for post ioctl data
saving
+ *
+ * Note that we squirel the buffer away into the umv_buf and
only
+ * set it into the HCA if the query is successful.
+ */
+ if ( p_ca_attr != NULL )
+ {
+ p_umv_buf->p_inout_buf = cl_zalloc(byte_count);
+ if ( !p_umv_buf->p_inout_buf )
+ {
+ CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
+ ("Failed to alloc new_ca\n"));
+ status = IB_INSUFFICIENT_RESOURCES;
+ return status;
+ }
+ }
+ p_umv_buf->input_size = p_umv_buf->output_size = 0;
}
- }
- FUNC_EXIT;
- return status;
+ FUNC_EXIT;
+ return status;
}
@@ -211,41 +192,29 @@
IN size_t
byte_count,
IN ci_umv_buf_t
*p_umv_buf )
{
- mlnx_ual_hobul_t *p_hobul = (mlnx_ual_hobul_t *)((void*)h_uvp_ca);
+ FUNC_ENTER;
- FUNC_ENTER;
+ CL_ASSERT(h_uvp_ca);
+ CL_ASSERT(p_umv_buf);
- CL_ASSERT(p_hobul);
- CL_ASSERT(p_umv_buf);
-
- /*
- * The umv_buf query is only done as part of open_ca().
- * Verify that we performed a query before checking the results
- */
- if ((IB_SUCCESS == p_umv_buf->status) && (IB_SUCCESS == ioctl_status))
- {
- if ( p_ca_attr && byte_count )
+ if ( ioctl_status == IB_SUCCESS && p_ca_attr &&
+ byte_count && !h_uvp_ca->p_hca_attr )
{
- cl_memcpy (p_hobul->p_hca_attr, p_ca_attr , byte_count );
- CL_TRACE (MLNX_TRACE_LVL_1, mlnx_dbg_lvl,
- ("got ca_attr %d\n", byte_count));
+ h_uvp_ca->p_hca_attr = p_umv_buf->p_inout_buf;
}
- }
+ else if (p_umv_buf->p_inout_buf)
+ {
+ cl_free (p_umv_buf->p_inout_buf);
+ }
- if (p_umv_buf->p_inout_buf)
- {
- cl_free (p_umv_buf->p_inout_buf);
- p_umv_buf->p_inout_buf = NULL;
- }
-
- FUNC_EXIT;
- return;
+ FUNC_EXIT;
+ return;
}
ib_api_status_t
mlnx_pre_modify_ca (
- IN uvp_ca_handle_t h_uvp_ca,
+ IN ib_ca_handle_t h_uvp_ca,
IN uint8_t port_num,
IN ib_ca_mod_t ca_mod,
IN const ib_port_attr_mod_t* p_port_attr_mod)
@@ -258,7 +227,7 @@
void
mlnx_post_modify_ca (
- IN uvp_ca_handle_t h_uvp_ca,
+ IN ib_ca_handle_t h_uvp_ca,
IN ib_api_status_t ioctl_status)
{
FUNC_ENTER;
@@ -269,7 +238,7 @@
ib_api_status_t
mlnx_pre_close_ca (
- IN uvp_ca_handle_t h_uvp_ca)
+ IN ib_ca_handle_t h_uvp_ca)
{
FUNC_ENTER;
FUNC_EXIT;
@@ -279,7 +248,7 @@
ib_api_status_t
mlnx_post_close_ca (
- IN uvp_ca_handle_t h_uvp_ca,
+ IN ib_ca_handle_t h_uvp_ca,
IN ib_api_status_t ioctl_status )
{
mlnx_ual_hobul_t *p_hobul = (mlnx_ual_hobul_t *)((void*)h_uvp_ca);
Index: hw/mt23108/user/mlnx_ual_main.c
===================================================================
--- hw/mt23108/user/mlnx_ual_main.c (revision 52)
+++ hw/mt23108/user/mlnx_ual_main.c (working copy)
@@ -158,21 +158,11 @@
mlnx_get_cq_interface (p_uvp);
/*
- * EE Management
- */
-// mlnx_get_eec_interface (p_uvp);
-
- /*
* AV Management
*/
mlnx_get_av_interface(p_uvp);
/*
- * RDD Management
- */
-// mlnx_get_rdd_interface(p_uvp);
-
- /*
* Memory Region / Window Management Verbs
*/
mlnx_get_mrw_interface (p_uvp);
@@ -183,14 +173,6 @@
mlnx_get_mcast_interface (p_uvp);
/*
- * Error notification
- * If the vendor provides these functions, UAL will
- * invoke these functions when a QP/CQ error is reported by AL.
- *
- */
- mlnx_get_errh_interface (p_uvp);
-
- /*
* OS bypass (send, receive, poll/notify cq)
*/
mlnx_get_osbypass_interface(p_uvp);
Index: hw/mt23108/user/mlnx_ual_main.h
===================================================================
--- hw/mt23108/user/mlnx_ual_main.h (revision 52)
+++ hw/mt23108/user/mlnx_ual_main.h (working copy)
@@ -42,9 +42,7 @@
#include <thhul_mwm.h>
//#include <iba/ib_ci.h>
-#include <iba/ib_types.h>
-#include <iba/ib_uvp.h>
-#include <complib/cl_types.h>
+#include "hca_data.h"
#include <complib/cl_debug.h>
#include <complib/cl_byteswap.h>
#include <complib/cl_memory.h>
@@ -73,66 +71,9 @@
#define MLNX_UAL_ALLOC_HCA_UL_RES 1
#define MLNX_UAL_FREE_HCA_UL_RES 2
-typedef void* __ptr64 uvp_ca_handle_t;
-typedef void* __ptr64 uvp_pd_handle_t;
-typedef void* __ptr64 uvp_av_handle_t;
-typedef void* __ptr64 uvp_cq_handle_t;
-typedef void* __ptr64 uvp_qp_handle_t;
-typedef void* __ptr64 uvp_mr_handle_t;
-typedef void* __ptr64 uvp_mw_handle_t;
-typedef void* __ptr64 uvp_mcast_handle_t;
-typedef void* __ptr64 uvp_rdd_handle_t;
-typedef void* __ptr64 uvp_eec_handle_t;
-
typedef unsigned __int3264 cl_dev_handle_t;
-typedef struct hobul {
- HH_hca_dev_t *p_hca_ul_info;
- void *p_hca_ul_resources;
- ib_ca_attr_t *p_hca_attr;
- HHUL_hca_hndl_t hhul_hca_hndl;
- u_int32_t priv_op;
- void *p_al_ci_ca;
-} mlnx_ual_hobul_t;
-typedef struct pd_info {
- mlnx_ual_hobul_t *p_hobul;
- void *p_pd_ul_resources;
- HHUL_pd_hndl_t hhul_pd_hndl;
- u_int32_t pd_idx;
-#define MLNX_MAX_AVS_PER_PD 0xFFFFFFFF
-} mlnx_ual_pd_info_t;
-typedef struct cq_info {
- mlnx_ual_hobul_t *p_hobul;
- void *p_cq_ul_resources;
- HHUL_cq_hndl_t hhul_cq_hndl;
- u_int32_t cq_idx;
- u_int32_t cq_size;
-} mlnx_ual_cq_info_t;
-
-typedef struct qp_info {
- uvp_pd_handle_t h_uvp_pd;
- void *p_qp_ul_resources;
- HHUL_qp_hndl_t hhul_qp_hndl;
- u_int32_t qp_idx;
- VAPI_qp_cap_t ul_qp_cap;
- IB_ts_t type;
-
-} mlnx_ual_qp_info_t;
-
-typedef struct av_info {
- uvp_pd_handle_t h_uvp_pd;
- ib_av_attr_t *p_i_av_attr;
- HHUL_ud_av_hndl_t hhul_av_hndl;
-} mlnx_ual_av_info_t;
-
-typedef struct mw_info {
- uvp_pd_handle_t h_uvp_pd;
- u_int32_t rkey;
- HHUL_mw_hndl_t hhul_mw_hndl;
-} mlnx_ual_mw_info_t;
-
-
/*
* PROTOTYPES
*/
@@ -159,8 +100,10 @@
ib_api_status_t
mlnx_pre_query_ca (
- IN uvp_ca_handle_t h_uvp_ca,
- IN OUT ual_query_ca_ioctl_t *p_ca_ioctl );
+ IN ib_ca_handle_t
h_uvp_ca,
+ IN ib_ca_attr_t
*p_ca_attr,
+ IN size_t
byte_count,
+ IN ci_umv_buf_t
*p_umv_buf );
void
mlnx_post_query_ca (
@@ -172,23 +115,23 @@
ib_api_status_t
mlnx_pre_modify_ca (
- IN uvp_ca_handle_t h_uvp_ca,
+ IN ib_ca_handle_t h_uvp_ca,
IN uint8_t port_num,
IN ib_ca_mod_t modca_cmd,
IN const ib_port_attr_mod_t* p_port_attr_mod );
void
mlnx_post_modify_ca (
- IN uvp_ca_handle_t h_uvp_ca,
+ IN ib_ca_handle_t h_uvp_ca,
IN ib_api_status_t ioctl_status);
ib_api_status_t
mlnx_pre_close_ca (
- IN uvp_ca_handle_t h_uvp_ca );
+ IN ib_ca_handle_t h_uvp_ca );
ib_api_status_t
mlnx_post_close_ca (
- IN uvp_ca_handle_t h_uvp_ca,
+ IN ib_ca_handle_t h_uvp_ca,
IN ib_api_status_t ioctl_status );
@@ -199,7 +142,7 @@
ib_api_status_t
mlnx_pre_allocate_pd (
- IN const uvp_ca_handle_t h_uvp_ca,
+ IN const ib_ca_handle_t h_uvp_ca,
IN OUT ci_umv_buf_t *p_umv_buf);
void
@@ -211,11 +154,11 @@
ib_api_status_t
mlnx_pre_deallocate_pd (
- IN const uvp_pd_handle_t h_uvp_pd);
+ IN const ib_pd_handle_t h_uvp_pd);
void
mlnx_post_deallocate_pd (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN ib_api_status_t ioctl_status );
@@ -226,7 +169,7 @@
ib_api_status_t
mlnx_pre_create_av (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN const ib_av_attr_t *p_addr_vector,
IN OUT ci_umv_buf_t *p_umv_buf);
@@ -240,7 +183,7 @@
ib_api_status_t
mlnx_pre_query_av (
- IN const uvp_av_handle_t h_uvp_av,
+ IN const ib_av_handle_t h_uvp_av,
IN OUT ci_umv_buf_t *p_umv_buf );
void
@@ -253,23 +196,23 @@
ib_api_status_t
mlnx_pre_modify_av (
- IN const uvp_av_handle_t h_uvp_av,
+ IN const ib_av_handle_t h_uvp_av,
IN const ib_av_attr_t *p_addr_vector,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_modify_av (
- IN const uvp_av_handle_t h_uvp_av,
+ IN const ib_av_handle_t h_uvp_av,
IN ib_api_status_t ioctl_status,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_destroy_av (
- IN const uvp_av_handle_t h_uvp_av);
+ IN const ib_av_handle_t h_uvp_av);
void
mlnx_post_destroy_av (
- IN const uvp_av_handle_t h_uvp_av,
+ IN const ib_av_handle_t h_uvp_av,
IN ib_api_status_t ioctl_status);
@@ -300,29 +243,29 @@
void
mlnx_post_resize_cq (
- IN const uvp_cq_handle_t h_uvp_cq,
+ IN const ib_cq_handle_t h_uvp_cq,
IN ib_api_status_t ioctl_status,
IN const uint32_t size,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_query_cq (
- IN const uvp_cq_handle_t h_uvp_cq,
+ IN const ib_cq_handle_t h_uvp_cq,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_query_cq (
- IN const uvp_cq_handle_t h_uvp_cq,
+ IN const ib_cq_handle_t h_uvp_cq,
IN ib_api_status_t ioctl_status,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_destroy_cq (
- IN const uvp_cq_handle_t h_uvp_cq);
+ IN const ib_cq_handle_t h_uvp_cq);
void
mlnx_post_destroy_cq (
- IN const uvp_cq_handle_t h_uvp_cq,
+ IN const ib_cq_handle_t h_uvp_cq,
IN ib_api_status_t ioctl_status);
/************* QP Management *************************/
@@ -332,7 +275,7 @@
ib_api_status_t
mlnx_pre_create_qp (
- IN const uvp_pd_handle_t h_uvp_pd,// Fix me: if needed
+ IN const ib_pd_handle_t h_uvp_pd,// Fix me: if needed
IN const ib_qp_create_t *p_create_attr,
IN OUT ci_umv_buf_t *p_umv_buf);
@@ -345,35 +288,35 @@
ib_api_status_t
mlnx_pre_modify_qp (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN const ib_qp_mod_t *p_modify_attr, // Fixme
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_modify_qp (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN ib_api_status_t ioctl_status,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_query_qp (
- IN uvp_qp_handle_t h_uvp_qp,
+ IN ib_qp_handle_t h_uvp_qp,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_query_qp (
- IN uvp_qp_handle_t h_uvp_qp,
+ IN ib_qp_handle_t h_uvp_qp,
IN ib_api_status_t ioctl_status,
IN ib_qp_attr_t *p_query_attr,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_destroy_qp (
- IN const uvp_qp_handle_t h_uvp_qp);
+ IN const ib_qp_handle_t h_uvp_qp);
void
mlnx_post_destroy_qp (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN ib_api_status_t ioctl_status );
/************* MR/MW Management *************************/
@@ -383,43 +326,43 @@
ib_api_status_t
mlnx_pre_register_mr (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN const ib_mr_create_t *p_mr_create,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_register_mr (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN ib_api_status_t ioctl_status,
IN const uint32_t *p_lkey,
IN const uint32_t *p_rkey,
- OUT const uvp_mr_handle_t *ph_uvp_mr,
+ OUT const ib_mr_handle_t *ph_uvp_mr,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_query_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_mr_handle_t h_uvp_mr,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_query_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_mr_handle_t h_uvp_mr,
IN ib_api_status_t ioctl_status,
IN const ib_mr_attr_t *p_mr_query,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_modify_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
- IN const uvp_pd_handle_t h_uvp_pd
OPTIONAL,
+ IN const ib_mr_handle_t h_uvp_mr,
+ IN const ib_pd_handle_t h_uvp_pd
OPTIONAL,
IN const ib_mr_mod_t mr_mod_mask,
IN const ib_mr_create_t *p_mr_create OPTIONAL,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_modify_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
- IN const uvp_pd_handle_t h_uvp_pd OPTIONAL,
+ IN const ib_mr_handle_t h_uvp_mr,
+ IN const ib_pd_handle_t h_uvp_pd OPTIONAL,
IN ib_api_status_t ioctl_status,
IN const uint32_t *p_lkey,
IN const uint32_t *p_rkey,
@@ -427,36 +370,36 @@
ib_api_status_t
mlnx_pre_register_smr (
- IN const uvp_pd_handle_t h_uvp_pd,
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_pd_handle_t h_uvp_pd,
+ IN const ib_mr_handle_t h_uvp_mr,
IN const ib_access_t access_ctrl,
IN void *p_vaddr,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_register_smr (
- IN const uvp_pd_handle_t h_uvp_pd,
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_pd_handle_t h_uvp_pd,
+ IN const ib_mr_handle_t h_uvp_mr,
IN ib_api_status_t ioctl_status,
IN const void *p_vaddr,
IN const uint32_t *p_lkey,
IN const uint32_t *p_rkey,
- OUT const uvp_mr_handle_t *ph_uvp_smr,
+ OUT const ib_mr_handle_t *ph_uvp_smr,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_deregister_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_mr_handle_t h_uvp_mr,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_deregister_mr (
- IN const uvp_mr_handle_t h_uvp_mr,
+ IN const ib_mr_handle_t h_uvp_mr,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_create_mw (
- IN const uvp_pd_handle_t h_uvp_pd,
+ IN const ib_pd_handle_t h_uvp_pd,
IN OUT ci_umv_buf_t *p_umv_buf);
void
@@ -469,7 +412,7 @@
ib_api_status_t
mlnx_pre_query_mw (
- IN const uvp_mw_handle_t h_uvp_mw,
+ IN const ib_mw_handle_t h_uvp_mw,
IN OUT ci_umv_buf_t *p_umv_buf);
void
@@ -482,12 +425,12 @@
ib_api_status_t
mlnx_pre_destroy_mw (
- IN const uvp_mw_handle_t h_uvp_mw);
+ IN const ib_mw_handle_t h_uvp_mw);
// IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_destroy_mw (
- IN const uvp_mw_handle_t h_uvp_mw,
+ IN const ib_mw_handle_t h_uvp_mw,
IN ib_api_status_t ioctl_status);
@@ -499,26 +442,26 @@
ib_api_status_t
mlnx_pre_attach_mcast (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN const ib_gid_t *p_mcast_gid,
IN const uint16_t mcast_lid,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_attach_mcast (
- IN const uvp_qp_handle_t h_uvp_qp,
+ IN const ib_qp_handle_t h_uvp_qp,
IN ib_api_status_t ioctl_status,
- OUT uvp_mcast_handle_t *ph_mcast,
+ OUT ib_mcast_handle_t *ph_mcast,
IN OUT ci_umv_buf_t *p_umv_buf);
ib_api_status_t
mlnx_pre_detach_mcast (
- IN uvp_mcast_handle_t h_uvp_mcast,
+ IN ib_mcast_handle_t h_uvp_mcast,
IN OUT ci_umv_buf_t *p_umv_buf);
void
mlnx_post_detach_mcast (
- IN uvp_mcast_handle_t h_uvp_mcast,
+ IN ib_mcast_handle_t h_uvp_mcast,
IN ib_api_status_t ioctl_status,
IN OUT ci_umv_buf_t *p_umv_buf);
@@ -568,91 +511,4 @@
IN const void* __ptr64 h_cq,
OUT uint32_t* const
p_n_cqes );
-/************* ERROR Handler *************************/
-void
-mlnx_get_errh_interface (
- IN OUT uvp_interface_t *p_uvp );
-
-
-void
-mlnx_err_handler (
- IN const ib_async_event_rec_t *const p_err_rec);
-
-/************* RDD Management *************************/
-void
-mlnx_get_rdd_interface (
- IN OUT uvp_interface_t *p_uvp );
-
-ib_api_status_t
-mlnx_pre_allocate_rdd (
- IN const uvp_ca_handle_t h_uvp_ca,
- IN OUT ci_umv_buf_t *p_umv_buf);
-
-void
-mlnx_post_allocate_rdd (
- IN const uvp_ca_handle_t h_uvp_ca,
- IN ib_api_status_t ioctl_status,
- OUT uvp_rdd_handle_t *ph_uvp_rdd,
- IN OUT ci_umv_buf_t *p_umv_buf);
-
-ib_api_status_t
-mlnx_pre_deallocate_rdd (
- IN const uvp_rdd_handle_t h_uvp_rdd,
- IN OUT ci_umv_buf_t *p_umv_buf);
-
-void
-mlnx_post_deallocate_rdd (
- IN const uvp_rdd_handle_t h_uvp_rdd);
-
-/************* EEC Management *************************/
-#ifdef EEC_MANAGEMENT
-void
-mlnx_get_eec_interface (
- IN OUT uvp_interface_t *p_uvp );
-
-ib_api_status_t
-mlnx_pre_create_eec (
- IN const uvp_rdd_handle_t h_uvp_rdd,
- IN OUT ci_umv_buf_t *p_umv_buf);
-
-void
-mlnx_post_create_eec (
- IN const uvp_rdd_handle_t h_uvp_rdd,
- IN ib_api_status_t ioctl_status,
- OUT uvp_eec_handle_t *p_uvp_eec,
- IN OUT ci_umv_buf_t *p_umv_buf);
-
-ib_api_status_t
-mlnx_pre_query_eec (
- IN const uvp_eec_handle_t h_uvp_eec,
- IN OUT ci_umv_buf_t *p_umv_buf);
-
-void
-mlnx_post_query_eec (
- IN const uvp_eec_handle_t h_uvp_eec,
- IN ib_api_status_t ioctl_status,
- IN ib_eec_attr_t *p_query_attr,
- IN OUT ci_umv_buf_t *p_umv_buf);
-
-ib_api_status_t
-mlnx_pre_modify_eec (
- IN const uvp_eec_handle_t h_uvp_eec,
- IN const ib_eec_mod_t *p_modify_attr,
- IN OUT ci_umv_buf_t *p_umv_buf);
-
-void
-mlnx_post_modify_eec (
- IN const uvp_eec_handle_t h_uvp_eec,
- IN ib_api_status_t ioctl_status,
- IN OUT ci_umv_buf_t *p_umv_buf);
-
-ib_api_status_t
-mlnx_pre_destroy_eec (
- IN const uvp_eec_handle_t h_uvp_eec);
-
-void
-mlnx_post_destroy_eec (
- IN const uvp_eec_handle_t h_uvp_eec);
-
-#endif // EEC_MANAGEMENT
#endif
Index: hw/mt23108/user/hca_data.h
===================================================================
--- hw/mt23108/user/hca_data.h (revision 52)
+++ hw/mt23108/user/hca_data.h (working copy)
@@ -33,7 +33,66 @@
#include <iba/ib_uvp.h>
+typedef struct _ib_ca
+{
+ HH_hca_dev_t *p_hca_ul_info;
+ void *p_hca_ul_resources;
+ ib_ca_attr_t *p_hca_attr;
+ HHUL_hca_hndl_t hhul_hca_hndl;
+ u_int32_t priv_op;
+ void *p_al_ci_ca;
+
+} mlnx_ual_hobul_t;
+
+
+typedef struct _ib_pd
+{
+ mlnx_ual_hobul_t *p_hobul;
+ void *p_pd_ul_resources;
+ HHUL_pd_hndl_t hhul_pd_hndl;
+ u_int32_t pd_idx;
+
+#define MLNX_MAX_AVS_PER_PD 0xFFFFFFFF
+
+} mlnx_ual_pd_info_t;
+
+
+typedef struct _ib_cq
+{
+ mlnx_ual_hobul_t *p_hobul;
+ void *p_cq_ul_resources;
+ HHUL_cq_hndl_t hhul_cq_hndl;
+ u_int32_t cq_idx;
+ u_int32_t cq_size;
+
+} mlnx_ual_cq_info_t;
+
+
+typedef struct _ib_qp
+{
+ ib_pd_handle_t h_uvp_pd;
+ void *p_qp_ul_resources;
+ HHUL_qp_hndl_t hhul_qp_hndl;
+ u_int32_t qp_idx;
+ VAPI_qp_cap_t ul_qp_cap;
+ IB_ts_t type;
+
+} mlnx_ual_qp_info_t;
+
+
+typedef struct _ib_mw
+{
+ ib_pd_handle_t h_uvp_pd;
+ u_int32_t rkey;
+ HHUL_mw_hndl_t hhul_mw_hndl;
+
+} mlnx_ual_mw_info_t;
+
+
typedef struct _ib_av
{
+ ib_pd_handle_t h_uvp_pd;
+ ib_av_attr_t *p_i_av_attr;
HHUL_ud_av_hndl_t h_av;
-};
+
+} mlnx_ual_av_info_t;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uvp.patch
Type: application/octet-stream
Size: 47005 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050804/1222a496/attachment.obj>
More information about the ofw
mailing list