[IBAL] Cleanup dead code in IBAL.
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 1 Jul 2008 18:02:59 +0000 (18:02 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 1 Jul 2008 18:02:59 +0000 (18:02 +0000)
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1315 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_dev.h
core/al/al_proxy.h
core/al/al_proxy_ioctl.h
core/al/kernel/SOURCES
core/al/kernel/al_dev.c
core/al/kernel/al_proxy.c
core/al/kernel/al_proxy_verbs.c
core/al/user/ual_mgr.c
core/al/user/ual_mgr.h

index 0cf9d00..ee1ffe0 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -54,7 +55,7 @@
 #define AL_DEVICE_NAME L"\\Device\\ibal"\r
 #define        ALDEV_KEY               (0x3B)  /* Matches FILE_DEVICE_INFINIBAND from wdm.h */\r
 \r
-#define AL_IOCTL_VERSION                       (4)\r
+#define AL_IOCTL_VERSION                       (5)\r
 \r
 /* max number of devices with non-default pkey */\r
 #define        MAX_NUM_PKEY    16\r
@@ -131,8 +132,7 @@ typedef enum al_proxy_ops
 {\r
        al_proxy_ops_start = 0,\r
 \r
-       ual_get_cm_cb_info = al_proxy_ops_start+1,\r
-       ual_get_comp_cb_info,\r
+       ual_get_comp_cb_info = al_proxy_ops_start+1,\r
        ual_get_misc_cb_info,\r
        ual_bind,\r
        ual_bind_sa,\r
@@ -155,7 +155,6 @@ typedef enum al_proxy_ops
  * for asynchronous event notifications from proxy\r
  */\r
 \r
-#define        UAL_GET_CM_CB_INFO      IOCTL_CODE(ALDEV_KEY, ual_get_cm_cb_info)\r
 #define        UAL_GET_COMP_CB_INFO    IOCTL_CODE(ALDEV_KEY, ual_get_comp_cb_info)\r
 #define        UAL_GET_MISC_CB_INFO    IOCTL_CODE(ALDEV_KEY, ual_get_misc_cb_info)\r
 #define UAL_BIND                       IOCTL_CODE(ALDEV_KEY, ual_bind)\r
index ea39237..e4beca5 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -173,7 +174,6 @@ typedef struct _al_proxy_cb_info
 \r
        union _cb_type\r
        {\r
-               cm_cb_ioctl_info_t              cm;\r
                comp_cb_ioctl_info_t    comp;\r
                misc_cb_ioctl_info_t    misc;\r
 \r
index 575db0d..4434cb3 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -66,135 +67,19 @@ typedef enum _misc_cb_rec_type
        MAD_RECV_REC,\r
        SVC_REG_REC,\r
        QUERY_REC,\r
-       PNP_REC,\r
-       SUB_REC,\r
-       REPORT_REC,\r
-       LISTEN_ERROR_REC\r
+       PNP_REC\r
 \r
 }      misc_cb_rec_type;\r
 \r
 \r
 \r
-/*\r
- * Information for CM callbacks.\r
- */\r
-typedef union _cm_cb_ioctl_rec\r
-{\r
-       /* REQ callback */\r
-       struct _cm_req_cb_ioctl_rec\r
-       {\r
-               ib_cm_req_rec_t                         req_rec;\r
-\r
-               /* Attributes needed to modify the QP in user-mode. */\r
-               ib_qp_mod_t                                     qp_mod_rtr;\r
-               ib_qp_mod_t                                     qp_mod_rts;\r
-               uint32_t                                        timeout_ms;\r
-\r
-               union _cm_req_pdata_rec\r
-               {\r
-                       ib_req_pdata_t                  req_pdata;\r
-                       ib_sidr_req_pdata_t             sidr_req_pdata;\r
-\r
-               }       cm_req_pdata_rec;\r
-\r
-       }       cm_req_cb_ioctl_rec;\r
-\r
-\r
-       /* REP callback */\r
-       struct _cm_rep_cb_ioctl_rec\r
-       {\r
-               ib_cm_rep_rec_t                         rep_rec;\r
-\r
-               /* Attributes needed to modify the QP in user-mode. */\r
-               ib_qp_mod_t                                     qp_mod_rtr;\r
-               ib_qp_mod_t                                     qp_mod_rts;\r
-\r
-               union _cm_rep_pdata_rec\r
-               {\r
-                       ib_rep_pdata_t                  rep_pdata;\r
-                       ib_sidr_rep_pdata_t             sidr_rep_pdata;\r
-\r
-               }       cm_rep_pdata_rec;\r
-\r
-       }       cm_rep_cb_ioctl_rec;\r
-\r
-\r
-       /* RTU callback */\r
-       struct _cm_rtu_cb_ioctl_rec\r
-       {\r
-               ib_cm_rtu_rec_t                         rtu_rec;\r
-               ib_rtu_pdata_t                          rtu_pdata;\r
-\r
-       }       cm_rtu_cb_ioctl_rec;\r
-\r
-\r
-       /* REJ callback */\r
-       struct _cm_rej_cb_ioctl_rec\r
-       {\r
-               ib_cm_rej_rec_t                         rej_rec;\r
-               ib_ari_t                                        ari_pdata;\r
-               ib_rej_pdata_t                          rej_pdata;\r
-\r
-       }       cm_rej_cb_ioctl_rec;\r
-\r
-\r
-       /* MRA callback */\r
-       struct _cm_mra_cb_ioctl_rec\r
-       {\r
-               ib_cm_mra_rec_t                         mra_rec;\r
-               ib_mra_pdata_t                          mra_pdata;\r
-\r
-       }       cm_mra_cb_ioctl_rec;\r
-\r
-\r
-       /* LAP callback */\r
-       struct _cm_lap_cb_ioctl_rec\r
-       {\r
-               ib_cm_lap_rec_t                         lap_rec;\r
-               ib_lap_pdata_t                          lap_pdata;\r
-\r
-       }       cm_lap_cb_ioctl_rec;\r
-\r
-\r
-       /* APR callback */\r
-       struct _cm_apr_cb_ioctl_rec\r
-       {\r
-               ib_cm_apr_rec_t                         apr_rec;\r
-               ib_apr_pdata_t                          apr_pdata;\r
-               ib_apr_info_t                           apr_info;\r
-\r
-       }       cm_apr_cb_ioctl_rec;\r
-\r
-\r
-       /* DREQ callback */\r
-       struct _cm_dreq_cb_ioctl_rec\r
-       {\r
-               ib_cm_dreq_rec_t                        dreq_rec;\r
-               ib_dreq_pdata_t                         dreq_pdata;\r
-\r
-       }       cm_dreq_cb_ioctl_rec;\r
-\r
-\r
-       /* DREP callback */\r
-       struct _cm_drep_cb_ioctl_rec\r
-       {\r
-               ib_cm_drep_rec_t                        drep_rec;\r
-               ib_drep_pdata_t                         drep_pdata;\r
-\r
-       }       cm_drep_cb_ioctl_rec;\r
-/*\r
-*/\r
-} cm_cb_ioctl_rec_t;\r
-\r
-\r
-\r
 /*\r
  * Information for most callbacks.  This does not include callbacks for\r
  * the CM or completions. \r
  */\r
 typedef union _misc_cb_ioctl_rec\r
 {\r
-       void* VOID_PTR64                                        context;\r
+       uint64_t                                                context;\r
 \r
        /* Asynchronous event records */\r
        ib_async_event_rec_t                    event_rec;\r
@@ -232,10 +117,6 @@ TO_LONG_PTR(               ib_mcast_handle_t ,                     h_mcast) ;
        }       mad_recv_cb_ioctl_rec;\r
 \r
 \r
-       /* Service Registration records */\r
-       ib_reg_svc_rec_t                                reg_svc_rec;\r
-\r
-\r
        /* PNP Record as defined here is for UAL's consumption alone */\r
        struct _pnp_cb_ioctl_rec\r
        {\r
@@ -249,69 +130,17 @@ TO_LONG_PTR(              ib_mcast_handle_t ,                     h_mcast) ;
                        struct _pnp_ca\r
                        {\r
                                ib_net64_t                      ca_guid;\r
-                               uint32_t                        size;\r
-                               uint64_t                        h_ca_attr;      /* handle to kernel ca attr */\r
 \r
                        }       ca;\r
 \r
-                       /* pnp_port is valid only for port events\r
-                        * UAL can query based on the ca_guid for more info\r
-                        */\r
-                       struct _pnp_port\r
-                       {\r
-                               ib_net64_t                      ca_guid;\r
-                               uint8_t                         port_num;\r
-\r
-                       }       port;\r
-\r
-                       /* pnp_ioc is valid only for IOC events\r
-                        * If IOC is implemented, need to determine\r
-                        * whether the ioc event handle should be passed\r
-                        */\r
-                       struct _pnp_ioc\r
-                       {\r
-                               ib_ioc_info_t           info;\r
-TO_LONG_PTR(                           ib_pnp_handle_t ,               h_ioc_event) ; \r
-                               /* TBD: service entry is variable-sized?? */\r
-                               ib_svc_entry_t          svc_entry[1];\r
-\r
-                       }       ioc;\r
-\r
                }       pnp_info;\r
 \r
        }       pnp_cb_ioctl_rec;\r
 \r
-\r
-       ib_listen_err_rec_t                             listen_err;\r
-\r
-\r
-       /* Subscription Record */\r
-       ib_sub_rec_t                                    sub_rec;\r
-\r
-\r
-       /* Report record */\r
-       struct _report_cb_ioctl_rec\r
-       {\r
-               TO_LONG_PTR(const void* ,                       report_context) ;\r
-               ib_mad_notice_attr_t            notice;\r
-\r
-       }       report_cb_ioctl_rec;\r
-\r
-\r
 }      misc_cb_ioctl_rec_t;\r
 \r
 \r
 \r
-\r
-typedef struct _cm_cb_ioctl_info\r
-{\r
-       cm_cb_rec_type                                  rec_type;\r
-       cm_cb_ioctl_rec_t                               ioctl_rec;\r
-\r
-}      cm_cb_ioctl_info_t;\r
-\r
-\r
-\r
 typedef struct _comp_cb_ioctl_info\r
 {\r
        TO_LONG_PTR(void* ,                                     cq_context) ;\r
@@ -328,23 +157,4 @@ typedef struct _misc_cb_ioctl_info
 }      misc_cb_ioctl_info_t;\r
 \r
 \r
-\r
-typedef union _ual_ca_attr_info\r
-{\r
-       struct _ual_ca_attr_info_in\r
-       {\r
-               TO_LONG_PTR(ib_ca_attr_t*,p_ca_attr) ;          /* where to copy in user mode */\r
-               uint64_t                                h_ca_attr;              /* kernel handle to ca attribute */\r
-\r
-       }       in;\r
-       struct _ual_ca_attr_info_out\r
-       {\r
-               ib_api_status_t                 status;\r
-\r
-       }       out;\r
-\r
-}      ual_ca_attr_info_ioctl_t;\r
-\r
-\r
-\r
 #endif /* __AL_PROXY_IOCTL_H__ */\r
index 777e739..d88f37b 100644 (file)
@@ -11,8 +11,6 @@ ENABLE_EVENT_TRACING=1
 !endif\r
 \r
 \r
-DLLDEF=al_exports.def\r
-\r
 SOURCES= ibal.rc                       \\r
        al_ci_ca.c                              \\r
        al_cm_cep.c                             \\r
index 767d2dc..c5840f3 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -519,9 +520,6 @@ al_dev_cancel_ioctl(
        cl_spinlock_acquire( &p_context->cb_lock );\r
        switch( cl_ioctl_ctl_code( h_ioctl ) )\r
        {\r
-       case UAL_GET_CM_CB_INFO:\r
-               ph_ioctl = &p_context->h_cm_ioctl;\r
-               break;\r
        case UAL_GET_COMP_CB_INFO:\r
                ph_ioctl = &p_context->h_comp_ioctl;\r
                break;\r
index fac3cc5..3feed04 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -206,13 +207,6 @@ proxy_queue_ioctl_buf(
        /* Set up the appropriate callback list. */\r
        switch( cb_type )\r
        {\r
-       case UAL_GET_CM_CB_INFO:\r
-               p_cb_list = &p_context->cm_cb_list;\r
-               ph_ioctl = &p_context->h_cm_ioctl;\r
-               /* TODO: Use output size only. */\r
-               ioctl_size = sizeof( cm_cb_ioctl_info_t );\r
-               break;\r
-\r
        case UAL_GET_COMP_CB_INFO:\r
                p_cb_list = &p_context->comp_cb_list;\r
                ph_ioctl = &p_context->h_comp_ioctl;\r
@@ -288,48 +282,6 @@ proxy_queue_ioctl_buf(
 \r
 \r
 \r
-/*\r
- * Process the ioctl UAL_GET_CM_CB_INFO:\r
- * Get a CM callback record from the queue of CM callback records\r
- */\r
-static cl_status_t\r
-proxy_get_cm_cb(\r
-       IN              cl_ioctl_handle_t               h_ioctl )\r
-{\r
-       cl_status_t                             cl_status;\r
-       IO_STACK_LOCATION               *p_io_stack;\r
-       al_dev_open_context_t   *p_context;\r
-\r
-       AL_ENTER( AL_DBG_DEV );\r
-\r
-       p_io_stack = IoGetCurrentIrpStackLocation( h_ioctl );\r
-       p_context = (al_dev_open_context_t*)p_io_stack->FileObject->FsContext;\r
-       if( (uintn_t)p_io_stack->FileObject->FsContext2 != AL_OBJ_TYPE_CM )\r
-       {\r
-               AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
-                       ("Invalid file object type for request: %016I64x\n",\r
-                       (LONG_PTR)p_io_stack->FileObject->FsContext2) );\r
-               return CL_INVALID_PARAMETER;\r
-       }\r
-\r
-       /* Check the size of the ioctl */\r
-       if( !p_context || !cl_ioctl_out_buf( h_ioctl ) ||\r
-               cl_ioctl_out_size( h_ioctl ) != sizeof(cm_cb_ioctl_info_t) )\r
-       {\r
-               AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
-                       ("No output buffer, or buffer too small.\n") );\r
-               return CL_INVALID_PARAMETER;\r
-       }\r
-\r
-       cl_status = proxy_queue_ioctl_buf( UAL_GET_CM_CB_INFO,\r
-               p_context, h_ioctl );\r
-\r
-       AL_EXIT( AL_DBG_DEV );\r
-       return cl_status;\r
-}\r
-\r
-\r
-\r
 /*\r
  * Process the ioctl UAL_GET_COMP_CB_INFO:\r
  * Get a completion callback record from the queue of CM callback records\r
@@ -477,8 +429,6 @@ proxy_pnp_port_cb(
        misc_cb_ioctl_info_t    misc_cb_info;\r
        misc_cb_ioctl_rec_t             *p_misc_rec = &misc_cb_info.ioctl_rec;\r
        al_dev_open_context_t   *p_context;\r
-       ib_ca_attr_t                    *p_ca_attr;\r
-       uint64_t                                hdl;\r
 \r
        AL_ENTER( AL_DBG_PROXY_CB );\r
 \r
@@ -519,31 +469,8 @@ proxy_pnp_port_cb(
                break;\r
 \r
        default:\r
-               /* Allocate space for the CA attributes. */\r
-               p_ca_attr = cl_zalloc( p_port_rec->p_ca_attr->size );\r
-               if( !p_ca_attr )\r
-               {\r
-                       AL_PRINT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
-                               ("cl_malloc( %d ) failed.\n", p_port_rec->p_ca_attr->size) );\r
-                       break;\r
-               }\r
-\r
-               ib_copy_ca_attr( p_ca_attr, p_port_rec->p_ca_attr );\r
-\r
-               hdl = al_hdl_lock_insert(\r
-                       p_context->h_al, p_ca_attr, AL_OBJ_TYPE_H_CA_ATTR );\r
-\r
-               if( hdl == AL_INVALID_HANDLE )\r
-               {\r
-                       cl_free( p_ca_attr );\r
-                       break;\r
-               }\r
-\r
                p_misc_rec->pnp_cb_ioctl_rec.pnp_info.ca.ca_guid =\r
                        p_port_rec->p_ca_attr->ca_guid;\r
-               p_misc_rec->pnp_cb_ioctl_rec.pnp_info.ca.size =\r
-                       p_port_rec->p_ca_attr->size;\r
-               p_misc_rec->pnp_cb_ioctl_rec.pnp_info.ca.h_ca_attr = hdl;\r
 \r
                proxy_queue_cb_buf( UAL_GET_MISC_CB_INFO, p_context, &misc_cb_info,\r
                        NULL );\r
@@ -564,45 +491,33 @@ proxy_get_ca_attr(
                OUT     size_t                                  *p_ret_bytes )\r
 {\r
        al_dev_open_context_t                   *p_context;\r
-       ual_ca_attr_info_ioctl_t                *p_ioctl;\r
+       uint64_t                                                *ph_ca_attr;\r
        ib_ca_attr_t                                    *p_src;\r
 \r
        AL_ENTER( AL_DBG_DEV );\r
 \r
+       UNREFERENCED_PARAMETER( p_ret_bytes );\r
+\r
        /* Check the size of the ioctl */\r
-       if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl ) ||\r
-               cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||\r
-               cl_ioctl_out_size( h_ioctl ) < sizeof(p_ioctl->out) )\r
+       if( !cl_ioctl_in_buf( h_ioctl ) ||\r
+               cl_ioctl_in_size( h_ioctl ) < sizeof(uint64_t) )\r
        {\r
                AL_PRINT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("invalid buffer size\n") );\r
                return CL_INVALID_PARAMETER;\r
        }\r
        p_context = (al_dev_open_context_t*)p_open_context;\r
-       p_ioctl = (ual_ca_attr_info_ioctl_t*)cl_ioctl_in_buf( h_ioctl );\r
+       ph_ca_attr = (uint64_t*)cl_ioctl_in_buf( h_ioctl );\r
 \r
        p_src = (ib_ca_attr_t*)al_hdl_get(\r
-               p_context->h_al, p_ioctl->in.h_ca_attr, AL_OBJ_TYPE_H_CA_ATTR );\r
+               p_context->h_al, *ph_ca_attr, AL_OBJ_TYPE_H_CA_ATTR );\r
        if( !p_src )\r
        {\r
                AL_PRINT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("invalid attr handle\n") );\r
                return CL_INVALID_PARAMETER;\r
        }\r
 \r
-       __try\r
-       {\r
-               ProbeForWrite( p_ioctl->in.p_ca_attr, p_src->size, sizeof(void*) );\r
-               ib_copy_ca_attr( p_ioctl->in.p_ca_attr, p_src );\r
-               p_ioctl->out.status = IB_SUCCESS;\r
-       }\r
-       __except(EXCEPTION_EXECUTE_HANDLER)\r
-       {\r
-               p_ioctl->out.status = IB_INVALID_PERMISSION;\r
-       }\r
-\r
        cl_free(p_src);\r
 \r
-       *p_ret_bytes = sizeof(p_ioctl->out);\r
-\r
        AL_EXIT( AL_DBG_DEV );\r
        return CL_SUCCESS;\r
 }\r
@@ -674,36 +589,32 @@ proxy_ioctl(
 \r
        switch( cl_ioctl_ctl_code( h_ioctl ) )\r
        {\r
-       case UAL_GET_CM_CB_INFO: //check_done\r
-        ASSERT(FALSE);\r
-               cl_status = proxy_get_cm_cb( h_ioctl ); \r
-               break;\r
-       case UAL_GET_MISC_CB_INFO: // check_done, no IN parameters\r
-               cl_status = proxy_get_misc_cb( h_ioctl ); \r
+       case UAL_GET_MISC_CB_INFO:\r
+               cl_status = proxy_get_misc_cb( h_ioctl );\r
                break;\r
-       case UAL_GET_COMP_CB_INFO: // check_done, no IN parameters\r
-               cl_status = proxy_get_comp_cb( h_ioctl );  \r
+       case UAL_GET_COMP_CB_INFO:\r
+               cl_status = proxy_get_comp_cb( h_ioctl );\r
                break;\r
-       case UAL_BIND: //check_done, no IN with ptr64\r
-               cl_status = al_dev_open( h_ioctl ); \r
+       case UAL_BIND:\r
+               cl_status = al_dev_open( h_ioctl );\r
                break;\r
-       case UAL_BIND_SA: //check_done, fixed memclr in ual_create_async_file\r
-               cl_status = proxy_bind_file( h_ioctl, AL_OBJ_TYPE_SA_REQ_SVC ); //check_done, fixed memclr in ual_create_async_file\r
+       case UAL_BIND_SA:\r
+               cl_status = proxy_bind_file( h_ioctl, AL_OBJ_TYPE_SA_REQ_SVC );\r
                break;\r
-       case UAL_BIND_DESTROY: //check_done, fixed memclr in ual_create_async_file\r
-       case UAL_BIND_PNP: //check_done, fixed memclr in ual_create_async_file \r
-               cl_status = proxy_bind_file( h_ioctl, AL_OBJ_TYPE_PNP_MGR ); \r
+       case UAL_BIND_DESTROY:\r
+       case UAL_BIND_PNP:\r
+               cl_status = proxy_bind_file( h_ioctl, AL_OBJ_TYPE_PNP_MGR );\r
                break;\r
-       case UAL_BIND_CM: //check_done, fixed memclr in ual_create_async_file\r
+       case UAL_BIND_CM:\r
                cl_status = proxy_bind_file( h_ioctl, AL_OBJ_TYPE_CM );\r
                break;\r
-       case UAL_BIND_CQ: //check_done, fixed memclr in ual_create_async_file\r
+       case UAL_BIND_CQ:\r
                cl_status = proxy_bind_file( h_ioctl, AL_OBJ_TYPE_H_CQ );\r
                break;\r
-       case UAL_BIND_MISC: //check_done, fixed memclr in ual_create_async_file\r
+       case UAL_BIND_MISC:\r
                cl_status = proxy_bind_file( h_ioctl, AL_OBJ_TYPE_AL_MGR );\r
                break;\r
-       case UAL_BIND_ND: //check_done, used only in kernel\r
+       case UAL_BIND_ND:\r
                cl_status = proxy_bind_file( h_ioctl, AL_OBJ_TYPE_NDI );\r
                break;\r
        case UAL_REQ_CREATE_PDO:\r
index 5d085c4..57df4d2 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -258,12 +259,6 @@ proxy_queue_cb_buf(
        /* Set up the appropriate callback list. */\r
        switch( cb_type )\r
        {\r
-       case UAL_GET_CM_CB_INFO:\r
-               p_cb_list = &p_context->cm_cb_list;\r
-               ph_ioctl = &p_context->h_cm_ioctl;\r
-               ioctl_size = sizeof( cm_cb_ioctl_info_t );\r
-               break;\r
-\r
        case UAL_GET_COMP_CB_INFO:\r
                p_cb_list = &p_context->comp_cb_list;\r
                ph_ioctl = &p_context->h_comp_ioctl;\r
@@ -1493,37 +1488,24 @@ proxy_query_qp(
                        p_ioctl->out.attr.h_pd =\r
                                (ib_pd_handle_t VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_pd->obj.hdl);\r
                }\r
-               else\r
-               {\r
-                       p_ioctl->out.attr.h_pd = NULL;\r
-               }\r
+\r
                if( p_ioctl->out.attr.h_sq_cq )\r
                {\r
                        p_ioctl->out.attr.h_sq_cq =\r
                                (ib_cq_handle_t VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_sq_cq->obj.hdl);\r
                }\r
-               else\r
-               {\r
-                       p_ioctl->out.attr.h_sq_cq = NULL;\r
-               }\r
+\r
                if( p_ioctl->out.attr.h_rq_cq )\r
                {\r
                        p_ioctl->out.attr.h_rq_cq =\r
                                (ib_cq_handle_t VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_rq_cq->obj.hdl);\r
                }\r
-               else\r
-               {\r
-                       p_ioctl->out.attr.h_rq_cq = NULL;\r
-               }\r
+\r
                if( p_ioctl->out.attr.h_srq )\r
                {\r
                        p_ioctl->out.attr.h_srq =\r
                                (ib_srq_handle_t VOID_PTR64)HDL_TO_PTR(p_ioctl->out.attr.h_srq->obj.hdl);\r
                }\r
-               else\r
-               {\r
-                       p_ioctl->out.attr.h_srq = NULL;\r
-               }\r
        }\r
        else\r
        {\r
index a0b21e5..ea7b04f 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -74,10 +75,6 @@ static DWORD WINAPI
 __cb_thread_routine(\r
        IN                              void                                            *context );\r
 \r
-//static void\r
-//__process_cm_cb(\r
-//     IN              cm_cb_ioctl_info_t*                     p_cm_cb_info);\r
-\r
 static void\r
 __process_misc_cb(\r
        IN              misc_cb_ioctl_info_t*           p_misc_cb_info );\r
@@ -475,21 +472,6 @@ create_al_mgr()
                }\r
        }\r
 \r
-       //if( !DeviceIoControl( gp_al_mgr->ual_mgr.h_cm_file, UAL_GET_CM_CB_INFO,\r
-       //      NULL, 0,\r
-       //      &gp_al_mgr->ual_mgr.cm_cb_info, sizeof(cm_cb_ioctl_info_t),\r
-       //      NULL, &gp_al_mgr->ual_mgr.cm_ov ) )\r
-       //{\r
-       //      if( GetLastError() != ERROR_IO_PENDING )\r
-       //      {\r
-       //              AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
-       //                      ("DeviceIoControl for CM callback request returned %d.\n",\r
-       //                      GetLastError()) );\r
-       //              gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj, NULL);\r
-       //              return IB_ERROR;\r
-       //      }\r
-       //}\r
-\r
        if( !DeviceIoControl( gp_al_mgr->ual_mgr.h_cq_file, UAL_GET_COMP_CB_INFO,\r
                NULL, 0,\r
                &gp_al_mgr->ual_mgr.comp_cb_info, sizeof(comp_cb_ioctl_info_t),\r
@@ -536,172 +518,6 @@ create_al_mgr()
 /*\r
  * UAL thread start routines.\r
  */\r
-//\r
-//\r
-///* Thread to process the asynchronous CM notifications */\r
-//void\r
-//cm_cb(\r
-//     IN                              DWORD                                           error_code,\r
-//     IN                              DWORD                                           ret_bytes,\r
-//     IN                              LPOVERLAPPED                            p_ov )\r
-//{\r
-//     AL_ENTER( AL_DBG_CM );\r
-//\r
-//     UNUSED_PARAM( p_ov );\r
-//\r
-//     if( !error_code && ret_bytes )\r
-//     {\r
-//             /* Check the record type and adjust the pointers */\r
-//             /*      TBD     */\r
-//             __process_cm_cb( &gp_al_mgr->ual_mgr.cm_cb_info );\r
-//     }\r
-//     \r
-//     if( error_code != ERROR_OPERATION_ABORTED )\r
-//     {\r
-//             if( !DeviceIoControl( gp_al_mgr->ual_mgr.h_cm_file, UAL_GET_CM_CB_INFO,\r
-//                     NULL, 0,\r
-//                     &gp_al_mgr->ual_mgr.cm_cb_info, sizeof(cm_cb_ioctl_info_t),\r
-//                     NULL, &gp_al_mgr->ual_mgr.cm_ov ) )\r
-//             {\r
-//                     if( GetLastError() != ERROR_IO_PENDING )\r
-//                     {\r
-//                             AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
-//                                     ("DeviceIoControl for CM callback request returned %d.\n",\r
-//                                     GetLastError()) );\r
-//                     }\r
-//             }\r
-//     }\r
-//\r
-//     AL_EXIT( AL_DBG_CM );\r
-//}\r
-\r
-\r
-\r
-//static void\r
-//__process_cm_cb(\r
-//     IN              cm_cb_ioctl_info_t*                     p_cm_cb_info)\r
-//{\r
-//     switch( p_cm_cb_info->rec_type)\r
-//     {\r
-//     case CM_REQ_REC:\r
-//     {\r
-//             struct _cm_req_cb_ioctl_rec *p_ioctl_rec =\r
-//                             &p_cm_cb_info->ioctl_rec.cm_req_cb_ioctl_rec;\r
-//\r
-//             if (p_ioctl_rec->req_rec.qp_type == IB_QPT_UNRELIABLE_DGRM)\r
-//             {\r
-//                     p_ioctl_rec->req_rec.p_req_pdata =\r
-//                             (uint8_t *)&p_ioctl_rec->cm_req_pdata_rec.sidr_req_pdata;\r
-//             }\r
-//             else\r
-//             {\r
-//                     p_ioctl_rec->req_rec.p_req_pdata =\r
-//                             (uint8_t *)&p_ioctl_rec->cm_req_pdata_rec.req_pdata;\r
-//             }\r
-//             ual_cm_req_cb( &p_ioctl_rec->req_rec, &p_ioctl_rec->qp_mod_rtr,\r
-//                     &p_ioctl_rec->qp_mod_rts, p_ioctl_rec->timeout_ms );\r
-//             break;\r
-//     }\r
-//     case CM_REP_REC:\r
-//     {\r
-//             struct _cm_rep_cb_ioctl_rec *p_ioctl_rec =\r
-//                             &p_cm_cb_info->ioctl_rec.cm_rep_cb_ioctl_rec;\r
-//\r
-//             if (p_ioctl_rec->rep_rec.qp_type == IB_QPT_UNRELIABLE_DGRM)\r
-//             {\r
-//                     p_ioctl_rec->rep_rec.p_rep_pdata =\r
-//                             (uint8_t *)&p_ioctl_rec->cm_rep_pdata_rec.sidr_rep_pdata;\r
-//             }\r
-//             else\r
-//             {\r
-//                     p_ioctl_rec->rep_rec.p_rep_pdata =\r
-//                             (uint8_t *)&p_ioctl_rec->cm_rep_pdata_rec.rep_pdata;\r
-//             }\r
-//             ual_cm_rep_cb( &p_ioctl_rec->rep_rec, &p_ioctl_rec->qp_mod_rtr,\r
-//                     &p_ioctl_rec->qp_mod_rts );\r
-//             break;\r
-//     }\r
-//     case CM_RTU_REC:\r
-//     {\r
-//             struct _cm_rtu_cb_ioctl_rec *p_ioctl_rec =\r
-//                             &p_cm_cb_info->ioctl_rec.cm_rtu_cb_ioctl_rec;\r
-//\r
-//             p_ioctl_rec->rtu_rec.p_rtu_pdata = (uint8_t *)&p_ioctl_rec->rtu_pdata;\r
-//             ual_cm_rtu_cb( &p_ioctl_rec->rtu_rec );\r
-//             break;\r
-//     }\r
-//     case CM_REJ_REC:\r
-//     {\r
-//             struct _cm_rej_cb_ioctl_rec *p_ioctl_rec =\r
-//                             &p_cm_cb_info->ioctl_rec.cm_rej_cb_ioctl_rec;\r
-//\r
-//             p_ioctl_rec->rej_rec.p_rej_pdata = \r
-//                     (uint8_t*)&p_ioctl_rec->rej_pdata;\r
-//             p_ioctl_rec->rej_rec.p_ari =\r
-//                     (uint8_t*)&p_ioctl_rec->ari_pdata;\r
-//             ual_cm_rej_cb( &p_ioctl_rec->rej_rec );\r
-//             break;\r
-//     }\r
-//     case CM_MRA_REC:\r
-//     {\r
-//             struct _cm_mra_cb_ioctl_rec *p_ioctl_rec =\r
-//                             &p_cm_cb_info->ioctl_rec.cm_mra_cb_ioctl_rec;\r
-//\r
-//             p_ioctl_rec->mra_rec.p_mra_pdata =\r
-//                     (uint8_t*)&p_ioctl_rec->mra_pdata;\r
-//             ual_cm_mra_cb( &p_cm_cb_info->ioctl_rec.cm_mra_cb_ioctl_rec.mra_rec );\r
-//             break;\r
-//     }\r
-//     case CM_LAP_REC:\r
-//     {\r
-//             struct _cm_lap_cb_ioctl_rec *p_ioctl_rec =\r
-//                             &p_cm_cb_info->ioctl_rec.cm_lap_cb_ioctl_rec;\r
-//\r
-//             p_ioctl_rec->lap_rec.p_lap_pdata =\r
-//                     (uint8_t *)&p_ioctl_rec->lap_pdata;\r
-//             ual_cm_lap_cb( &p_ioctl_rec->lap_rec );\r
-//             break;\r
-//     }\r
-//     case CM_APR_REC:\r
-//     {\r
-//             struct _cm_apr_cb_ioctl_rec *p_ioctl_rec =\r
-//                             &p_cm_cb_info->ioctl_rec.cm_apr_cb_ioctl_rec;\r
-//\r
-//             p_ioctl_rec->apr_rec.p_apr_pdata =\r
-//                     (uint8_t*)&p_ioctl_rec->apr_pdata;\r
-//             p_ioctl_rec->apr_rec.p_info =\r
-//                     (uint8_t*)&p_ioctl_rec->apr_info;\r
-//             ual_cm_apr_cb( &p_ioctl_rec->apr_rec );\r
-//             break;\r
-//     }\r
-//     case CM_DREQ_REC:\r
-//     {\r
-//             struct _cm_dreq_cb_ioctl_rec *p_ioctl_rec =\r
-//                             &p_cm_cb_info->ioctl_rec.cm_dreq_cb_ioctl_rec;\r
-//\r
-//             p_ioctl_rec->dreq_rec.p_dreq_pdata =\r
-//                     (uint8_t*)&p_ioctl_rec->dreq_pdata;\r
-//             ual_cm_dreq_cb( &p_ioctl_rec->dreq_rec );\r
-//             break;\r
-//     }\r
-//     case CM_DREP_REC:\r
-//     {\r
-//             struct _cm_drep_cb_ioctl_rec *p_ioctl_rec =\r
-//                             &p_cm_cb_info->ioctl_rec.cm_drep_cb_ioctl_rec;\r
-//\r
-//             p_ioctl_rec->drep_rec.p_drep_pdata =\r
-//                     (uint8_t*)&p_ioctl_rec->drep_pdata;\r
-//             ual_cm_drep_cb( &p_ioctl_rec->drep_rec );\r
-//             break;\r
-//     }\r
-//     default:\r
-//             /* Unknown record type - just return */\r
-//             break;\r
-//     }\r
-//}\r
-//\r
-//\r
-//\r
 static void\r
 __process_comp_cb(\r
        IN              comp_cb_ioctl_info_t*                   p_comp_cb_info )\r
@@ -954,13 +770,9 @@ __process_misc_cb(
                ib_pnp_event_t                                  pnp_event;\r
                ib_net64_t                                              ca_guid;\r
                al_ci_ca_t                                              *p_ci_ca;\r
-               ual_ca_attr_info_ioctl_t                attr_ioctl;\r
-               uintn_t                                                 bytes_ret;\r
-               cl_status_t                                             cl_status;\r
                ib_ca_attr_t                                    *p_old_ca_attr;\r
                ib_api_status_t                                 status;\r
 \r
-        cl_memclr(&attr_ioctl, sizeof (attr_ioctl));\r
                pnp_event = p_misc_cb_info->ioctl_rec.pnp_cb_ioctl_rec.pnp_event;\r
                ca_guid = p_misc_cb_info->ioctl_rec.pnp_cb_ioctl_rec.pnp_info.ca.ca_guid;\r
 \r
@@ -1024,36 +836,6 @@ __process_misc_cb(
                        if ( p_old_ca_attr )\r
                                cl_free( p_old_ca_attr );\r
 \r
-                       /*\r
-                        * We need to fetch the cached CA attributes from the proxy.  We\r
-                        * always send down the IOCTL to free the cached attributes.\r
-                        */\r
-                       //p_ca_attr = (ib_ca_attr_t*)cl_zalloc(\r
-                       //      p_misc_cb_info->ioctl_rec.pnp_cb_ioctl_rec.pnp_info.ca.size );\r
-                       attr_ioctl.in.p_ca_attr = NULL; //TODO - Remove, cause we already did cl_memclr\r
-\r
-                       /* Get the cached attributes from the kernel. */\r
-                       attr_ioctl.in.h_ca_attr =\r
-                               p_misc_cb_info->ioctl_rec.pnp_cb_ioctl_rec.pnp_info.ca.h_ca_attr;\r
-                       cl_status = do_al_dev_ioctl( UAL_GET_CA_ATTR_INFO,\r
-                               &attr_ioctl, sizeof(attr_ioctl.in),\r
-                               &attr_ioctl, sizeof(attr_ioctl.out),\r
-                               &bytes_ret );\r
-\r
-                       ///* Notify PnP manager of the changes if we have them. */\r
-                       //if( p_ca_attr )\r
-                       //{\r
-                       //      if( cl_status == CL_SUCCESS &&\r
-                       //              attr_ioctl.out.status == IB_SUCCESS )\r
-                       //      {\r
-                       //              pnp_ca_change( p_ci_ca, p_ca_attr );\r
-                       //      }\r
-                       //      else\r
-                       //      {\r
-                       //      }\r
-\r
-                       //      cl_free( p_ca_attr );\r
-                       //}\r
                        /* Dereference the CA now. */\r
                        deref_al_obj( &p_ci_ca->obj );\r
                        break;\r
@@ -1061,22 +843,6 @@ __process_misc_cb(
 \r
                break;  /* For PNP_EVENT_REC */\r
        }\r
-       case SUB_REC:\r
-       {\r
-               /******* TBD *******/\r
-               /* No adjustment needed */\r
-               break;\r
-       }\r
-       case REPORT_REC:\r
-       {\r
-               ib_report_rec_t                 report_rec;\r
-               cl_memcpy((void *)&report_rec,\r
-                                       (void*)&p_misc_cb_info->ioctl_rec.report_cb_ioctl_rec,\r
-                                       sizeof(ib_report_rec_t));\r
-               report_rec.p_notice = &p_misc_cb_info->ioctl_rec.report_cb_ioctl_rec.notice;\r
-               /******* Call the cb function for app callback *****/\r
-               break;\r
-       }\r
        default:\r
                CL_ASSERT (0);\r
                break;\r
index dd81867..e1b3704 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -52,11 +53,6 @@ typedef struct _ual_mgr
        /* Completion port handle that cb threads use to get I/O completions. */\r
        HANDLE                                          h_cb_port;\r
 \r
-       /* File to handle CM related notifications */\r
-       //HANDLE                                                h_cm_file;\r
-       //cm_cb_ioctl_info_t                    cm_cb_info;\r
-       //OVERLAPPED                                    cm_ov;\r
-\r
        /* Thread to handle work request completions */\r
        HANDLE                                          h_cq_file;\r
        comp_cb_ioctl_info_t            comp_cb_info;\r