initial implementation
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 19 May 2005 18:56:23 +0000 (18:56 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 19 May 2005 18:56:23 +0000 (18:56 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

985 files changed:
core/al/al.c [new file with mode: 0644]
core/al/al.h [new file with mode: 0644]
core/al/al_av.c [new file with mode: 0644]
core/al/al_av.h [new file with mode: 0644]
core/al/al_ca.c [new file with mode: 0644]
core/al/al_ca.h [new file with mode: 0644]
core/al/al_ci_ca.h [new file with mode: 0644]
core/al/al_ci_ca_shared.c [new file with mode: 0644]
core/al/al_cm.h [new file with mode: 0644]
core/al/al_cm_conn.h [new file with mode: 0644]
core/al/al_cm_shared.c [new file with mode: 0644]
core/al/al_cm_shared.h [new file with mode: 0644]
core/al/al_cm_sidr.h [new file with mode: 0644]
core/al/al_common.c [new file with mode: 0644]
core/al/al_common.h [new file with mode: 0644]
core/al/al_cq.c [new file with mode: 0644]
core/al/al_cq.h [new file with mode: 0644]
core/al/al_debug.h [new file with mode: 0644]
core/al/al_dev.h [new file with mode: 0644]
core/al/al_dm.c [new file with mode: 0644]
core/al/al_dm.h [new file with mode: 0644]
core/al/al_init.c [new file with mode: 0644]
core/al/al_init.h [new file with mode: 0644]
core/al/al_ioc_pnp.h [new file with mode: 0644]
core/al/al_mad.c [new file with mode: 0644]
core/al/al_mad.h [new file with mode: 0644]
core/al/al_mad_pool.h [new file with mode: 0644]
core/al/al_mcast.c [new file with mode: 0644]
core/al/al_mcast.h [new file with mode: 0644]
core/al/al_mgr.h [new file with mode: 0644]
core/al/al_mgr_shared.c [new file with mode: 0644]
core/al/al_mr.h [new file with mode: 0644]
core/al/al_mr_shared.c [new file with mode: 0644]
core/al/al_mw.c [new file with mode: 0644]
core/al/al_mw.h [new file with mode: 0644]
core/al/al_pd.c [new file with mode: 0644]
core/al/al_pd.h [new file with mode: 0644]
core/al/al_pnp.h [new file with mode: 0644]
core/al/al_proxy.h [new file with mode: 0644]
core/al/al_proxy_ioctl.h [new file with mode: 0644]
core/al/al_qp.c [new file with mode: 0644]
core/al/al_qp.h [new file with mode: 0644]
core/al/al_query.c [new file with mode: 0644]
core/al/al_query.h [new file with mode: 0644]
core/al/al_reg_svc.c [new file with mode: 0644]
core/al/al_reg_svc.h [new file with mode: 0644]
core/al/al_res_mgr.c [new file with mode: 0644]
core/al/al_res_mgr.h [new file with mode: 0644]
core/al/al_sub.c [new file with mode: 0644]
core/al/al_sub.h [new file with mode: 0644]
core/al/al_verbs.h [new file with mode: 0644]
core/al/dirs [new file with mode: 0644]
core/al/ib_common.c [new file with mode: 0644]
core/al/ib_common.h [new file with mode: 0644]
core/al/ib_statustext.c [new file with mode: 0644]
core/al/kernel/SOURCES [new file with mode: 0644]
core/al/kernel/al_ca_pnp.c [new file with mode: 0644]
core/al/kernel/al_ca_pnp.h [new file with mode: 0644]
core/al/kernel/al_ci_ca.c [new file with mode: 0644]
core/al/kernel/al_cm.c [new file with mode: 0644]
core/al/kernel/al_cm_conn.c [new file with mode: 0644]
core/al/kernel/al_cm_sidr.c [new file with mode: 0644]
core/al/kernel/al_dev.c [new file with mode: 0644]
core/al/kernel/al_driver.c [new file with mode: 0644]
core/al/kernel/al_driver.h [new file with mode: 0644]
core/al/kernel/al_exports.def [new file with mode: 0644]
core/al/kernel/al_ioc_pnp.c [new file with mode: 0644]
core/al/kernel/al_mad_pool.c [new file with mode: 0644]
core/al/kernel/al_mgr.c [new file with mode: 0644]
core/al/kernel/al_mr.c [new file with mode: 0644]
core/al/kernel/al_pnp.c [new file with mode: 0644]
core/al/kernel/al_proxy.c [new file with mode: 0644]
core/al/kernel/al_proxy_cm.c [new file with mode: 0644]
core/al/kernel/al_proxy_ioc.c [new file with mode: 0644]
core/al/kernel/al_proxy_subnet.c [new file with mode: 0644]
core/al/kernel/al_proxy_verbs.c [new file with mode: 0644]
core/al/kernel/al_sa_req.c [new file with mode: 0644]
core/al/kernel/al_smi.c [new file with mode: 0644]
core/al/kernel/al_smi.h [new file with mode: 0644]
core/al/kernel/ibal.rc [new file with mode: 0644]
core/al/kernel/makefile [new file with mode: 0644]
core/al/user/SOURCES [new file with mode: 0644]
core/al/user/al_dll.c [new file with mode: 0644]
core/al/user/al_exports.src [new file with mode: 0644]
core/al/user/al_mad_pool.c [new file with mode: 0644]
core/al/user/ibal.rc [new file with mode: 0644]
core/al/user/makefile [new file with mode: 0644]
core/al/user/ual_av.c [new file with mode: 0644]
core/al/user/ual_ca.c [new file with mode: 0644]
core/al/user/ual_ca.h [new file with mode: 0644]
core/al/user/ual_ci_ca.c [new file with mode: 0644]
core/al/user/ual_ci_ca.h [new file with mode: 0644]
core/al/user/ual_cm.c [new file with mode: 0644]
core/al/user/ual_cm.h [new file with mode: 0644]
core/al/user/ual_cq.c [new file with mode: 0644]
core/al/user/ual_dm.c [new file with mode: 0644]
core/al/user/ual_dm.h [new file with mode: 0644]
core/al/user/ual_mad.c [new file with mode: 0644]
core/al/user/ual_mad.h [new file with mode: 0644]
core/al/user/ual_mad_pool.c [new file with mode: 0644]
core/al/user/ual_mcast.c [new file with mode: 0644]
core/al/user/ual_mcast.h [new file with mode: 0644]
core/al/user/ual_mgr.c [new file with mode: 0644]
core/al/user/ual_mgr.h [new file with mode: 0644]
core/al/user/ual_mr.c [new file with mode: 0644]
core/al/user/ual_mr.h [new file with mode: 0644]
core/al/user/ual_mw.c [new file with mode: 0644]
core/al/user/ual_mw.h [new file with mode: 0644]
core/al/user/ual_pd.c [new file with mode: 0644]
core/al/user/ual_pnp.c [new file with mode: 0644]
core/al/user/ual_qp.c [new file with mode: 0644]
core/al/user/ual_qp.h [new file with mode: 0644]
core/al/user/ual_query.c [new file with mode: 0644]
core/al/user/ual_query.h [new file with mode: 0644]
core/al/user/ual_reg_svc.c [new file with mode: 0644]
core/al/user/ual_res_mgr.h [new file with mode: 0644]
core/al/user/ual_sa_req.c [new file with mode: 0644]
core/al/user/ual_sub.c [new file with mode: 0644]
core/al/user/ual_support.h [new file with mode: 0644]
core/bus/dirs [new file with mode: 0644]
core/bus/kernel/SOURCES [new file with mode: 0644]
core/bus/kernel/bus_driver.c [new file with mode: 0644]
core/bus/kernel/bus_driver.h [new file with mode: 0644]
core/bus/kernel/bus_iou_mgr.c [new file with mode: 0644]
core/bus/kernel/bus_iou_mgr.h [new file with mode: 0644]
core/bus/kernel/bus_pnp.c [new file with mode: 0644]
core/bus/kernel/bus_pnp.h [new file with mode: 0644]
core/bus/kernel/bus_port_mgr.c [new file with mode: 0644]
core/bus/kernel/bus_port_mgr.h [new file with mode: 0644]
core/bus/kernel/ib_bus.inf [new file with mode: 0644]
core/bus/kernel/ibbus.rc [new file with mode: 0644]
core/bus/kernel/makefile [new file with mode: 0644]
core/complib/cl_async_proc.c [new file with mode: 0644]
core/complib/cl_list.c [new file with mode: 0644]
core/complib/cl_map.c [new file with mode: 0644]
core/complib/cl_memory.c [new file with mode: 0644]
core/complib/cl_memtrack.h [new file with mode: 0644]
core/complib/cl_obj.c [new file with mode: 0644]
core/complib/cl_perf.c [new file with mode: 0644]
core/complib/cl_pool.c [new file with mode: 0644]
core/complib/cl_ptr_vector.c [new file with mode: 0644]
core/complib/cl_reqmgr.c [new file with mode: 0644]
core/complib/cl_statustext.c [new file with mode: 0644]
core/complib/cl_threadpool.c [new file with mode: 0644]
core/complib/cl_vector.c [new file with mode: 0644]
core/complib/dirs [new file with mode: 0644]
core/complib/kernel/SOURCES [new file with mode: 0644]
core/complib/kernel/cl_bus_ifc.c [new file with mode: 0644]
core/complib/kernel/cl_driver.c [new file with mode: 0644]
core/complib/kernel/cl_event.c [new file with mode: 0644]
core/complib/kernel/cl_exports.def [new file with mode: 0644]
core/complib/kernel/cl_log.c [new file with mode: 0644]
core/complib/kernel/cl_memory_osd.c [new file with mode: 0644]
core/complib/kernel/cl_pnp_po.c [new file with mode: 0644]
core/complib/kernel/cl_syscallback.c [new file with mode: 0644]
core/complib/kernel/cl_thread.c [new file with mode: 0644]
core/complib/kernel/cl_timer.c [new file with mode: 0644]
core/complib/kernel/complib.rc [new file with mode: 0644]
core/complib/kernel/makefile [new file with mode: 0644]
core/complib/user/SOURCES [new file with mode: 0644]
core/complib/user/cl_debug.c [new file with mode: 0644]
core/complib/user/cl_dll.c [new file with mode: 0644]
core/complib/user/cl_event.c [new file with mode: 0644]
core/complib/user/cl_log.c [new file with mode: 0644]
core/complib/user/cl_memory_osd.c [new file with mode: 0644]
core/complib/user/cl_syscallback.c [new file with mode: 0644]
core/complib/user/cl_thread.c [new file with mode: 0644]
core/complib/user/cl_timer.c [new file with mode: 0644]
core/complib/user/complib.rc [new file with mode: 0644]
core/complib/user/complib.src [new file with mode: 0644]
core/complib/user/makefile [new file with mode: 0644]
core/dirs [new file with mode: 0644]
core/iou/dirs [new file with mode: 0644]
core/iou/kernel/SOURCES [new file with mode: 0644]
core/iou/kernel/ibiou.rc [new file with mode: 0644]
core/iou/kernel/iou_driver.c [new file with mode: 0644]
core/iou/kernel/iou_driver.h [new file with mode: 0644]
core/iou/kernel/iou_ioc_mgr.c [new file with mode: 0644]
core/iou/kernel/iou_ioc_mgr.h [new file with mode: 0644]
core/iou/kernel/iou_pnp.c [new file with mode: 0644]
core/iou/kernel/iou_pnp.h [new file with mode: 0644]
core/iou/kernel/makefile [new file with mode: 0644]
dirs [new file with mode: 0644]
hw/dirs [new file with mode: 0644]
hw/mt23108/dirs [new file with mode: 0644]
hw/mt23108/kernel/Makefile [new file with mode: 0644]
hw/mt23108/kernel/SOURCES [new file with mode: 0644]
hw/mt23108/kernel/hca.rc [new file with mode: 0644]
hw/mt23108/kernel/hca_data.c [new file with mode: 0644]
hw/mt23108/kernel/hca_data.h [new file with mode: 0644]
hw/mt23108/kernel/hca_debug.h [new file with mode: 0644]
hw/mt23108/kernel/hca_direct.c [new file with mode: 0644]
hw/mt23108/kernel/hca_driver.c [new file with mode: 0644]
hw/mt23108/kernel/hca_driver.h [new file with mode: 0644]
hw/mt23108/kernel/hca_mcast.c [new file with mode: 0644]
hw/mt23108/kernel/hca_memory.c [new file with mode: 0644]
hw/mt23108/kernel/hca_smp.c [new file with mode: 0644]
hw/mt23108/kernel/hca_verbs.c [new file with mode: 0644]
hw/mt23108/kernel/infinihost.inf [new file with mode: 0644]
hw/mt23108/user/Makefile [new file with mode: 0644]
hw/mt23108/user/SOURCES [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_av.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_ca.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_cq.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_eec.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_errh.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_main.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_main.h [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_mcast.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_mrw.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_osbypass.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_pd.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_qp.c [new file with mode: 0644]
hw/mt23108/user/mlnx_ual_rdd.c [new file with mode: 0644]
hw/mt23108/user/uvpd.rc [new file with mode: 0644]
hw/mt23108/user/uvpd_exports.src [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hh.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hh.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hh_common.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hh_common.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hh_init.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hh_rx_stub.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hh_stub_defines.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hh_tx_stub.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hh_tx_stub_defines.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hhenosys.ic [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hhul.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hhul.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hhul_obj.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hhul_stub.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/hhulenosys.ic [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/invalid.ic [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/rx_stub.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/cmdif/cmd_types.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/cmdif/cmdif.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/cmdif/cmdif.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/cmdif/cmdif_priv.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/cmdif/cmds_wrap.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/ddrmm/tddrmm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/ddrmm/tddrmm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/eventp/event_irqh.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/eventp/eventp.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/eventp/eventp.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/eventp/eventp_priv.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/mcgm/mcgm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/mcgm/mcgm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/mrwm/tmrwm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/mrwm/tmrwm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/os_dep/win/thh_kl.def [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/os_dep/win/thh_mod_obj.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/os_dep/win/thh_mod_obj.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/os_dep/win/thhul_kl.def [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/os_dep/win/thhul_mod_obj.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_common.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_cqm/tcqm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_cqm/tcqm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_default_profile.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_hob/thh_hob_priv.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_init.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_init.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_qpm/tqpm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_qpm/tqpm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_requested_profile.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_srqm/thh_srqm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thh_srqm/thh_srqm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_cqm/thhul_cqm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_cqm/thhul_cqm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_hob/thhul_hob.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_hob/thhul_hob.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_mwm/thhul_mwm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_mwm/thhul_mwm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_pdm/thhul_pdm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_pdm/thhul_pdm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_pdm/thhul_pdm_priv.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_qpm/thhul_qpm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_qpm/thhul_qpm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_qpm/thhul_qpm_ibal.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_srqm/thhul_srqm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/thhul_srqm/thhul_srqm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/uar/uar.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/uar/uar.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/udavm/udavm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/udavm/udavm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/udavm/udavm_test.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/uldm/thh_uldm.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/uldm/thh_uldm.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/uldm/thh_uldm_priv.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/util/epool.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/util/epool.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/util/extbuddy.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/util/extbuddy.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/util/sm_mad.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/util/sm_mad.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/util/tlog2.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/tavor/util/tlog2.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/hcahal/zombie.ic [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/allocator.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/os_dep/win/vapi_common.def [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/os_dep/win/vapi_common_kl.def [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/os_dep/win/vapi_mod_obj.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/os_dep/win/vip_imp.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vapi_common.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vapi_common.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_array.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_array.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_cirq.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_cirq.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_common.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_delay_unlock.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_delay_unlock.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_delay_unlock_priv.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_hash.c [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_hash.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_hash.ic [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_hash.ih [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_hash64p.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_hashp.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_hashp2p.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/common/vip_hashv4p.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/evapi.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/vapi.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/vapi_features.h [new file with mode: 0644]
hw/mt23108/vapi/Hca/verbs/vapi_types.h [new file with mode: 0644]
hw/mt23108/vapi/dirs [new file with mode: 0644]
hw/mt23108/vapi/kernel/Makefile [new file with mode: 0644]
hw/mt23108/vapi/kernel/SOURCES [new file with mode: 0644]
hw/mt23108/vapi/kernel/hh_kl_sources.c [new file with mode: 0644]
hw/mt23108/vapi/kernel/mdmsg.h [new file with mode: 0644]
hw/mt23108/vapi/kernel/mosal_kl_sources.c [new file with mode: 0644]
hw/mt23108/vapi/kernel/mpga_kl_sources.c [new file with mode: 0644]
hw/mt23108/vapi/kernel/mt23108.def [new file with mode: 0644]
hw/mt23108/vapi/kernel/mt23108.rc [new file with mode: 0644]
hw/mt23108/vapi/kernel/mtl_common_kl_sources.c [new file with mode: 0644]
hw/mt23108/vapi/kernel/tdriver_sources.c [new file with mode: 0644]
hw/mt23108/vapi/kernel/thh_kl_sources.c [new file with mode: 0644]
hw/mt23108/vapi/kernel/thhul_kl_sources.c [new file with mode: 0644]
hw/mt23108/vapi/kernel/vapi_common_kl_sources.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_gen.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_gen_nos.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_i2c.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_iobuf.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_k2u_cbk.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_k2u_cbk_priv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_mem.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_mlock.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_prot_ctx.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_que.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_sync.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_thread.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosal_timer.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/mosalu_socket.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal.def [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_arch.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_bus.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_bus.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_driver.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_gen.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_gen_priv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_iobuf.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_iobuf_imp.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_k2u_cbk.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_kl.def [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_mem.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_mem_imp.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_mem_priv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_mlock.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_mlock_priv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_ntddk.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_ntddk.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_priv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_prot_ctx_imp.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_que.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_que_priv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_sync.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_sync_imp.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_sync_priv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_thread.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_thread_imp.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_timer.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_timer_imp.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_timer_priv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_types.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_util.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosal_util.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosalu_driver.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosalu_k2u_cbk.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosalu_k2u_cbk.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosalu_mem.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosalu_socket.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosalu_socket_imp.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosalu_sync.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mosal/os_dep/win/mosalu_thread.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/MPGA_headers.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/ib_opcodes.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/internal_functions.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/internal_functions.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/mpga.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/mpga.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/mpga_sv.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/mpga_sv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/nMPGA.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/nMPGA.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/nMPGA_packet_append.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/nMPGA_packet_append.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/os_dep/win/mpga.def [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/os_dep/win/mpga_driver.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/os_dep/win/mpga_kl.def [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/packet_append.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/packet_append.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/packet_utilities.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/packet_utilities.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mpga/ud_pack_fmt.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_common/mtl_common.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_common/mtl_common.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_common/mtl_log.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_common/os_dep/win/mtl_common.def [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_common/os_dep/win/mtl_common_kl.def [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_common/os_dep/win/mtl_log_win.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/bit_ops.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/ib_defs.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/mtl_errno.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/mtl_pci_types.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/mtl_types.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/win/MdIoctl.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/win/MdIoctlSpec.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/win/endian.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/win/mtl_sys_defs.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/win/mtl_sys_types.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/win/unistd.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/mtl_types/win/win/mtl_arch_types.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/Md.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/Md.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/Md.rc [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdCard.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdConf.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdConf.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdConfPriv.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdCtl.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdCtl.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdDbg.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdDbg.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdGen.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdGuid.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdIoctl.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdPci.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdPci.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdPnp.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdPwr.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdRdWr.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdUtil.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MdUtil.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/MddLib.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/infinihost.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/mdmsg/MdMsg.c [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/mdmsg/MdMsg.mc [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/resource.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/tavor_csp.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/os_dep/win/tdriver/version.h [new file with mode: 0644]
hw/mt23108/vapi/mlxsys/tools/mtperf.h [new file with mode: 0644]
hw/mt23108/vapi/tavor_arch_db/MT23108.h [new file with mode: 0644]
hw/mt23108/vapi/tavor_arch_db/MT23108_PRM.h [new file with mode: 0644]
hw/mt23108/vapi/tavor_arch_db/MT23108_PRM_append.h [new file with mode: 0644]
hw/mt23108/vapi/tavor_arch_db/cr_types.h [new file with mode: 0644]
hw/mt23108/vapi/tavor_arch_db/tavor_dev_defs.h [new file with mode: 0644]
hw/mt23108/vapi/tavor_arch_db/tavor_if_defs.h [new file with mode: 0644]
hw/mt23108/vapi/user/Makefile [new file with mode: 0644]
hw/mt23108/vapi/user/SOURCES [new file with mode: 0644]
hw/mt23108/vapi/user/UMT23108.rc [new file with mode: 0644]
hw/mt23108/vapi/user/hca_data.h [new file with mode: 0644]
hw/mt23108/vapi/user/hh_ul_sources.c [new file with mode: 0644]
hw/mt23108/vapi/user/mosal_ul_sources.c [new file with mode: 0644]
hw/mt23108/vapi/user/mpga_ul_sources.c [new file with mode: 0644]
hw/mt23108/vapi/user/mtl_common_ul_sources.c [new file with mode: 0644]
hw/mt23108/vapi/user/thhul_ul_sources.c [new file with mode: 0644]
hw/mt23108/vapi/user/vapi_common_ul_sources.c [new file with mode: 0644]
inc/complib/cl_async_proc.h [new file with mode: 0644]
inc/complib/cl_atomic.h [new file with mode: 0644]
inc/complib/cl_byteswap.h [new file with mode: 0644]
inc/complib/cl_comppool.h [new file with mode: 0644]
inc/complib/cl_debug.h [new file with mode: 0644]
inc/complib/cl_event.h [new file with mode: 0644]
inc/complib/cl_fleximap.h [new file with mode: 0644]
inc/complib/cl_ioctl.h [new file with mode: 0644]
inc/complib/cl_irqlock.h [new file with mode: 0644]
inc/complib/cl_list.h [new file with mode: 0644]
inc/complib/cl_log.h [new file with mode: 0644]
inc/complib/cl_map.h [new file with mode: 0644]
inc/complib/cl_math.h [new file with mode: 0644]
inc/complib/cl_memory.h [new file with mode: 0644]
inc/complib/cl_mutex.h [new file with mode: 0644]
inc/complib/cl_obj.h [new file with mode: 0644]
inc/complib/cl_passivelock.h [new file with mode: 0644]
inc/complib/cl_perf.h [new file with mode: 0644]
inc/complib/cl_pool.h [new file with mode: 0644]
inc/complib/cl_ptr_vector.h [new file with mode: 0644]
inc/complib/cl_qcomppool.h [new file with mode: 0644]
inc/complib/cl_qlist.h [new file with mode: 0644]
inc/complib/cl_qlockpool.h [new file with mode: 0644]
inc/complib/cl_qmap.h [new file with mode: 0644]
inc/complib/cl_qpool.h [new file with mode: 0644]
inc/complib/cl_reqmgr.h [new file with mode: 0644]
inc/complib/cl_spinlock.h [new file with mode: 0644]
inc/complib/cl_syscallback.h [new file with mode: 0644]
inc/complib/cl_thread.h [new file with mode: 0644]
inc/complib/cl_threadpool.h [new file with mode: 0644]
inc/complib/cl_timer.h [new file with mode: 0644]
inc/complib/cl_types.h [new file with mode: 0644]
inc/complib/cl_vector.h [new file with mode: 0644]
inc/complib/cl_waitobj.h [new file with mode: 0644]
inc/complib/comp_lib.h [new file with mode: 0644]
inc/iba/ib_al.h [new file with mode: 0644]
inc/iba/ib_al_ioctl.h [new file with mode: 0644]
inc/iba/ib_ci.h [new file with mode: 0644]
inc/iba/ib_types.h [new file with mode: 0644]
inc/ics_ver.h [new file with mode: 0644]
inc/kernel/complib/cl_atomic_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_bus_ifc.h [new file with mode: 0644]
inc/kernel/complib/cl_byteswap_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_debug_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_event_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_ioctl_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_irqlock_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_memory_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_mutex_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_packoff.h [new file with mode: 0644]
inc/kernel/complib/cl_packon.h [new file with mode: 0644]
inc/kernel/complib/cl_pnp_po.h [new file with mode: 0644]
inc/kernel/complib/cl_spinlock_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_syscallback_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_thread_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_timer_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_types_osd.h [new file with mode: 0644]
inc/kernel/complib/cl_waitobj_osd.h [new file with mode: 0644]
inc/kernel/iba/ib_al_ifc.h [new file with mode: 0644]
inc/kernel/iba/ib_ci_ifc.h [new file with mode: 0644]
inc/kernel/iba/ioc_ifc.h [new file with mode: 0644]
inc/kernel/iba/iou_ifc.h [new file with mode: 0644]
inc/kernel/iba/ipoib_ifc.h [new file with mode: 0644]
inc/user/complib/cl_atomic_osd.h [new file with mode: 0644]
inc/user/complib/cl_byteswap_osd.h [new file with mode: 0644]
inc/user/complib/cl_debug_osd.h [new file with mode: 0644]
inc/user/complib/cl_event_osd.h [new file with mode: 0644]
inc/user/complib/cl_ioctl_osd.h [new file with mode: 0644]
inc/user/complib/cl_memory_osd.h [new file with mode: 0644]
inc/user/complib/cl_mutex_osd.h [new file with mode: 0644]
inc/user/complib/cl_packoff.h [new file with mode: 0644]
inc/user/complib/cl_packon.h [new file with mode: 0644]
inc/user/complib/cl_spinlock_osd.h [new file with mode: 0644]
inc/user/complib/cl_syscallback_osd.h [new file with mode: 0644]
inc/user/complib/cl_thread_osd.h [new file with mode: 0644]
inc/user/complib/cl_timer_osd.h [new file with mode: 0644]
inc/user/complib/cl_types_osd.h [new file with mode: 0644]
inc/user/complib/cl_waitobj_osd.h [new file with mode: 0644]
inc/user/iba/ib_uvp.h [new file with mode: 0644]
tests/alts/allocdeallocpd.c [new file with mode: 0644]
tests/alts/alts_common.h [new file with mode: 0644]
tests/alts/alts_debug.h [new file with mode: 0644]
tests/alts/alts_misc.c [new file with mode: 0644]
tests/alts/alts_readme.txt [new file with mode: 0644]
tests/alts/cmtests.c [new file with mode: 0644]
tests/alts/createanddestroycq.c [new file with mode: 0644]
tests/alts/createdestroyav.c [new file with mode: 0644]
tests/alts/creatememwindow.c [new file with mode: 0644]
tests/alts/dirs [new file with mode: 0644]
tests/alts/ibquery.c [new file with mode: 0644]
tests/alts/kernel/SOURCES [new file with mode: 0644]
tests/alts/kernel/alts.inf [new file with mode: 0644]
tests/alts/kernel/alts.rc [new file with mode: 0644]
tests/alts/kernel/alts_driver.c [new file with mode: 0644]
tests/alts/kernel/alts_driver.h [new file with mode: 0644]
tests/alts/kernel/makefile [new file with mode: 0644]
tests/alts/madtests.c [new file with mode: 0644]
tests/alts/multisendrecv.c [new file with mode: 0644]
tests/alts/openclose.c [new file with mode: 0644]
tests/alts/querycaattr.c [new file with mode: 0644]
tests/alts/registermemregion.c [new file with mode: 0644]
tests/alts/registerpnp.c [new file with mode: 0644]
tests/alts/smatests.c [new file with mode: 0644]
tests/alts/user/SOURCES [new file with mode: 0644]
tests/alts/user/alts_main.c [new file with mode: 0644]
tests/alts/user/alts_sources.c [new file with mode: 0644]
tests/alts/user/makefile [new file with mode: 0644]
tests/cmtest/dirs [new file with mode: 0644]
tests/cmtest/user/SOURCES [new file with mode: 0644]
tests/cmtest/user/main.c [new file with mode: 0644]
tests/cmtest/user/makefile [new file with mode: 0644]
tests/dirs [new file with mode: 0644]
tests/wsd/dirs [new file with mode: 0644]
tests/wsd/user/contest/contest.c [new file with mode: 0644]
tests/wsd/user/contest/contest.h [new file with mode: 0644]
tests/wsd/user/dirs [new file with mode: 0644]
tests/wsd/user/test1/test1.c [new file with mode: 0644]
tests/wsd/user/test2/ibwrap.c [new file with mode: 0644]
tests/wsd/user/test2/ibwrap.h [new file with mode: 0644]
tests/wsd/user/test2/test2.c [new file with mode: 0644]
tests/wsd/user/test3/ibwrap.c [new file with mode: 0644]
tests/wsd/user/test3/ibwrap.h [new file with mode: 0644]
tests/wsd/user/test3/test3.c [new file with mode: 0644]
tests/wsd/user/ttcp/SOURCES [new file with mode: 0644]
tests/wsd/user/ttcp/makefile [new file with mode: 0644]
tests/wsd/user/ttcp/ttcp.c [new file with mode: 0644]
tools/coinstaller/dirs [new file with mode: 0644]
tools/coinstaller/user/IBInstaller.rc [new file with mode: 0644]
tools/coinstaller/user/IbInstaller.cpp [new file with mode: 0644]
tools/coinstaller/user/IbInstaller.def [new file with mode: 0644]
tools/coinstaller/user/SOURCES [new file with mode: 0644]
tools/coinstaller/user/makefile [new file with mode: 0644]
tools/coinstaller/user/resource.h [new file with mode: 0644]
tools/coinstaller/user/stdafx.cpp [new file with mode: 0644]
tools/coinstaller/user/stdafx.h [new file with mode: 0644]
tools/dirs [new file with mode: 0644]
tools/fwupdate/dirs [new file with mode: 0644]
tools/fwupdate/user/SOURCES [new file with mode: 0644]
tools/fwupdate/user/flint-tools.cpp [new file with mode: 0644]
tools/fwupdate/user/flint-tools.h [new file with mode: 0644]
tools/fwupdate/user/flint.cpp [new file with mode: 0644]
tools/fwupdate/user/makefile [new file with mode: 0644]
tools/fwupdate/user/mtcr.h [new file with mode: 0644]
tools/wsdinstall/dirs [new file with mode: 0644]
tools/wsdinstall/user/InstallSP.sln [new file with mode: 0644]
tools/wsdinstall/user/SOURCES [new file with mode: 0644]
tools/wsdinstall/user/installsp.c [new file with mode: 0644]
tools/wsdinstall/user/makefile [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_adapter_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cno_create.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cno_free.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cno_modify_agent.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cno_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cno_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cno_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cno_wait.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cookie.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cookie.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cr_accept.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cr_callback.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cr_handoff.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cr_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cr_reject.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cr_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_cr_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_debug.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_connect.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_create.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_disconnect.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_dup_connect.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_free.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_get_status.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_modify.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_post_rdma_read.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_post_rdma_write.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_post_recv.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_post_send.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_reset.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ep_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_clear_unwaitable.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_connection_callb.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_cq_async_error_callb.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_create.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_dequeue.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_disable.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_dto_callb.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_enable.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_free.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_modify_cno.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_post_se.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_qp_async_error_callb.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_resize.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_set_unwaitable.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_un_async_error_callb.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_evd_wait.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_get_consumer_context.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_get_handle_type.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_hash.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_hash.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_hca_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_hca_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ia_close.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ia_open.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ia_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ia_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ia_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_init.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_llist.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_lmr_create.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_lmr_free.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_lmr_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_lmr_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_lmr_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_mr_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_mr_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_provider.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_provider.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_psp_create.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_psp_create_any.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_psp_free.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_psp_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_pz_create.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_pz_free.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_pz_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_pz_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_pz_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ring_buffer_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_ring_buffer_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_rmr_bind.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_rmr_create.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_rmr_free.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_rmr_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_rmr_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_rmr_util.h [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_rsp_create.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_rsp_free.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_rsp_query.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_set_consumer_context.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_sp_util.c [new file with mode: 0644]
ulp/dapl/dapl/common/dapl_sp_util.h [new file with mode: 0644]
ulp/dapl/dapl/dirs [new file with mode: 0644]
ulp/dapl/dapl/ibal/dapl_ibal_cm.c [new file with mode: 0644]
ulp/dapl/dapl/ibal/dapl_ibal_dto.h [new file with mode: 0644]
ulp/dapl/dapl/ibal/dapl_ibal_kmod.h [new file with mode: 0644]
ulp/dapl/dapl/ibal/dapl_ibal_mrdb.c [new file with mode: 0644]
ulp/dapl/dapl/ibal/dapl_ibal_mrdb.h [new file with mode: 0644]
ulp/dapl/dapl/ibal/dapl_ibal_qp.c [new file with mode: 0644]
ulp/dapl/dapl/ibal/dapl_ibal_util.c [new file with mode: 0644]
ulp/dapl/dapl/ibal/dapl_ibal_util.h [new file with mode: 0644]
ulp/dapl/dapl/include/dapl.h [new file with mode: 0644]
ulp/dapl/dapl/include/dapl_debug.h [new file with mode: 0644]
ulp/dapl/dapl/include/dapl_ipoib_names.h [new file with mode: 0644]
ulp/dapl/dapl/include/dapl_vendor.h [new file with mode: 0644]
ulp/dapl/dapl/udapl/Makefile.cygwin [new file with mode: 0644]
ulp/dapl/dapl/udapl/Makefile.org [new file with mode: 0644]
ulp/dapl/dapl/udapl/Makefile.orig [new file with mode: 0644]
ulp/dapl/dapl/udapl/SOURCES [new file with mode: 0644]
ulp/dapl/dapl/udapl/dapl_init.c [new file with mode: 0644]
ulp/dapl/dapl/udapl/dapl_name_service.c [new file with mode: 0644]
ulp/dapl/dapl/udapl/dapl_name_service.h [new file with mode: 0644]
ulp/dapl/dapl/udapl/dapl_timer_util.c [new file with mode: 0644]
ulp/dapl/dapl/udapl/dapl_timer_util.h [new file with mode: 0644]
ulp/dapl/dapl/udapl/linux/dapl_osd.c [new file with mode: 0644]
ulp/dapl/dapl/udapl/linux/dapl_osd.h [new file with mode: 0644]
ulp/dapl/dapl/udapl/makefile [new file with mode: 0644]
ulp/dapl/dapl/udapl/makefile.wnd [new file with mode: 0644]
ulp/dapl/dapl/udapl/udapl_exports.src [new file with mode: 0644]
ulp/dapl/dapl/udapl/udapl_sources.c [new file with mode: 0644]
ulp/dapl/dapl/udapl/windows/dapl_osd.c [new file with mode: 0644]
ulp/dapl/dapl/udapl/windows/dapl_osd.h [new file with mode: 0644]
ulp/dapl/dapl/udapl/windows/dapl_win.def [new file with mode: 0644]
ulp/dapl/dapl/udapl/windows/dapllib.rc [new file with mode: 0644]
ulp/dapl/dat/common/dat_dictionary.c [new file with mode: 0644]
ulp/dapl/dat/common/dat_dictionary.h [new file with mode: 0644]
ulp/dapl/dat/common/dat_dr.c [new file with mode: 0644]
ulp/dapl/dat/common/dat_dr.h [new file with mode: 0644]
ulp/dapl/dat/common/dat_init.c [new file with mode: 0644]
ulp/dapl/dat/common/dat_init.h [new file with mode: 0644]
ulp/dapl/dat/common/dat_sr.c [new file with mode: 0644]
ulp/dapl/dat/common/dat_sr.h [new file with mode: 0644]
ulp/dapl/dat/common/dat_strerror.c [new file with mode: 0644]
ulp/dapl/dat/dirs [new file with mode: 0644]
ulp/dapl/dat/include/dat/dat.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/dat_error.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/dat_platform_specific.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/dat_redirection.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/dat_registry.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/dat_vendor_specific.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/kdat.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/kdat_config.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/kdat_redirection.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/kdat_vendor_specific.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/udat.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/udat_config.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/udat_redirection.h [new file with mode: 0644]
ulp/dapl/dat/include/dat/udat_vendor_specific.h [new file with mode: 0644]
ulp/dapl/dat/kdat/Makefile [new file with mode: 0644]
ulp/dapl/dat/kdat/dat_kdapl.c [new file with mode: 0644]
ulp/dapl/dat/kdat/dat_module.c [new file with mode: 0644]
ulp/dapl/dat/kdat/linux/dat_osd.c [new file with mode: 0644]
ulp/dapl/dat/kdat/linux/dat_osd.h [new file with mode: 0644]
ulp/dapl/dat/udat/Makefile.cygwin [new file with mode: 0644]
ulp/dapl/dat/udat/Makefile.org [new file with mode: 0644]
ulp/dapl/dat/udat/Makefile.orig [new file with mode: 0644]
ulp/dapl/dat/udat/SOURCES [new file with mode: 0644]
ulp/dapl/dat/udat/dat.conf [new file with mode: 0644]
ulp/dapl/dat/udat/ibhosts [new file with mode: 0644]
ulp/dapl/dat/udat/linux/dat-1.1.spec [new file with mode: 0644]
ulp/dapl/dat/udat/linux/dat_osd.c [new file with mode: 0644]
ulp/dapl/dat/udat/linux/dat_osd.h [new file with mode: 0644]
ulp/dapl/dat/udat/makefile [new file with mode: 0644]
ulp/dapl/dat/udat/makefile.wnd [new file with mode: 0644]
ulp/dapl/dat/udat/udat.c [new file with mode: 0644]
ulp/dapl/dat/udat/udat_exports.src [new file with mode: 0644]
ulp/dapl/dat/udat/udat_sources.c [new file with mode: 0644]
ulp/dapl/dat/udat/udat_sr_parser.c [new file with mode: 0644]
ulp/dapl/dat/udat/udat_sr_parser.h [new file with mode: 0644]
ulp/dapl/dat/udat/windows/dat_osd.c [new file with mode: 0644]
ulp/dapl/dat/udat/windows/dat_osd.h [new file with mode: 0644]
ulp/dapl/dat/udat/windows/dat_osd_sr.h [new file with mode: 0644]
ulp/dapl/dat/udat/windows/dat_win.def [new file with mode: 0644]
ulp/dapl/dirs [new file with mode: 0644]
ulp/dapl/doc/dapl_coding_style.txt [new file with mode: 0644]
ulp/dapl/doc/dapl_end_point_design.txt [new file with mode: 0644]
ulp/dapl/doc/dapl_environ.txt [new file with mode: 0644]
ulp/dapl/doc/dapl_event_design.txt [new file with mode: 0644]
ulp/dapl/doc/dapl_memory_management_design.txt [new file with mode: 0644]
ulp/dapl/doc/dapl_registry_design.txt [new file with mode: 0644]
ulp/dapl/doc/dapl_shared_memory_design.txt [new file with mode: 0644]
ulp/dapl/doc/dapl_vendor_specific_changes.txt [new file with mode: 0644]
ulp/dapl/doc/dat.conf [new file with mode: 0644]
ulp/dapl/doc/dat_environ.txt [new file with mode: 0644]
ulp/dapl/doc/ibhosts [new file with mode: 0644]
ulp/dapl/doc/mv_dapl_readme.txt [new file with mode: 0644]
ulp/dapl/doc/mv_dapl_relnotes.txt [new file with mode: 0644]
ulp/dapl/test/dirs [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/.DT_defaults [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/.DT_onetest [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/.DT_perf.csh [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/Makefile.cygwin [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/Makefile.org [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/Makefile.orig [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/SOURCES [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/bw.sh [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/cl.sh [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_bpool.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_bpool.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_client.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_client_info.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_client_info.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_cnxn.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_cnxn.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_common.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_endian.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_cmd.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_cmd.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_connmgt.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_dataxfer.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_dataxfer_client.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_endpoint.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_hwconn.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_mem.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_pz.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_queryinfo.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_test.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_util.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_fft_util.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_funcs.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_getopt.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_getopt.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_limit.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_limit_cmd.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_limit_cmd.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_main.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_mdep.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_mdep.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_memlist.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_memlist.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_netaddr.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_params.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_params.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_performance_client.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_performance_cmd.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_performance_cmd.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_performance_server.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_performance_stats.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_performance_stats.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_performance_test.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_performance_util.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_proto.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_quit_cmd.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_quit_cmd.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_server.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_server_cmd.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_server_cmd.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_server_info.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_server_info.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_test_data.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_test_data.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_test_util.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_thread.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_transaction_cmd.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_transaction_cmd.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_transaction_stats.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_transaction_stats.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_transaction_test.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_transaction_test.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_transaction_util.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_util.c [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapl_version.h [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/dapltest.txt [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/lat_block.sh [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/lat_poll.sh [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/lim.sh [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/makefile [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/makefile.wnd [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/quit.sh [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/regress.sh [new file with mode: 0644]
ulp/dapl/test/udapl/dapltest/srv.sh [new file with mode: 0644]
ulp/dapl/test/udapl/dirs [new file with mode: 0644]
ulp/dirs [new file with mode: 0644]
ulp/ipoib/dirs [new file with mode: 0644]
ulp/ipoib/ip_packet.h [new file with mode: 0644]
ulp/ipoib/ip_stats.h [new file with mode: 0644]
ulp/ipoib/kernel/SOURCES [new file with mode: 0644]
ulp/ipoib/kernel/ipoib.rc [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_adapter.c [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_adapter.h [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_debug.h [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_driver.c [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_driver.h [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_endpoint.c [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_endpoint.h [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_port.c [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_port.h [new file with mode: 0644]
ulp/ipoib/kernel/ipoib_xfr_mgr.h [new file with mode: 0644]
ulp/ipoib/kernel/makefile [new file with mode: 0644]
ulp/ipoib/kernel/netipoib.inf [new file with mode: 0644]
ulp/srp/dirs [new file with mode: 0644]
ulp/srp/kernel/SOURCES [new file with mode: 0644]
ulp/srp/kernel/ib_srp.inf [new file with mode: 0644]
ulp/srp/kernel/ibsrp.rc [new file with mode: 0644]
ulp/srp/kernel/makefile [new file with mode: 0644]
ulp/srp/kernel/srp.h [new file with mode: 0644]
ulp/srp/kernel/srp_aer_req.h [new file with mode: 0644]
ulp/srp/kernel/srp_aer_rsp.h [new file with mode: 0644]
ulp/srp/kernel/srp_cmd.h [new file with mode: 0644]
ulp/srp/kernel/srp_connection.c [new file with mode: 0644]
ulp/srp/kernel/srp_connection.h [new file with mode: 0644]
ulp/srp/kernel/srp_cred_req.h [new file with mode: 0644]
ulp/srp/kernel/srp_cred_rsp.h [new file with mode: 0644]
ulp/srp/kernel/srp_data.h [new file with mode: 0644]
ulp/srp/kernel/srp_data_path.c [new file with mode: 0644]
ulp/srp/kernel/srp_data_path.h [new file with mode: 0644]
ulp/srp/kernel/srp_debug.h [new file with mode: 0644]
ulp/srp/kernel/srp_descriptors.c [new file with mode: 0644]
ulp/srp/kernel/srp_descriptors.h [new file with mode: 0644]
ulp/srp/kernel/srp_driver.c [new file with mode: 0644]
ulp/srp/kernel/srp_event.c [new file with mode: 0644]
ulp/srp/kernel/srp_event.h [new file with mode: 0644]
ulp/srp/kernel/srp_hba.c [new file with mode: 0644]
ulp/srp/kernel/srp_hba.h [new file with mode: 0644]
ulp/srp/kernel/srp_hca.c [new file with mode: 0644]
ulp/srp/kernel/srp_hca.h [new file with mode: 0644]
ulp/srp/kernel/srp_i_logout.h [new file with mode: 0644]
ulp/srp/kernel/srp_information_unit.h [new file with mode: 0644]
ulp/srp/kernel/srp_iu_buffer.h [new file with mode: 0644]
ulp/srp/kernel/srp_login_rej.h [new file with mode: 0644]
ulp/srp/kernel/srp_login_req.h [new file with mode: 0644]
ulp/srp/kernel/srp_login_rsp.h [new file with mode: 0644]
ulp/srp/kernel/srp_rsp.h [new file with mode: 0644]
ulp/srp/kernel/srp_session.c [new file with mode: 0644]
ulp/srp/kernel/srp_session.h [new file with mode: 0644]
ulp/srp/kernel/srp_t_logout.h [new file with mode: 0644]
ulp/srp/kernel/srp_tsk_mgmt.h [new file with mode: 0644]
ulp/wsd/dirs [new file with mode: 0644]
ulp/wsd/user/README [new file with mode: 0644]
ulp/wsd/user/SOURCES [new file with mode: 0644]
ulp/wsd/user/extensions.c [new file with mode: 0644]
ulp/wsd/user/ib_cm.c [new file with mode: 0644]
ulp/wsd/user/ibsp_duplicate.c [new file with mode: 0644]
ulp/wsd/user/ibsp_iblow.c [new file with mode: 0644]
ulp/wsd/user/ibsp_ip.c [new file with mode: 0644]
ulp/wsd/user/ibsp_mem.c [new file with mode: 0644]
ulp/wsd/user/ibsp_mem.h [new file with mode: 0644]
ulp/wsd/user/ibsp_mngt.c [new file with mode: 0644]
ulp/wsd/user/ibsp_pnp.c [new file with mode: 0644]
ulp/wsd/user/ibspdebug.c [new file with mode: 0644]
ulp/wsd/user/ibspdebug.h [new file with mode: 0644]
ulp/wsd/user/ibspdefines.h [new file with mode: 0644]
ulp/wsd/user/ibspdll.c [new file with mode: 0644]
ulp/wsd/user/ibspdll.def [new file with mode: 0644]
ulp/wsd/user/ibspdll.h [new file with mode: 0644]
ulp/wsd/user/ibspdll.rc [new file with mode: 0644]
ulp/wsd/user/ibspdll.sln [new file with mode: 0644]
ulp/wsd/user/ibspproto.h [new file with mode: 0644]
ulp/wsd/user/ibspstruct.h [new file with mode: 0644]
ulp/wsd/user/makefile [new file with mode: 0644]
ulp/wsd/user/misc.c [new file with mode: 0644]
ulp/wsd/user/sockinfo.c [new file with mode: 0644]

diff --git a/core/al/al.c b/core/al/al.c
new file mode 100644 (file)
index 0000000..0da3b02
--- /dev/null
@@ -0,0 +1,493 @@
+/*\r
+ * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id:$\r
+ */\r
+\r
+#include <iba/ib_al.h>\r
+\r
+#include "al.h"\r
+#include "al_ca.h"\r
+#include "al_cm_shared.h"\r
+#include "al_common.h"\r
+#include "al_debug.h"\r
+#include "al_mad_pool.h"\r
+#include "al_mgr.h"\r
+#include "al_verbs.h"\r
+#include "ib_common.h"\r
+\r
+\r
+void\r
+destroying_al(\r
+       IN                              al_obj_t                                        *p_obj );\r
+\r
+\r
+void\r
+free_al(\r
+       IN                              al_obj_t                                        *p_obj );\r
+\r
+\r
+\r
+/*\r
+ * Destroy an instance of the access layer.\r
+ */\r
+#ifdef CL_KERNEL\r
+ib_api_status_t\r
+ib_close_al(\r
+       IN              const   ib_al_handle_t                          h_al )\r
+#else\r
+ib_api_status_t\r
+do_close_al(\r
+       IN              const   ib_al_handle_t                          h_al )\r
+#endif\r
+{\r
+       CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_AL_HANDLE\n") );\r
+               return IB_INVALID_AL_HANDLE;\r
+       }\r
+\r
+       ref_al_obj( &h_al->obj );\r
+       h_al->obj.pfn_destroy( &h_al->obj, NULL );\r
+\r
+       CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );\r
+       return IB_SUCCESS;\r
+}\r
+\r
+\r
+\r
+void\r
+destroying_al(\r
+       IN                              al_obj_t                                        *p_obj )\r
+{\r
+       ib_al_handle_t                  h_al;\r
+       cl_list_item_t                  *p_list_item;\r
+       al_sa_req_t                             *p_sa_req;\r
+\r
+       CL_ASSERT( p_obj );\r
+       h_al = PARENT_STRUCT( p_obj, ib_al_t, obj );\r
+\r
+       cl_spinlock_acquire( &p_obj->lock );\r
+\r
+       /* Cancel all outstanding queries. */\r
+       for( p_list_item = cl_qlist_head( &h_al->query_list );\r
+                p_list_item != cl_qlist_end( &h_al->query_list );\r
+                p_list_item = cl_qlist_next( p_list_item ) )\r
+       {\r
+               p_sa_req = PARENT_STRUCT( p_list_item, al_sa_req_t, list_item );\r
+               al_cancel_sa_req( p_sa_req );\r
+       }\r
+\r
+       cl_spinlock_release( &p_obj->lock );\r
+}\r
+\r
+\r
+\r
+static void\r
+__free_mads(\r
+       IN                              const   ib_al_handle_t          h_al )\r
+{\r
+       cl_list_item_t                  *p_list_item;\r
+       al_mad_element_t                *p_mad_element;\r
+       ib_api_status_t                 status;\r
+\r
+       /* Return all outstanding MADs to their MAD pools. */\r
+       for( p_list_item = cl_qlist_head( &h_al->mad_list );\r
+                p_list_item != cl_qlist_end( &h_al->mad_list );\r
+                p_list_item = cl_qlist_head( &h_al->mad_list ) )\r
+       {\r
+               p_mad_element = PARENT_STRUCT( p_list_item, al_mad_element_t, al_item );\r
+               p_mad_element->element.p_next = NULL;\r
+\r
+               status = ib_put_mad( &p_mad_element->element );\r
+               if( status != IB_SUCCESS )\r
+               {\r
+                       CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,\r
+                               ("ib_put_mad failed with status %s, continuing.\n",\r
+                               ib_get_err_str(status)) );\r
+               }\r
+       }\r
+}\r
+\r
+\r
+\r
+static void\r
+__free_conns(\r
+       IN                              const   ib_al_handle_t          h_al )\r
+{\r
+       cl_list_item_t                  *p_list_item;\r
+       ib_cm_handle_t                  h_conn;\r
+\r
+       /*\r
+        * Report any outstanding connections left lying around.  We should\r
+        * never enter the loop below if the code is written correctly.\r
+        */\r
+       for( p_list_item = cl_qlist_head( &h_al->conn_list );\r
+                p_list_item != cl_qlist_end( &h_al->conn_list );\r
+                p_list_item = cl_qlist_head( &h_al->conn_list ) )\r
+       {\r
+               CL_ASSERT( !p_list_item );\r
+\r
+               h_conn = PARENT_STRUCT( p_list_item, al_conn_t, al_item );\r
+\r
+               /* Release the connection object, so the CM can clean-up properly. */\r
+               cm_cleanup_conn( h_conn );\r
+       }\r
+}\r
+\r
+\r
+\r
+void\r
+free_al(\r
+       IN                              al_obj_t                                        *p_obj )\r
+{\r
+       ib_al_handle_t                  h_al;\r
+\r
+       CL_ASSERT( p_obj );\r
+       h_al = PARENT_STRUCT( p_obj, ib_al_t, obj );\r
+\r
+       /* Free any MADs not returned by the user. */\r
+       __free_mads( h_al );\r
+\r
+       /* Cleanup any left-over connections. */\r
+       __free_conns( h_al );\r
+\r
+#ifdef CL_KERNEL\r
+       cl_vector_destroy( &h_al->hdl_vector );\r
+#endif\r
+\r
+       cl_spinlock_destroy( &h_al->mad_lock );\r
+       destroy_al_obj( &h_al->obj );\r
+       cl_free( h_al );\r
+}\r
+\r
+\r
+\r
+\r
+ib_api_status_t\r
+ib_query_ca_by_guid(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_net64_t                                      ca_guid,\r
+               OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,\r
+       IN      OUT                     uint32_t* const                         p_size )\r
+{\r
+       ib_ca_handle_t          h_ca;\r
+       ib_api_status_t         status;\r
+\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_AL_HANDLE\n") );\r
+               return IB_INVALID_AL_HANDLE;\r
+       }\r
+       if( !p_size )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_PARAMETER\n") );\r
+               return IB_INVALID_PARAMETER;\r
+       }\r
+\r
+       h_ca = acquire_ca( ca_guid );\r
+       if( !h_ca )\r
+       {\r
+               return IB_INVALID_GUID;\r
+       }\r
+       status = ib_query_ca( h_ca, p_ca_attr, p_size );\r
+       deref_al_obj( &h_ca->obj );\r
+\r
+       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+       return status;\r
+}\r
+\r
+\r
+\r
+void\r
+al_insert_conn(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_cm_handle_t                          h_conn )\r
+{\r
+       ref_al_obj( &h_al->obj );\r
+       cl_spinlock_acquire( &h_al->obj.lock );\r
+\r
+       h_conn->h_al = h_al;\r
+       cl_qlist_insert_tail( &h_al->conn_list, &h_conn->al_item );\r
+#ifdef CL_KERNEL\r
+       h_conn->hdl = al_hdl_insert( h_al, h_conn, AL_OBJ_TYPE_H_CONN );\r
+#endif\r
+\r
+       cl_spinlock_release( &h_al->obj.lock );\r
+}\r
+\r
+\r
+\r
+void\r
+al_remove_conn(\r
+       IN              const   ib_cm_handle_t                          h_conn )\r
+{\r
+       cl_spinlock_acquire( &h_conn->h_al->obj.lock );\r
+       cl_qlist_remove_item( &h_conn->h_al->conn_list, &h_conn->al_item );\r
+#ifdef CL_KERNEL\r
+       al_hdl_free( h_conn->h_al, h_conn->hdl );\r
+#endif\r
+       cl_spinlock_release( &h_conn->h_al->obj.lock );\r
+\r
+       deref_al_obj( &h_conn->h_al->obj );\r
+\r
+       h_conn->h_al = NULL;\r
+#ifdef CL_KERNEL\r
+       h_conn->hdl = AL_INVALID_HANDLE;\r
+#endif\r
+}\r
+\r
+\r
+\r
+void\r
+al_insert_mad(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              al_mad_element_t*       const   p_mad )\r
+{\r
+       /* Assert that the MAD does not already have an owner. */\r
+       CL_ASSERT( !p_mad->h_al );\r
+\r
+       ref_al_obj( &h_al->obj );\r
+       cl_spinlock_acquire( &h_al->mad_lock );\r
+\r
+       /*\r
+        * Initialize the h_al field.  This field is used to locate the AL\r
+        * instance that owns a given MAD.\r
+        */\r
+       p_mad->h_al = h_al;\r
+       cl_qlist_insert_tail( &h_al->mad_list, &p_mad->al_item );\r
+\r
+       cl_spinlock_release( &h_al->mad_lock );\r
+}\r
+\r
+\r
+\r
+void\r
+al_remove_mad(\r
+       IN                              al_mad_element_t*       const   p_mad )\r
+{\r
+       /* Return if the MAD is not in the AL instance MAD list. */\r
+       if( !p_mad->h_al ) return;\r
+\r
+       cl_spinlock_acquire( &p_mad->h_al->mad_lock );\r
+       cl_qlist_remove_item( &p_mad->h_al->mad_list, &p_mad->al_item );\r
+       cl_spinlock_release( &p_mad->h_al->mad_lock );\r
+\r
+       deref_al_obj( &p_mad->h_al->obj );\r
+       p_mad->h_al = NULL;\r
+}\r
+\r
+\r
+\r
+void\r
+al_handoff_mad(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              ib_mad_element_t*       const   p_mad_element )\r
+{\r
+       al_mad_element_t                *p_mad;\r
+\r
+       p_mad = PARENT_STRUCT( p_mad_element, al_mad_element_t, element );\r
+\r
+       /*\r
+        * See if we're handing off to the same AL instance.  This can happen if\r
+        * we hand off to an internal service that uses the global AL instance.\r
+        */\r
+       if( p_mad->h_al == h_al )\r
+               return;\r
+\r
+       al_remove_mad( p_mad );\r
+       al_insert_mad( h_al, p_mad );\r
+}\r
+\r
+\r
+\r
+void\r
+al_insert_key(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              al_pool_key_t* const            p_pool_key )\r
+{\r
+       ref_al_obj( &h_al->obj );\r
+       p_pool_key->h_al = h_al;\r
+\r
+       cl_spinlock_acquire( &h_al->obj.lock );\r
+       p_pool_key->in_al_list = TRUE;\r
+       cl_qlist_insert_tail( &h_al->key_list, &p_pool_key->al_item );\r
+       cl_spinlock_release( &h_al->obj.lock );\r
+}\r
+\r
+\r
+\r
+/*\r
+ * Remove the pool_key from AL's list.  This is called from the pool_key's\r
+ * cleanup routine.\r
+ */\r
+void\r
+al_remove_key(\r
+       IN                              al_pool_key_t* const            p_pool_key )\r
+{\r
+       /* Return if the pool key is not in the AL instance key list. */\r
+       if( !p_pool_key->h_al ) return;\r
+\r
+       cl_spinlock_acquire( &p_pool_key->h_al->obj.lock );\r
+       if( p_pool_key->in_al_list )\r
+       {\r
+               cl_qlist_remove_item( &p_pool_key->h_al->key_list,\r
+                       &p_pool_key->al_item );\r
+       }\r
+       cl_spinlock_release( &p_pool_key->h_al->obj.lock );\r
+\r
+       deref_al_obj( &p_pool_key->h_al->obj );\r
+       p_pool_key->h_al = NULL;\r
+}\r
+\r
+\r
+\r
+void\r
+al_dereg_pool(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              ib_pool_handle_t const          h_pool )\r
+{\r
+       cl_qlist_t                              destroy_list;\r
+       cl_list_item_t                  *p_list_item, *p_next_item;\r
+       al_pool_key_t                   *p_pool_key;\r
+\r
+       /*\r
+        * Deregister matching pool keys.  This may deregister memory, so we\r
+        * cannot do this while holding a lock.  So we need to move the pool\r
+        * keys to a destroy_list.\r
+        */\r
+       cl_qlist_init( &destroy_list );\r
+\r
+       /* Search for keys associated with the given PD or MAD pool. */\r
+       cl_spinlock_acquire( &h_al->obj.lock );\r
+       for( p_list_item = cl_qlist_head( &h_al->key_list );\r
+                p_list_item != cl_qlist_end( &h_al->key_list );\r
+                p_list_item = p_next_item )\r
+       {\r
+               /* Cache the next item in case we remove this one. */\r
+               p_next_item = cl_qlist_next( p_list_item );\r
+               p_pool_key = PARENT_STRUCT( p_list_item, al_pool_key_t, al_item );\r
+\r
+               if( p_pool_key->h_pool == h_pool )\r
+               {\r
+                       /*\r
+                        * Destroy this pool key.  This only deregisters memory in\r
+                        * user-mode since we use phys reg in kernel mode, so we\r
+                        * can do this while holding a lock.\r
+                        */\r
+                       ref_al_obj( &p_pool_key->obj );\r
+                       p_pool_key->in_al_list = FALSE;\r
+                       cl_qlist_remove_item( &h_al->key_list, &p_pool_key->al_item );\r
+                       cl_qlist_insert_tail( &destroy_list, &p_pool_key->al_item );\r
+               }\r
+       }\r
+       cl_spinlock_release( &h_al->obj.lock );\r
+\r
+       /* Destroy all pool_keys associated with the MAD pool. */\r
+       for( p_list_item = cl_qlist_remove_head( &destroy_list );\r
+                p_list_item != cl_qlist_end( &destroy_list );\r
+                p_list_item = cl_qlist_remove_head( &destroy_list ) )\r
+       {\r
+               /* Mark that we've remove the item from the list. */\r
+               p_pool_key = PARENT_STRUCT( p_list_item, al_pool_key_t, al_item );\r
+               p_pool_key->obj.pfn_destroy( &p_pool_key->obj, NULL );\r
+       }\r
+}\r
+\r
+\r
+void\r
+al_insert_query(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              al_query_t* const                       p_query )\r
+{\r
+       p_query->h_al = h_al;\r
+       ref_al_obj( &h_al->obj );\r
+       cl_spinlock_acquire( &h_al->obj.lock );\r
+       cl_qlist_insert_tail( &h_al->query_list, &p_query->sa_req.list_item );\r
+       cl_spinlock_release( &h_al->obj.lock );\r
+}\r
+\r
+\r
+void\r
+al_remove_query(\r
+       IN                              al_query_t* const                       p_query )\r
+{\r
+       cl_spinlock_acquire( &p_query->h_al->obj.lock );\r
+       cl_qlist_remove_item( &p_query->h_al->query_list,\r
+               &p_query->sa_req.list_item );\r
+       cl_spinlock_release( &p_query->h_al->obj.lock );\r
+       deref_al_obj( &p_query->h_al->obj );\r
+}\r
+\r
+\r
+\r
+static cl_status_t\r
+__match_query(\r
+       IN              const   cl_list_item_t* const           p_item,\r
+       IN                              void*                                           context )\r
+{\r
+       al_sa_req_t             *p_sa_req;\r
+\r
+       p_sa_req = PARENT_STRUCT( p_item, al_sa_req_t, list_item );\r
+       if( context == PARENT_STRUCT( p_item, al_query_t, sa_req ) )\r
+               return IB_SUCCESS;\r
+\r
+       return IB_NOT_FOUND;\r
+}\r
+\r
+\r
+void\r
+ib_cancel_query(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_query_handle_t                       h_query )\r
+{\r
+       cl_list_item_t  *p_item;\r
+\r
+       AL_ENTER( AL_DBG_QUERY );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_AL_HANDLE\n") );\r
+               return;\r
+       }\r
+\r
+       cl_spinlock_acquire( &h_al->obj.lock );\r
+       p_item =\r
+               cl_qlist_find_from_head( &h_al->query_list, __match_query, h_query );\r
+       if( p_item != cl_qlist_end( &h_al->query_list ) )\r
+               al_cancel_sa_req( &h_query->sa_req );\r
+\r
+       cl_spinlock_release( &h_al->obj.lock );\r
+\r
+       AL_EXIT( AL_DBG_QUERY );\r
+}\r
diff --git a/core/al/al.h b/core/al/al.h
new file mode 100644 (file)
index 0000000..0adc9f6
--- /dev/null
@@ -0,0 +1,293 @@
+/*\r
+ * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id:$\r
+ */\r
+\r
+#if !defined(__AL_H__)\r
+#define __AL_H__\r
+\r
+#include <complib/cl_event.h>\r
+#include <complib/cl_qlist.h>\r
+#include <complib/cl_ptr_vector.h>\r
+#include <complib/cl_spinlock.h>\r
+\r
+#include "al_common.h"\r
+#include "al_mad_pool.h"\r
+#include "al_query.h"\r
+#include "al_reg_svc.h"\r
+#ifdef CL_KERNEL\r
+#include "al_proxy.h"\r
+#endif\r
+\r
+\r
+\r
+typedef struct _al_handle\r
+{\r
+       uint32_t                type;\r
+       al_obj_t                *p_obj;\r
+\r
+}      al_handle_t;\r
+\r
+\r
+#define AL_INVALID_HANDLE      0\r
+\r
+\r
+/*\r
+ * AL instance structure.\r
+ */\r
+typedef struct _ib_al\r
+{\r
+       al_obj_t                                        obj;\r
+\r
+       /* Asynchronous processing item used to deregister services with the SA. */\r
+       cl_async_proc_item_t            dereg_svc_async;\r
+\r
+       cl_qlist_t                                      mad_list;\r
+       /*\r
+        * The MAD list must have a dedicated lock protecting it to prevent\r
+        * deadlocks.  The MAD service gets/puts MADs from/to pools, which\r
+        * needs to track the MAD in the associated AL instance's mad_list.\r
+        * When cancelling SA requests, the AL instance's object lock is held\r
+        * and MAD cancellation takes the MAD service's lock.\r
+        */\r
+       cl_spinlock_t                           mad_lock;\r
+\r
+       cl_qlist_t                                      key_list;\r
+       cl_qlist_t                                      query_list;\r
+       cl_qlist_t                                      conn_list;\r
+\r
+#ifdef CL_KERNEL\r
+       /* Handle manager is only needed in the kernel. */\r
+       cl_vector_t                                     hdl_vector;\r
+       uint64_t                                        free_hdl;\r
+\r
+       /* Proxy context. */\r
+       al_dev_open_context_t           *p_context;\r
+#endif\r
+\r
+}      ib_al_t;\r
+\r
+\r
+\r
+ib_api_status_t\r
+init_al(\r
+       IN                              al_obj_t                                        *p_parent_obj,\r
+       IN              const   ib_al_handle_t                          h_al );\r
+\r
+\r
+void\r
+destroying_al(\r
+       IN                              al_obj_t                                        *p_obj );\r
+\r
+\r
+void\r
+free_al(\r
+       IN                              al_obj_t                                        *p_obj );\r
+\r
+\r
+\r
+/*\r
+ * Insert a pnp registration in the PnP vector.\r
+ */\r
+ib_api_status_t\r
+al_insert_pnp(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_pnp_handle_t                         h_pnp );\r
+\r
+/*\r
+ * Remove a pnp registration from the PnP vector.\r
+ */\r
+void\r
+al_remove_pnp(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_pnp_handle_t                         h_pnp );\r
+\r
+\r
+void\r
+al_insert_mad(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              al_mad_element_t*       const   p_mad );\r
+\r
+\r
+void\r
+al_remove_mad(\r
+       IN                              al_mad_element_t*       const   p_mad );\r
+\r
+\r
+void\r
+al_handoff_mad(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              ib_mad_element_t*       const   p_mad_element );\r
+\r
+\r
+void\r
+al_insert_key(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              al_pool_key_t* const            p_pool_key );\r
+\r
+\r
+void\r
+al_remove_key(\r
+       IN                              al_pool_key_t* const            p_pool_key );\r
+\r
+\r
+void\r
+al_dereg_pool(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              ib_pool_handle_t const          h_pool );\r
+\r
+\r
+void\r
+al_insert_query(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              al_query_t* const                       p_query );\r
+\r
+\r
+void\r
+al_remove_query(\r
+       IN                              al_query_t* const                       p_query );\r
+\r
+void\r
+al_insert_conn(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_cm_handle_t                          h_conn );\r
+\r
+void\r
+al_remove_conn(\r
+       IN              const   ib_cm_handle_t                          h_conn );\r
+\r
+#ifdef CL_KERNEL\r
+// TODO: Once all things in the handle vector are al_obj_t,\r
+// TODO: we can remove the type parameter.\r
+uint64_t\r
+al_hdl_insert(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              void* const                                     p_obj,\r
+       IN              const   uint32_t                                        type );\r
+\r
+\r
+static inline uint64_t\r
+al_hdl_lock_insert(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN                              void* const                                     p_obj,\r
+       IN              const   uint32_t                                        type )\r
+{\r
+       uint64_t        hdl;\r
+       cl_spinlock_acquire( &h_al->obj.lock );\r
+       hdl = al_hdl_insert( h_al, p_obj, type );\r
+       cl_spinlock_release( &h_al->obj.lock );\r
+       return hdl;\r
+}\r
+\r
+\r
+void\r
+al_hdl_free(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   uint64_t                                        hdl );\r
+\r
+\r
+static inline uint64_t\r
+al_hdl_insert_obj(\r
+       IN                              al_obj_t* const                         p_obj )\r
+{\r
+       uint64_t                hdl;\r
+\r
+       CL_ASSERT( p_obj->h_al );\r
+\r
+       cl_spinlock_acquire( &p_obj->h_al->obj.lock );\r
+       hdl = al_hdl_insert( p_obj->h_al, p_obj, AL_BASE_TYPE( p_obj->type ) );\r
+       cl_spinlock_release( &p_obj->h_al->obj.lock );\r
+\r
+       return hdl;\r
+}\r
+\r
+\r
+static inline void\r
+al_hdl_free_obj(\r
+       IN                              al_obj_t* const                         p_obj )\r
+{\r
+       CL_ASSERT( p_obj->h_al );\r
+       CL_ASSERT( p_obj->hdl != AL_INVALID_HANDLE );\r
+       cl_spinlock_acquire( &p_obj->h_al->obj.lock );\r
+\r
+       al_hdl_free( p_obj->h_al, p_obj->hdl );\r
+       p_obj->hdl = AL_INVALID_HANDLE;\r
+       p_obj->hdl_valid = FALSE;\r
+\r
+       cl_spinlock_release( &p_obj->h_al->obj.lock );\r
+}\r
+\r
+\r
+al_obj_t*\r
+al_hdl_ref(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   uint64_t                                        hdl,\r
+       IN              const   uint32_t                                        type );\r
+\r
+/* Validate an object. */\r
+void*\r
+al_hdl_chk(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   uint64_t                                        hdl,\r
+       IN              const   uint32_t                                        type );\r
+\r
+/* Validate and remove an object. */\r
+void*\r
+al_hdl_get(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   uint64_t                                        hdl,\r
+       IN              const   uint32_t                                        type );\r
+\r
+/* Validate and removes a MAD element. */\r
+static inline ib_mad_element_t*\r
+al_hdl_get_mad(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   uint64_t                                        hdl )\r
+{\r
+       return (ib_mad_element_t*)al_hdl_get( h_al, hdl, AL_OBJ_TYPE_H_MAD );\r
+}\r
+\r
+/* Validate and reference a connection.  Used for MRA */\r
+struct _al_conn*\r
+al_hdl_ref_conn(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   uint64_t                                        hdl,\r
+       IN              const   uint32_t                                        sub_type );\r
+\r
+/* Validate, reference, and remove a connection. */\r
+struct _al_conn*\r
+al_hdl_get_conn(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   uint64_t                                        hdl,\r
+       IN              const   uint32_t                                        sub_type );\r
+\r
+#endif /* CL_KERNEL */\r
+\r
+#endif /* __AL_H__ */\r
diff --git a/core/al/al_av.c b/core/al/al_av.c
new file mode 100644 (file)
index 0000000..44155c3
--- /dev/null
@@ -0,0 +1,300 @@
+/*\r
+ * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id:$\r
+ */\r
+\r
+#include <iba/ib_al.h>\r
+#include "al.h"\r
+#include "al_av.h"\r
+#include "al_debug.h"\r
+#include "al_pd.h"\r
+#include "al_res_mgr.h"\r
+#include "al_verbs.h"\r
+\r
+\r
+\r
+static void\r
+__cleanup_av(\r
+       IN                              struct _al_obj                          *p_obj );\r
+\r
+\r
+static void\r
+__return_av(\r
+       IN                              al_obj_t                                        *p_obj );\r
+\r
+\r
+\r
+cl_status_t\r
+av_ctor(\r
+       IN                              void* const                                     p_object,\r
+       IN                              void*                                           context,\r
+               OUT                     cl_pool_item_t** const          pp_pool_item )\r
+{\r
+       ib_api_status_t                 status;\r
+       ib_av_handle_t                  h_av;\r
+\r
+       UNUSED_PARAM( context );\r
+\r
+       h_av = (ib_av_handle_t)p_object;\r
+       cl_memclr( h_av, sizeof( ib_av_t ) );\r
+\r
+       construct_al_obj( &h_av->obj, AL_OBJ_TYPE_H_AV );\r
+       status = init_al_obj( &h_av->obj, NULL, FALSE, NULL,\r
+               __cleanup_av, __return_av );\r
+       if( status != IB_SUCCESS )\r
+       {\r
+               return CL_ERROR;\r
+       }\r
+\r
+       *pp_pool_item = &((ib_av_handle_t)p_object)->obj.pool_item;\r
+\r
+       /* Release the reference taken in init_al_obj. */\r
+       deref_al_obj( &h_av->obj );\r
+\r
+       return CL_SUCCESS;\r
+}\r
+\r
+\r
+void\r
+av_dtor(\r
+       IN              const   cl_pool_item_t* const           p_pool_item,\r
+       IN                              void*                                           context )\r
+{\r
+       al_obj_t                                *p_obj;\r
+\r
+       UNUSED_PARAM( context );\r
+\r
+       p_obj = PARENT_STRUCT( p_pool_item, al_obj_t, pool_item );\r
+\r
+       /*\r
+        * The AV is being totally destroyed.  Modify the free_cb to destroy the\r
+        * AL object.\r
+        */\r
+       p_obj->pfn_free = (al_pfn_free_t)destroy_al_obj;\r
+       ref_al_obj( p_obj );\r
+       p_obj->pfn_destroy( p_obj, NULL );\r
+}\r
+\r
+\r
+\r
+ib_api_status_t\r
+create_av(\r
+       IN              const   ib_pd_handle_t                          h_pd,\r
+       IN              const   ib_av_attr_t* const                     p_av_attr,\r
+               OUT                     ib_av_handle_t* const           ph_av,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )\r
+{\r
+       ib_api_status_t                 status;\r
+       ib_av_handle_t                  h_av;\r
+\r
+       CL_ASSERT( h_pd );\r
+\r
+       if( !p_av_attr || !ph_av )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_PARAMETER\n") );\r
+               return IB_INVALID_PARAMETER;\r
+       }\r
+\r
+       /* Get an AV tracking structure. */\r
+       h_av = alloc_av();\r
+       if( !h_av )\r
+               return IB_INSUFFICIENT_MEMORY;\r
+\r
+       status = attach_al_obj( &h_pd->obj, &h_av->obj );\r
+       if( status != IB_SUCCESS )\r
+       {\r
+               h_av->obj.pfn_destroy( &h_av->obj, NULL );\r
+               return status;\r
+       }\r
+\r
+       /* Create the address vector. */\r
+       status = verbs_create_av( h_pd, p_av_attr, h_av );\r
+       if( status != IB_SUCCESS )\r
+       {\r
+               h_av->obj.pfn_destroy( &h_av->obj, NULL );\r
+               return status;\r
+       }\r
+\r
+       /* keep a copy of the av for special qp access */\r
+       h_av->av_attr = *p_av_attr;\r
+       *ph_av = h_av;\r
+\r
+       return IB_SUCCESS;\r
+}\r
+\r
+\r
+\r
+ib_api_status_t\r
+ib_destroy_av(\r
+       IN              const   ib_av_handle_t                          h_av )\r
+{\r
+       CL_ENTER( AL_DBG_AV, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_av, AL_OBJ_TYPE_H_AV ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_AV_HANDLE\n") );\r
+               return IB_INVALID_AV_HANDLE;\r
+       }\r
+\r
+       ref_al_obj( &h_av->obj );\r
+       h_av->obj.pfn_destroy( &h_av->obj, NULL );\r
+\r
+       CL_EXIT( AL_DBG_AV, g_al_dbg_lvl );\r
+       return IB_SUCCESS;\r
+}\r
+\r
+\r
+\r
+static void\r
+__cleanup_av(\r
+       IN                              struct _al_obj                          *p_obj )\r
+{\r
+       ib_api_status_t                 status;\r
+       ib_av_handle_t                  h_av;\r
+\r
+       CL_ASSERT( p_obj );\r
+       h_av = PARENT_STRUCT( p_obj, ib_av_t, obj );\r
+\r
+       /* Destroy the AV. */\r
+       if( verbs_check_av( h_av ) )\r
+       {\r
+               status = verbs_destroy_av(h_av);\r
+               CL_ASSERT( status == IB_SUCCESS );\r
+#ifndef CL_KERNEL\r
+               h_av->obj.hdl = AL_INVALID_HANDLE;\r
+#endif\r
+               h_av->h_ci_av = NULL;\r
+       }\r
+}\r
+\r
+\r
+\r
+static void\r
+__return_av(\r
+       IN                              al_obj_t                                        *p_obj )\r
+{\r
+       ib_av_handle_t                  h_av;\r
+\r
+       h_av = PARENT_STRUCT( p_obj, ib_av_t, obj );\r
+       reset_al_obj( p_obj );\r
+       put_av( h_av );\r
+}\r
+\r
+\r
+\r
+ib_api_status_t\r
+ib_query_av(\r
+       IN              const   ib_av_handle_t                          h_av,\r
+               OUT                     ib_av_attr_t* const                     p_av_attr,\r
+               OUT                     ib_pd_handle_t* const           ph_pd )\r
+{\r
+       return query_av( h_av, p_av_attr, ph_pd, NULL );\r
+}\r
+\r
+\r
+\r
+ib_api_status_t\r
+query_av(\r
+       IN              const   ib_av_handle_t                          h_av,\r
+               OUT                     ib_av_attr_t* const                     p_av_attr,\r
+               OUT                     ib_pd_handle_t* const           ph_pd,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )\r
+{\r
+       ib_api_status_t                 status;\r
+\r
+       CL_ENTER( AL_DBG_AV, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_av, AL_OBJ_TYPE_H_AV ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_AV_HANDLE\n") );\r
+               return IB_INVALID_AV_HANDLE;\r
+       }\r
+       if( !p_av_attr || !ph_pd )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_PARAMETER\n") );\r
+               return IB_INVALID_PARAMETER;\r
+       }\r
+\r
+       status = verbs_query_av(h_av, p_av_attr, ph_pd);\r
+\r
+       /* Record AL's PD handle. */\r
+       if( status == IB_SUCCESS )\r
+       {\r
+               *ph_pd = PARENT_STRUCT( h_av->obj.p_parent_obj, ib_pd_t, obj );\r
+               h_av->av_attr = *p_av_attr;\r
+       }\r
+\r
+       CL_EXIT( AL_DBG_AV, g_al_dbg_lvl );\r
+       return status;\r
+}\r
+\r
+\r
+\r
+ib_api_status_t\r
+ib_modify_av(\r
+       IN              const   ib_av_handle_t                          h_av,\r
+       IN              const   ib_av_attr_t* const                     p_av_mod )\r
+{\r
+       return modify_av( h_av, p_av_mod, NULL );\r
+}\r
+\r
+\r
+ib_api_status_t\r
+modify_av(\r
+       IN              const   ib_av_handle_t                          h_av,\r
+       IN              const   ib_av_attr_t* const                     p_av_mod,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )\r
+{\r
+       ib_api_status_t                 status;\r
+\r
+       CL_ENTER( AL_DBG_AV, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_av, AL_OBJ_TYPE_H_AV ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_AV_HANDLE\n") );\r
+               return IB_INVALID_AV_HANDLE;\r
+       }\r
+       if( !p_av_mod )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_PARAMETER\n") );\r
+               return IB_INVALID_PARAMETER;\r
+       }\r
+\r
+       status = verbs_modify_av(h_av, p_av_mod);\r
+\r
+       /* Record av for special qp access */\r
+       if( status == IB_SUCCESS )\r
+       {\r
+               h_av->av_attr = *p_av_mod;\r
+       }\r
+\r
+       CL_EXIT( AL_DBG_AV, g_al_dbg_lvl );\r
+       return status;\r
+}\r
diff --git a/core/al/al_av.h b/core/al/al_av.h
new file mode 100644 (file)
index 0000000..8f18532
--- /dev/null
@@ -0,0 +1,90 @@
+/*\r
+ * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id:$\r
+ */\r
+\r
+#if !defined(__AL_AV_H__)\r
+#define __AL_AV_H__\r
+\r
+\r
+#include "al_ca.h"\r
+#include <complib/cl_qpool.h>\r
+#include <complib/cl_qlist.h>\r
+\r
+\r
+typedef struct _ib_av\r
+{\r
+       al_obj_t                                        obj;\r
+       ib_av_handle_t                          h_ci_av;                /* Actual HW CI AV. */\r
+\r
+       ib_av_attr_t                            av_attr;\r
+\r
+       cl_list_item_t                          list_item;              /* item to manage AL AV's */\r
+\r
+}      ib_av_t;\r
+\r
+\r
+\r
+cl_status_t\r
+av_ctor(\r
+       IN                              void* const                                     p_object,\r
+       IN                              void*                                           context,\r
+               OUT                     cl_pool_item_t** const          pp_pool_item );\r
+\r
+void\r
+av_dtor(\r
+       IN              const   cl_pool_item_t* const           p_pool_item,\r
+       IN                              void*                                           context );\r
+\r
+\r
+ib_api_status_t\r
+create_av(\r
+       IN              const   ib_pd_handle_t                          h_pd,\r
+       IN              const   ib_av_attr_t* const                     p_av_attr,\r
+               OUT                     ib_av_handle_t* const           ph_av,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );\r
+\r
+\r
+ib_api_status_t\r
+query_av(\r
+       IN              const   ib_av_handle_t                          h_av,\r
+               OUT                     ib_av_attr_t* const                     p_av_attr,\r
+               OUT                     ib_pd_handle_t* const           ph_pd,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );\r
+\r
+\r
+ib_api_status_t\r
+modify_av(\r
+       IN              const   ib_av_handle_t                          h_av,\r
+       IN              const   ib_av_attr_t* const                     p_av_mod,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );\r
+\r
+\r
+#endif /* __AL_AV_H__ */\r
diff --git a/core/al/al_ca.c b/core/al/al_ca.c
new file mode 100644 (file)
index 0000000..25201ac
--- /dev/null
@@ -0,0 +1,424 @@
+/*\r
+ * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id:$\r
+ */\r
+\r
+#include <complib/cl_atomic.h>\r
+#include <iba/ib_al.h>\r
+\r
+#include "al.h"\r
+#include "al_av.h"\r
+#include "al_ca.h"\r
+#include "al_cq.h"\r
+#include "al_debug.h"\r
+#include "al_mgr.h"\r
+#include "al_mr.h"\r
+#include "al_mw.h"\r
+#include "al_pd.h"\r
+#include "al_qp.h"\r
+#include "al_verbs.h"\r
+#include "ib_common.h"\r
+\r
+\r
+static void\r
+__destroying_ca(\r
+       IN                              struct _al_obj                          *p_obj );\r
+\r
+void\r
+cleanup_ca(\r
+       IN                              struct _al_obj                          *p_obj );\r
+\r
+void\r
+free_ca(\r
+       IN                              struct _al_obj                          *p_obj );\r
+\r
+\r
+\r
+ib_api_status_t\r
+ib_open_ca(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_net64_t                                      ca_guid,\r
+       IN              const   ib_pfn_event_cb_t                       pfn_ca_event_cb OPTIONAL,\r
+       IN              const   void* const                                     ca_context,\r
+               OUT                     ib_ca_handle_t* const           ph_ca )\r
+{\r
+       ib_api_status_t status;\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_AL_HANDLE\n") );\r
+               return IB_INVALID_AL_HANDLE;\r
+       }\r
+\r
+       status = open_ca( h_al, ca_guid, pfn_ca_event_cb, ca_context, ph_ca, NULL );\r
+       \r
+       /* Release the reference taken in init_al_obj. */\r
+       if( status == IB_SUCCESS )\r
+               deref_al_obj( &(*ph_ca)->obj );\r
+\r
+       return status;\r
+}\r
+\r
+\r
+ib_api_status_t\r
+open_ca(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_net64_t                                      ca_guid,\r
+       IN              const   ib_pfn_event_cb_t                       pfn_ca_event_cb OPTIONAL,\r
+       IN              const   void* const                                     ca_context,\r
+               OUT                     ib_ca_handle_t* const           ph_ca,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf OPTIONAL )\r
+{\r
+       ib_ca_handle_t                  h_ca;\r
+       ib_api_status_t                 status;\r
+       al_obj_type_t                   obj_type = AL_OBJ_TYPE_H_CA;\r
+\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+       if( !ph_ca )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_PARAMETER\n") );\r
+               return IB_INVALID_PARAMETER;\r
+       }\r
+\r
+       /* Allocate a CA instance. */\r
+       h_ca = (ib_ca_handle_t)cl_zalloc( sizeof( ib_ca_t ) );\r
+       if( !h_ca )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+                       ("IB_INSUFFICIENT_MEMORY\n") );\r
+               return IB_INSUFFICIENT_MEMORY;\r
+       }\r
+\r
+       /* Construct the CA. */\r
+       if( p_umv_buf )\r
+               obj_type |= AL_OBJ_SUBTYPE_UM_EXPORT;\r
+       construct_al_obj( &h_ca->obj, obj_type );\r
+       h_ca->pfn_event_cb = pfn_ca_event_cb;\r
+\r
+       status = init_al_obj( &h_ca->obj, ca_context, TRUE,\r
+               __destroying_ca, cleanup_ca, free_ca );\r
+       if( status != IB_SUCCESS )\r
+       {\r
+               free_ca( &h_ca->obj );\r
+               CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+               return status;\r
+       }\r
+\r
+       status = attach_al_obj( &h_al->obj, &h_ca->obj );\r
+       if( status != IB_SUCCESS )\r
+       {\r
+               h_ca->obj.pfn_destroy( &h_ca->obj, NULL );\r
+               AL_EXIT( AL_DBG_CA );\r
+               return status;\r
+       }\r
+\r
+       /* Obtain a reference to the correct CI CA. */\r
+       h_ca->obj.p_ci_ca = acquire_ci_ca( ca_guid, h_ca );\r
+       if( !h_ca->obj.p_ci_ca )\r
+       {\r
+               h_ca->obj.pfn_destroy( &h_ca->obj, NULL );\r
+               CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+               return IB_INVALID_GUID;\r
+       }\r
+\r
+#if defined(CL_KERNEL)\r
+       /* If a UM open, pass to the VPD to establish the UM CA context. */\r
+       if( p_umv_buf )\r
+       {\r
+               status = h_ca->obj.p_ci_ca->verbs.um_open_ca(\r
+                       h_ca->obj.p_ci_ca->h_ci_ca, p_umv_buf, &h_ca->h_um_ca );\r
+               if( status != IB_SUCCESS )\r
+               {\r
+                       h_ca->obj.pfn_destroy( &h_ca->obj, NULL );\r
+                       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+                       return status;\r
+               }\r
+       }\r
+#endif /* defined(CL_KERNEL) */\r
+\r
+       *ph_ca = h_ca;\r
+\r
+       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+       return IB_SUCCESS;\r
+}\r
+\r
+\r
+/*\r
+ * Destroy an instance of an AL channel adapter.\r
+ */\r
+ib_api_status_t\r
+ib_close_ca(\r
+       IN              const   ib_ca_handle_t                          h_ca,\r
+       IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )\r
+{\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_CA_HANDLE\n") );\r
+               return IB_INVALID_CA_HANDLE;\r
+       }\r
+\r
+       ref_al_obj( &h_ca->obj );\r
+       h_ca->obj.pfn_destroy( &h_ca->obj, pfn_destroy_cb );\r
+\r
+       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+       return IB_SUCCESS;\r
+}\r
+\r
+\r
+static void\r
+__destroying_ca(\r
+       IN                              struct _al_obj                          *p_obj )\r
+{\r
+#if defined(CL_KERNEL)\r
+       ib_ca_handle_t                  h_ca;\r
+\r
+       CL_ASSERT( p_obj );\r
+       h_ca = PARENT_STRUCT( p_obj, ib_ca_t, obj );\r
+       if( h_ca->h_um_ca )\r
+       {\r
+               h_ca->obj.p_ci_ca->verbs.um_close_ca(\r
+                       h_ca->obj.p_ci_ca->h_ci_ca, h_ca->h_um_ca );\r
+       }\r
+#else\r
+       UNUSED_PARAM( p_obj );\r
+#endif\r
+}\r
+\r
+\r
+/*\r
+ * Release all resources associated with the CA.\r
+ */\r
+void\r
+cleanup_ca(\r
+       IN                              struct _al_obj                          *p_obj )\r
+{\r
+       /* It is now safe to release the CI CA. */\r
+       if( p_obj->p_ci_ca )\r
+               release_ci_ca( PARENT_STRUCT( p_obj, ib_ca_t, obj ) );\r
+}\r
+\r
+\r
+\r
+void\r
+free_ca(\r
+       IN                              struct _al_obj                          *p_obj )\r
+{\r
+       ib_ca_handle_t                  h_ca;\r
+\r
+       CL_ASSERT( p_obj );\r
+       h_ca = PARENT_STRUCT( p_obj, ib_ca_t, obj );\r
+\r
+       destroy_al_obj( p_obj );\r
+       cl_free( h_ca );\r
+}\r
+\r
+\r
+\r
+ib_api_status_t\r
+ib_query_ca(\r
+       IN              const   ib_ca_handle_t                          h_ca,\r
+               OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,\r
+       IN      OUT                     uint32_t* const                         p_size )\r
+{\r
+       return query_ca( h_ca, p_ca_attr, p_size, NULL );\r
+}\r
+\r
+\r
+\r
+ib_api_status_t\r
+query_ca(\r
+       IN              const   ib_ca_handle_t                          h_ca,\r
+               OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,\r
+       IN      OUT                     uint32_t* const                         p_size,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf )\r
+{\r
+       ib_api_status_t                 status;\r
+\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_CA_HANDLE\n") );\r
+               return IB_INVALID_CA_HANDLE;\r
+       }\r
+       if( !p_size )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_PARAMETER\n") );\r
+               return IB_INVALID_PARAMETER;\r
+       }\r
+\r
+       status = verbs_query_ca( h_ca, p_ca_attr, p_size );\r
+\r
+       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+       return status;\r
+}\r
+\r
+\r
+\r
+ib_api_status_t\r
+ib_modify_ca(\r
+       IN              const ib_ca_handle_t                            h_ca,\r
+       IN              const uint8_t                                           port_num,\r
+       IN              const ib_ca_mod_t                                       ca_mod,\r
+       IN              const ib_port_attr_mod_t* const         p_port_attr_mod )\r
+{\r
+       ib_api_status_t                 status;\r
+\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_CA_HANDLE\n") );\r
+               return IB_INVALID_CA_HANDLE;\r
+       }\r
+       if( !p_port_attr_mod )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_PARAMETER\n") );\r
+               return IB_INVALID_PARAMETER;\r
+       }\r
+\r
+       status = verbs_modify_ca(h_ca, port_num, ca_mod, p_port_attr_mod);\r
+\r
+       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+       return status;\r
+}\r
+\r
+\r
+\r
+/*\r
+ * Allocate a new protection domain.\r
+ */\r
+ib_api_status_t\r
+ib_alloc_pd(\r
+       IN              const   ib_ca_handle_t                          h_ca,\r
+       IN              const   ib_pd_type_t                            pd_type,\r
+       IN              const   void * const                            pd_context,\r
+               OUT                     ib_pd_handle_t* const           ph_pd )\r
+{\r
+       ib_api_status_t                 status;\r
+\r
+       CL_ENTER( AL_DBG_PD, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_CA_HANDLE\n") );\r
+               return IB_INVALID_CA_HANDLE;\r
+       }\r
+\r
+       status = alloc_pd( h_ca, pd_type, pd_context, ph_pd, NULL );\r
+\r
+       /* Release the reference taken in init_al_obj. */\r
+       if( status == IB_SUCCESS )\r
+               deref_al_obj( &(*ph_pd)->obj );\r
+\r
+       CL_EXIT( AL_DBG_PD, g_al_dbg_lvl );\r
+       return status;\r
+}\r
+\r
+\r
+\r
+ib_api_status_t\r
+ib_create_cq(\r
+       IN              const   ib_ca_handle_t                          h_ca,\r
+       IN      OUT                     ib_cq_create_t* const           p_cq_create,\r
+       IN              const   void* const                                     cq_context,\r
+       IN              const   ib_pfn_event_cb_t                       pfn_cq_event_cb OPTIONAL,\r
+               OUT                     ib_cq_handle_t* const           ph_cq )\r
+{\r
+       ib_api_status_t                 status;\r
+\r
+       CL_ENTER( AL_DBG_CQ, g_al_dbg_lvl );\r
+\r
+       if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("IB_INVALID_CA_HANDLE\n") );\r
+               return IB_INVALID_CA_HANDLE;\r
+       }\r
+\r
+       status = create_cq( h_ca, p_cq_create, cq_context, pfn_cq_event_cb,\r
+               ph_cq, NULL );\r
+\r
+       /* Release the reference taken in init_al_obj. */\r
+       if( status == IB_SUCCESS )\r
+               deref_al_obj( &(*ph_cq)->obj );\r
+\r
+       CL_EXIT( AL_DBG_CQ, g_al_dbg_lvl );\r
+       return status;\r
+}\r
+\r
+\r
+ib_api_status_t\r
+al_convert_to_ci_handles(\r
+       IN                              void* __ptr64 *         const   dst_handle_array,\r
+       IN              const   void* __ptr64 *         const   src_handle_array,\r
+       IN                              uint32_t                                        num_handles )\r
+{\r
+       uint32_t                i;\r
+       al_obj_t                *p_al_obj;\r
+\r
+       for( i = 0; i < num_handles; i++ )\r
+       {\r
+               p_al_obj = (al_obj_t*)(const void*)src_handle_array[i];\r
+               switch( p_al_obj->type )\r
+               {\r
+               case AL_OBJ_TYPE_H_PD:\r
+                       dst_handle_array[i] = ((ib_pd_t*)p_al_obj)->h_ci_pd;\r
+                       break;\r
+               case AL_OBJ_TYPE_H_CQ:\r
+                       dst_handle_array[i] = ((ib_cq_t*)p_al_obj)->h_ci_cq;\r
+                       break;\r
+               case AL_OBJ_TYPE_H_AV:\r
+                       dst_handle_array[i] = ((ib_av_t*)p_al_obj)->h_ci_av;\r
+                       break;\r
+               case AL_OBJ_TYPE_H_QP:\r
+                       dst_handle_array[i] = ((ib_qp_t*)p_al_obj)->h_ci_qp;\r
+                       break;\r
+               case AL_OBJ_TYPE_H_MR:\r
+                       dst_handle_array[i] = ((ib_mr_t*)p_al_obj)->h_ci_mr;\r
+                       break;\r
+               case AL_OBJ_TYPE_H_MW:\r
+                       dst_handle_array[i] = ((ib_mw_t*)p_al_obj)->h_ci_mw;\r
+                       break;\r
+               default:\r
+                       /* Bad handle type. */\r
+                       CL_ASSERT( p_al_obj->type == AL_OBJ_TYPE_H_PD ||\r
+                               p_al_obj->type == AL_OBJ_TYPE_H_CQ ||\r
+                               p_al_obj->type == AL_OBJ_TYPE_H_AV ||\r
+                               p_al_obj->type == AL_OBJ_TYPE_H_QP ||\r
+                               p_al_obj->type == AL_OBJ_TYPE_H_MR ||\r
+                               p_al_obj->type == AL_OBJ_TYPE_H_MW );\r
+                       return IB_INVALID_HANDLE;\r
+               }\r
+       }\r
+\r
+       return IB_SUCCESS;\r
+}\r
diff --git a/core/al/al_ca.h b/core/al/al_ca.h
new file mode 100644 (file)
index 0000000..111417f
--- /dev/null
@@ -0,0 +1,82 @@
+/*\r
+ * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id:$\r
+ */\r
+\r
+#if !defined(__AL_CA_H__)\r
+#define __AL_CA_H__\r
+\r
+#include <iba/ib_ci.h>\r
+#include <complib/cl_qlist.h>\r
+\r
+#include "al_common.h"\r
+#include "al_ci_ca.h"\r
+\r
+\r
+\r
+typedef struct _ib_ca\r
+{\r
+       al_obj_t                                obj;\r
+\r
+       ib_pfn_event_cb_t               pfn_event_cb;\r
+       cl_list_item_t                  list_item;\r
+#if defined(CL_KERNEL)\r
+       ib_ca_handle_t                  h_um_ca;\r
+#endif\r
+\r
+}      ib_ca_t;\r
+\r
+\r
+ib_api_status_t\r
+open_ca(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_net64_t                                      ca_guid,\r
+       IN              const   ib_pfn_event_cb_t                       pfn_ca_event_cb OPTIONAL,\r
+       IN              const   void* const                                     ca_context,\r
+               OUT                     ib_ca_handle_t* const           ph_ca,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf OPTIONAL );\r
+\r
+\r
+ib_api_status_t\r
+query_ca(\r
+       IN              const   ib_ca_handle_t                          h_ca,\r
+               OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,\r
+       IN      OUT                     uint32_t* const                         p_size,\r
+       IN      OUT                     ci_umv_buf_t* const                     p_umv_buf );\r
+\r
+\r
+ib_api_status_t\r
+al_convert_to_ci_handles(\r
+       IN                              void* __ptr64 *         const   dst_handle_array,\r
+       IN              const   void* __ptr64 *         const   src_handle_array,\r
+       IN                              uint32_t                                        num_handles );\r
+\r
+\r
+#endif /* __AL_CA_H__ */\r
diff --git a/core/al/al_ci_ca.h b/core/al/al_ci_ca.h
new file mode 100644 (file)
index 0000000..8c74056
--- /dev/null
@@ -0,0 +1,206 @@
+/*\r
+ * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id:$\r
+ */\r
+\r
+#if !defined(__AL_CI_CA_H__)\r
+#define __AL_CI_CA_H__\r
+\r
+#include <complib/cl_types.h>\r
+#ifdef CL_KERNEL\r
+#include <iba/ib_ci.h>\r
+#include <complib/cl_atomic.h>\r
+#else\r
+#include "ual_ci_ca.h"\r
+#endif /* CL_KERNEL */\r
+\r
+\r
+#include <complib/cl_event.h>\r
+#include <complib/cl_qlist.h>\r
+#include <complib/cl_passivelock.h>\r
+\r
+#include "al_common.h"\r
+\r
+\r
+#ifdef CL_KERNEL\r
+typedef ci_interface_t                 verbs_interface_t;\r
+\r
+ib_api_status_t\r
+create_ci_ca(\r
+       IN                              al_obj_t                                        *p_parent_obj,\r
+       IN              const   ci_interface_t*                         p_ci );\r
+#endif\r
+\r
+\r
+\r
+typedef struct _al_ci_ca\r
+{\r
+       al_obj_t                                        obj;\r
+       cl_list_item_t                          list_item;\r
+\r
+       cl_async_proc_item_t            dereg_async_item;\r
+\r
+       verbs_interface_t                       verbs;\r
+\r
+       ib_ca_handle_t                          h_ci_ca;                /* CI handle */\r
+       ib_ca_handle_t                          h_ca;                   /* AL handle */\r
+       ib_pd_handle_t                          h_pd;                   /* AL handle */\r
+       ib_pd_handle_t                          h_pd_alias;             /* AL handle */\r
+       ib_pool_key_t                           pool_key;               /* AL handle */\r
+\r
+       /* Opened instances of this CA. */\r
+       cl_qlist_t                                      ca_list;\r
+\r
+       /*\r
+        * Last known attributes as reported by the PnP manager.\r
+        * Updated by the PnP manager through the asynchronous processing thread.\r
+        */\r
+       ib_ca_attr_t                            *p_pnp_attr;\r
+       ib_ca_attr_t                            *p_user_attr;\r
+       cl_spinlock_t                           attr_lock;\r
+\r
+       cl_qpool_t                                      event_pool;\r
+\r
+       uint8_t                                         num_ports;\r
+\r
+       /* Shared memory registrations across processes. */\r
+       cl_qlist_t                                      shmid_list;\r
+\r
+       /* Array of port GUIDs on this CI CA. */\r
+       ib_net64_t                                      *port_array;\r
+\r
+}      al_ci_ca_t;\r
+\r
+\r
+ib_api_status_t\r
+get_port_info(\r
+       IN                              al_ci_ca_t                                      *p_ci_ca );\r
+\r
+\r
+/*\r
+ * Asynchronous event reporting.\r
+ */\r
+typedef struct _event_item\r
+{\r
+       cl_async_proc_item_t            async_item;\r
+       ib_async_event_rec_t            event_rec;\r
+\r
+}      event_item_t;\r
+\r
+\r
+void\r
+add_ca(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca,\r
+       IN              const   ib_ca_handle_t                          h_ca );\r
+\r
+void\r
+remove_ca(\r
+       IN              const   ib_ca_handle_t                          h_ca );\r
+\r
+\r
+void\r
+ca_event_cb(\r
+       IN                              ib_async_event_rec_t            *p_event_rec );\r
+\r
+void\r
+free_ci_ca(\r
+       IN                              al_obj_t*                                       p_obj );\r
+\r
+\r
+void\r
+ci_ca_async_event(\r
+       IN              const   ib_async_event_rec_t* const     p_event_rec );\r
+\r
+\r
+struct _al_shmid;\r
+\r
+void\r
+add_shmid(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca,\r
+       IN                              struct _al_shmid                        *p_shmid );\r
+\r
+ib_api_status_t\r
+acquire_shmid(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca,\r
+       IN                              int                                                     shmid,\r
+               OUT                     struct _al_shmid                        **pp_shmid );\r
+\r
+void\r
+release_shmid(\r
+       IN                              struct _al_shmid                        *p_shmid );\r
+\r
+\r
+\r
+ib_api_status_t\r
+get_port_num(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca,\r
+       IN              const   ib_net64_t                                      port_guid,\r
+               OUT                     uint8_t                                         *p_port_num OPTIONAL );\r
+\r
+ib_port_attr_t*\r
+get_port_attr(\r
+       IN                              ib_ca_attr_t * const            p_ca_attr,\r
+       IN                              ib_gid_t * const                        p_gid );\r
+\r
+\r
+#define BAD_PKEY_INDEX 0xFFFF\r
+\r
+uint16_t\r
+get_pkey_index(\r
+       IN                              ib_port_attr_t * const          p_port_attr,\r
+       IN              const   uint16_t                                        pkey );\r
+\r
+ib_api_status_t\r
+ci_ca_update_attr(\r
+       IN                              al_ci_ca_t*                                     p_ci_ca,\r
+               OUT                     ib_ca_attr_t**                          pp_old_pnp_attr );\r
+\r
+void\r
+ci_ca_lock_attr(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca );\r
+\r
+void\r
+ci_ca_excl_lock_attr(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca );\r
+\r
+void\r
+ci_ca_unlock_attr(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca );\r
+\r
+ib_api_status_t\r
+ci_call(\r
+       IN                              ib_ca_handle_t                          h_ca,\r
+       IN              const   void* __ptr64 *         const   handle_array    OPTIONAL,\r
+       IN                              uint32_t                                        num_handles,\r
+       IN                              ib_ci_op_t*                     const   p_ci_op,\r
+       IN                              ci_umv_buf_t*           const   p_umv_buf OPTIONAL );\r
+\r
+\r
+#endif /* __AL_CI_CA_H__ */\r
diff --git a/core/al/al_ci_ca_shared.c b/core/al/al_ci_ca_shared.c
new file mode 100644 (file)
index 0000000..8e6f3f3
--- /dev/null
@@ -0,0 +1,596 @@
+/*\r
+ * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id:$\r
+ */\r
+\r
+#include "al_ci_ca.h"\r
+#include "al_common.h"\r
+#include "al_cq.h"\r
+#include "al_debug.h"\r
+#include "al_mgr.h"\r
+#include "al_pnp.h"\r
+#include "al_qp.h"\r
+\r
+#if defined(CL_KERNEL)\r
+#include "al_cm.h"\r
+#endif\r
+#include "ib_common.h"\r
+\r
+\r
+void\r
+ci_ca_comp_cb(\r
+       IN                              void                                            *cq_context );\r
+\r
+void\r
+ci_ca_process_event_cb(\r
+       IN                              cl_async_proc_item_t*           p_async_item );\r
+\r
+void\r
+ca_process_async_event_cb(\r
+       IN              const   ib_async_event_rec_t* const     p_event_rec );\r
+\r
+void\r
+ca_async_event_cb(\r
+       IN                              ib_async_event_rec_t* const     p_event_rec );\r
+\r
+\r
+void\r
+free_ci_ca(\r
+       IN                              al_obj_t*                                       p_obj )\r
+{\r
+       al_ci_ca_t                              *p_ci_ca;\r
+\r
+       CL_ASSERT( p_obj );\r
+       p_ci_ca = PARENT_STRUCT( p_obj, al_ci_ca_t, obj );\r
+\r
+       cl_spinlock_destroy( &p_ci_ca->attr_lock );\r
+       cl_qpool_destroy( &p_ci_ca->event_pool );\r
+\r
+       if( p_ci_ca->port_array )\r
+               cl_free( p_ci_ca->port_array );\r
+\r
+       /* Free the PnP attributes buffer. */\r
+       if( p_ci_ca->p_pnp_attr )\r
+               cl_free( p_ci_ca->p_pnp_attr );\r
+\r
+       destroy_al_obj( p_obj );\r
+       cl_free( p_ci_ca );\r
+}\r
+\r
+void\r
+add_ca(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca,\r
+       IN              const   ib_ca_handle_t                          h_ca )\r
+{\r
+       cl_spinlock_acquire( &p_ci_ca->obj.lock );\r
+       cl_qlist_insert_tail( &p_ci_ca->ca_list, &h_ca->list_item );\r
+       ref_al_obj( &p_ci_ca->obj );\r
+       cl_spinlock_release( &p_ci_ca->obj.lock );\r
+}\r
+\r
+\r
+\r
+void\r
+remove_ca(\r
+       IN              const   ib_ca_handle_t                          h_ca )\r
+{\r
+       al_ci_ca_t                      *p_ci_ca;\r
+\r
+       p_ci_ca = h_ca->obj.p_ci_ca;\r
+\r
+       cl_spinlock_acquire( &p_ci_ca->obj.lock );\r
+       cl_qlist_remove_item( &p_ci_ca->ca_list, &h_ca->list_item );\r
+       cl_spinlock_release( &p_ci_ca->obj.lock );\r
+       deref_al_obj( &p_ci_ca->obj );\r
+}\r
+\r
+\r
+\r
+void\r
+ci_ca_comp_cb(\r
+       IN                              void                                            *cq_context )\r
+{\r
+       ib_cq_handle_t                  h_cq = (ib_cq_handle_t)cq_context;\r
+\r
+       if( h_cq->h_wait_obj )\r
+               cl_waitobj_signal( h_cq->h_wait_obj );\r
+       else\r
+               h_cq->pfn_user_comp_cb( h_cq, (void*)h_cq->obj.context );\r
+}\r
+\r
+\r
+\r
+\r
+ib_api_status_t\r
+get_port_info(\r
+       IN                              al_ci_ca_t                                      *p_ci_ca )\r
+{\r
+       ib_api_status_t         status;\r
+       ib_ca_attr_t            *p_ca_attr;\r
+       uint32_t                        attr_size;\r
+       uintn_t                         i;\r
+\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+\r
+       /* Get the size of the CA attribute structure. */\r
+       status = ib_query_ca( p_ci_ca->h_ca, NULL, &attr_size );\r
+       if( status != IB_INSUFFICIENT_MEMORY )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+                       ("ib_query_ca failed with status %s.\n", ib_get_err_str(status)) );\r
+               return status;\r
+       }\r
+\r
+       /* Allocate enough space to store the attribute structure. */\r
+       p_ca_attr = cl_malloc( attr_size );\r
+       if( !p_ca_attr )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+                       ("cl_malloc failed to allocate p_ca_attr!\n") );\r
+               return IB_INSUFFICIENT_RESOURCES;\r
+       }\r
+\r
+       /* Query the CA attributes. */\r
+       status = ib_query_ca( p_ci_ca->h_ca, p_ca_attr, &attr_size );\r
+       if( status != IB_SUCCESS )\r
+       {\r
+               cl_free( p_ca_attr );\r
+\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+                       ("ib_query_ca failed with status %s.\n", ib_get_err_str(status)) );\r
+               return status;\r
+       }\r
+\r
+       /* Allocate the port GUID array. */\r
+       p_ci_ca->port_array = cl_malloc( sizeof( ib_net64_t ) *\r
+               p_ca_attr->num_ports );\r
+       if( !p_ci_ca->port_array )\r
+       {\r
+               cl_free( p_ca_attr );\r
+\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+                       ("cl_malloc failed to allocate port_array!\n") );\r
+               return IB_INSUFFICIENT_RESOURCES;\r
+       }\r
+       p_ci_ca->num_ports = p_ca_attr->num_ports;\r
+\r
+       /* Copy the necessary port information. */\r
+       for( i = 0; i < p_ca_attr->num_ports; i++ )\r
+       {\r
+               p_ci_ca->port_array[i] = p_ca_attr->p_port_attr[i].port_guid;\r
+       }\r
+\r
+       cl_free( p_ca_attr );\r
+\r
+       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+       return IB_SUCCESS;\r
+}\r
+\r
+\r
+\r
+void\r
+ci_ca_async_event(\r
+       IN              const   ib_async_event_rec_t* const     p_event_rec )\r
+{\r
+       al_obj_t*                               p_obj;\r
+       cl_pool_item_t*                 p_item;\r
+       event_item_t*                   p_event_item;\r
+\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+\r
+       CL_ASSERT( p_event_rec );\r
+\r
+       p_obj = (al_obj_t* __ptr64)p_event_rec->context;\r
+\r
+       /* Block the destruction of the object until a reference is taken. */\r
+       cl_spinlock_acquire( &p_obj->lock );\r
+       if( p_obj->state == CL_DESTROYING )\r
+       {\r
+               /* Ignore events if the object is being destroyed. */\r
+               cl_spinlock_release( &p_obj->lock );\r
+               CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+               return;\r
+       }\r
+\r
+       /*\r
+        * Get an event item from the pool.  If an object is a child of\r
+        * a CA (e.g., CQ or QP) it will have valid p_ci_ca pointer.\r
+        * For CA's, the object is the actual p_ci_ca pointer itself.\r
+        */\r
+       if( p_obj->p_ci_ca )\r
+       {\r
+               cl_spinlock_acquire( &p_obj->p_ci_ca->obj.lock );\r
+               p_item = cl_qpool_get( &p_obj->p_ci_ca->event_pool );\r
+               cl_spinlock_release( &p_obj->p_ci_ca->obj.lock );\r
+       }\r
+       else\r
+       {\r
+               p_item = cl_qpool_get( &((al_ci_ca_t*)p_obj)->event_pool );\r
+       }\r
+       if( !p_item )\r
+       {\r
+               /* Could not get an item.  This event will not be reported. */\r
+               cl_spinlock_release( &p_obj->lock );\r
+               CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+               return;\r
+       }\r
+\r
+       /* Hold a reference to prevent destruction until the async_item runs. */\r
+       ref_al_obj( p_obj );\r
+\r
+       cl_spinlock_release( &p_obj->lock );\r
+\r
+       /* Initialize the item with the asynchronous event information. */\r
+       p_event_item = PARENT_STRUCT( p_item, event_item_t, async_item.pool_item );\r
+       p_event_item->event_rec.code = p_event_rec->code;\r
+       p_event_item->event_rec.context = p_event_rec->context;\r
+\r
+       /* Queue the item on the asynchronous callback thread for processing. */\r
+       p_event_item->async_item.pfn_callback = ci_ca_process_event_cb;\r
+       cl_async_proc_queue( gp_async_proc_mgr, &p_event_item->async_item );\r
+\r
+       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+}\r
+\r
+\r
+\r
+void\r
+ci_ca_process_event_cb(\r
+       IN                              cl_async_proc_item_t*           p_async_item )\r
+{\r
+       event_item_t*                   p_event_item;\r
+       al_obj_t*                               p_obj;\r
+\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+\r
+       CL_ASSERT( p_async_item );\r
+\r
+       p_event_item = PARENT_STRUCT( p_async_item, event_item_t,\r
+               async_item.pool_item );\r
+\r
+       p_obj = (al_obj_t* __ptr64)p_event_item->event_rec.context;\r
+\r
+       switch( p_event_item->event_rec.code )\r
+       {\r
+       case IB_AE_QP_COMM:\r
+       case IB_AE_QP_APM:\r
+       case IB_AE_QP_APM_ERROR:\r
+#if defined(CL_KERNEL)\r
+               cm_async_event_cb( &p_event_item->event_rec );\r
+#endif\r
+               /* Fall through next case. */\r
+\r
+       case IB_AE_QP_FATAL:\r
+       case IB_AE_RQ_ERROR:\r
+       case IB_AE_SQ_ERROR:\r
+       case IB_AE_SQ_DRAINED:\r
+       case IB_AE_WQ_REQ_ERROR:\r
+       case IB_AE_WQ_ACCESS_ERROR:\r
+               qp_async_event_cb( &p_event_item->event_rec );\r
+               break;\r
+\r
+       case IB_AE_CQ_ERROR:\r
+               cq_async_event_cb( &p_event_item->event_rec );\r
+               break;\r
+\r
+       case IB_AE_PORT_TRAP:\r
+       case IB_AE_PORT_DOWN:\r
+       case IB_AE_PORT_ACTIVE:\r
+#ifdef CL_KERNEL\r
+               /* The SMI polling routine may report a PnP event. */\r
+               force_smi_poll();\r
+#endif\r
+               /* Fall through next case. */\r
+\r
+       case IB_AE_LOCAL_FATAL:\r
+               ca_process_async_event_cb( &p_event_item->event_rec );\r
+               break;\r
+\r
+       /* Unhandled events - optional per IBA spec. */\r
+       case IB_AE_QKEY_TRAP:\r
+       case IB_AE_PKEY_TRAP:\r
+       case IB_AE_MKEY_TRAP:\r
+       case IB_AE_BKEY_TRAP:\r
+       case IB_AE_BUF_OVERRUN:\r
+       case IB_AE_LINK_INTEGRITY:\r
+       case IB_AE_FLOW_CTRL_ERROR:\r
+       case IB_AE_SYSIMG_GUID_TRAP:\r
+       default:\r
+               break;\r
+       }\r
+\r
+       /*\r
+        * Return the event item to the pool.  If an object is a child of\r
+        * a CA (e.g., CQ or QP) it will have valid p_ci_ca pointer.\r
+        * For CA's, the object is the actual p_ci_ca pointer itself.\r
+        */\r
+       if( p_obj->p_ci_ca )\r
+       {\r
+               cl_spinlock_acquire( &p_obj->p_ci_ca->obj.lock );\r
+               cl_qpool_put( &p_obj->p_ci_ca->event_pool,\r
+                       &p_event_item->async_item.pool_item );\r
+               cl_spinlock_release( &p_obj->p_ci_ca->obj.lock );\r
+       }\r
+       else\r
+       {\r
+               cl_spinlock_acquire( &p_obj->lock );\r
+               cl_qpool_put( &((al_ci_ca_t*)p_obj)->event_pool,\r
+                       &p_event_item->async_item.pool_item );\r
+               cl_spinlock_release( &p_obj->lock );\r
+       }\r
+\r
+       /* Dereference the object. */\r
+       deref_al_obj( p_obj );\r
+\r
+       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+}\r
+\r
+\r
+\r
+/*\r
+ * Process an asynchronous event on a CA.  Notify all clients of the event.\r
+ */\r
+void\r
+ca_process_async_event_cb(\r
+       IN              const   ib_async_event_rec_t* const     p_event_rec )\r
+{\r
+       al_ci_ca_t*                             p_ci_ca;\r
+       cl_list_item_t*                 p_list_item;\r
+       ib_ca_handle_t                  h_ca;\r
+       ib_async_event_rec_t    event_rec;\r
+\r
+       CL_ASSERT( p_event_rec );\r
+       p_ci_ca = (al_ci_ca_t* __ptr64)p_event_rec->context;\r
+\r
+       /* Report the CA event to all clients. */\r
+       cl_spinlock_acquire( &p_ci_ca->obj.lock );\r
+       for( p_list_item = cl_qlist_head( &p_ci_ca->ca_list );\r
+                p_list_item != cl_qlist_end( &p_ci_ca->ca_list );\r
+                p_list_item = cl_qlist_next( p_list_item ) )\r
+       {\r
+               cl_spinlock_release( &p_ci_ca->obj.lock );\r
+\r
+               h_ca = PARENT_STRUCT( p_list_item, ib_ca_t, list_item );\r
+\r
+               event_rec.handle.h_ca = h_ca;\r
+               event_rec.code = p_event_rec->code;\r
+               ca_async_event_cb( &event_rec );\r
+\r
+               cl_spinlock_acquire( &p_ci_ca->obj.lock );\r
+       }\r
+       cl_spinlock_release( &p_ci_ca->obj.lock );\r
+}\r
+\r
+\r
+\r
+/*\r
+ * Process an asynchronous event on a CA.  Notify the user of the event.\r
+ */\r
+void\r
+ca_async_event_cb(\r
+       IN                              ib_async_event_rec_t* const     p_event_rec )\r
+{\r
+       ib_ca_handle_t                  h_ca;\r
+\r
+       CL_ASSERT( p_event_rec );\r
+       h_ca = p_event_rec->handle.h_ca;\r
+\r
+       p_event_rec->context = (void*)h_ca->obj.context;\r
+       p_event_rec->handle.h_ca = h_ca;\r
+\r
+       if( h_ca->pfn_event_cb )\r
+               h_ca->pfn_event_cb( p_event_rec );\r
+}\r
+\r
+\r
+\r
+void\r
+ca_event_cb(\r
+       IN                              ib_async_event_rec_t            *p_event_rec )\r
+{\r
+       UNUSED_PARAM( p_event_rec );\r
+}\r
+\r
+\r
+\r
+/*\r
+ * Returns a port's index on its CA for the given port GUID.\r
+ */\r
+ib_api_status_t\r
+get_port_num(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca,\r
+       IN              const   ib_net64_t                                      port_guid,\r
+               OUT                     uint8_t                                         *p_port_num OPTIONAL )\r
+{\r
+       uint8_t         i;\r
+\r
+       /* Find a matching port GUID on this CI CA. */\r
+       for( i = 0; i < p_ci_ca->num_ports; i++ )\r
+       {\r
+               if( p_ci_ca->port_array[i] == port_guid )\r
+               {\r
+                       /* The port number is the index plus one. */\r
+                       if( p_port_num )\r
+                               *p_port_num = (uint8_t)(i + 1);\r
+                       return IB_SUCCESS;\r
+               }\r
+       }\r
+\r
+       /* The port GUID was not found. */\r
+       return IB_INVALID_GUID;\r
+}\r
+\r
+\r
+\r
+ib_port_attr_t*\r
+get_port_attr(\r
+       IN                              ib_ca_attr_t * const            p_ca_attr,\r
+       IN                              ib_gid_t * const                        p_gid )\r
+{\r
+       uintn_t                 port_index, gid_index;\r
+       ib_port_attr_t  *p_port_attr;\r
+\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+\r
+       if( !p_ca_attr || !p_gid )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+                       ("No p_ca_attr or p_gid.\n") );\r
+               return NULL;\r
+       }\r
+\r
+       /* Check all ports on this HCA for matching GID. */\r
+       for( port_index = 0; port_index < p_ca_attr->num_ports; port_index++ )\r
+       {\r
+               p_port_attr = &p_ca_attr->p_port_attr[port_index];\r
+\r
+               for( gid_index = 0; gid_index < p_port_attr->num_gids; gid_index++ )\r
+               {\r
+                       if( !cl_memcmp( &p_port_attr->p_gid_table[gid_index],\r
+                               p_gid, sizeof(ib_gid_t) ) )\r
+                       {\r
+                               CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+                               return p_port_attr;\r
+                       }\r
+               }\r
+       }\r
+\r
+       CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("No match found.\n") );\r
+       return NULL;\r
+}\r
+\r
+\r
+\r
+uint16_t\r
+get_pkey_index(\r
+       IN                              ib_port_attr_t * const          p_port_attr,\r
+       IN              const   uint16_t                                        pkey )\r
+{\r
+       uint16_t                        pkey_index;\r
+\r
+       if( !p_port_attr )\r
+               return BAD_PKEY_INDEX;\r
+\r
+       for( pkey_index = 0; pkey_index < p_port_attr->num_pkeys; pkey_index++ )\r
+       {\r
+               if( p_port_attr->p_pkey_table[pkey_index] == pkey )\r
+                       return pkey_index;\r
+       }\r
+       return BAD_PKEY_INDEX;\r
+}\r
+\r
+\r
+/*\r
+ * Reads the CA attributes from verbs.\r
+ */\r
+ib_api_status_t\r
+ci_ca_update_attr(\r
+       IN                              al_ci_ca_t*                                     p_ci_ca,\r
+               OUT                     ib_ca_attr_t**                          pp_old_pnp_attr )\r
+{\r
+       ib_ca_attr_t            *p_pnp_attr;\r
+       uint32_t                        attr_size;\r
+       ib_api_status_t         status;\r
+\r
+       CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );\r
+\r
+       /* Query to get the CA attributes size. */\r
+       attr_size = 0;\r
+       status = ib_query_ca( p_ci_ca->h_ca, NULL, &attr_size );\r
+       CL_ASSERT( status == IB_INSUFFICIENT_MEMORY );\r
+\r
+       /*\r
+        * Allocate the new CA attributes buffer.\r
+        * Double the buffer size for PnP and user reporting halves.\r
+        */\r
+       p_pnp_attr = (ib_ca_attr_t*)cl_zalloc( attr_size * 2 );\r
+       if( !p_pnp_attr )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_CA, g_al_dbg_lvl,\r
+                       ("Unable to allocate buffer for PnP attributes\n") );\r
+               return IB_INSUFFICIENT_MEMORY;\r
+       }\r
+\r
+       /* Read the attributes. */\r
+       status = ib_query_ca( p_ci_ca->h_ca, p_pnp_attr, &attr_size );\r
+       if( status != IB_SUCCESS )\r
+       {\r
+               CL_TRACE_EXIT( AL_DBG_CA, g_al_dbg_lvl,\r
+                       ("Unable to query attributes\n") );\r
+               cl_free( p_pnp_attr );\r
+               return status;\r
+       }\r
+\r
+       ci_ca_excl_lock_attr( p_ci_ca );\r
+       if( pp_old_pnp_attr )\r
+               *pp_old_pnp_attr = p_ci_ca->p_pnp_attr;\r
+       p_ci_ca->p_pnp_attr = p_pnp_attr;\r
+\r
+       /*\r
+        * Initialize pointer to the user reporting half.\r
+        * This buffer is used to report this CAs attributes to users.\r
+        */\r
+       p_ci_ca->p_user_attr = (ib_ca_attr_t*)(((uint8_t*)p_pnp_attr) + attr_size);\r
+       ci_ca_unlock_attr( p_ci_ca );\r
+\r
+       CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );\r
+       return IB_SUCCESS;\r
+}\r
+\r
+\r
+\r
+void\r
+ci_ca_lock_attr(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca )\r
+{\r
+       CL_ASSERT( p_ci_ca );\r
+\r
+       cl_spinlock_acquire( &p_ci_ca->attr_lock );\r
+}\r
+\r
+\r
+void\r
+ci_ca_excl_lock_attr(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca )\r
+{\r
+       CL_ASSERT( p_ci_ca );\r
+\r
+       cl_spinlock_acquire( &p_ci_ca->attr_lock );\r
+}\r
+\r
+\r
+void\r
+ci_ca_unlock_attr(\r
+       IN                              al_ci_ca_t* const                       p_ci_ca )\r
+{\r
+       CL_ASSERT( p_ci_ca );\r
+\r
+       cl_spinlock_release( &p_ci_ca->attr_lock );\r
+}\r
diff --git a/core/al/al_cm.h b/core/al/al_cm.h
new file mode 100644 (file)
index 0000000..de9b64b
--- /dev/null
@@ -0,0 +1,721 @@
+/*\r
+ * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id:$\r
+ */\r
+\r
+#if !defined(__IB_AL_CM_H__)\r
+#define __IB_AL_CM_H__\r
+\r
+\r
+#include <iba/ib_al.h>\r
+#include "al_common.h"\r
+#include <complib/cl_qlist.h>\r
+#include <complib/cl_qmap.h>\r
+#include <complib/cl_qpool.h>\r
+#include <complib/cl_timer.h>\r
+#include <complib/cl_byteswap.h>\r
+#include <complib/cl_atomic.h>\r
+#include <complib/cl_pool.h>\r
+#include <complib/cl_mutex.h>\r
+#include "al_cm_conn.h"\r
+#include "al_cm_sidr.h"\r
+\r
+\r
+\r
+\r
+/* States match CM state transition diagrams from spec. */\r
+typedef enum _cm_state\r
+{\r
+       CM_CONN_RESET,\r
+       CM_CONN_IDLE,\r
+       CM_CONN_REQ_RCVD,\r
+       CM_CONN_REQ_SENT,\r
+       CM_CONN_REQ_MRA_RCVD,\r
+       CM_CONN_REQ_MRA_SENT,\r
+       CM_CONN_REP_RCVD,\r
+       CM_CONN_REP_SENT,\r
+       CM_CONN_REP_MRA_RCVD,\r
+       CM_CONN_REP_MRA_SENT,\r
+       CM_CONN_ESTABLISHED,\r
+       CM_CONN_LAP_RCVD,\r
+       CM_CONN_LAP_SENT,\r
+       CM_CONN_LAP_MRA_RCVD,\r
+       CM_CONN_LAP_MRA_SENT,\r
+       CM_CONN_DREQ_SENT,\r
+       CM_CONN_DREQ_RCVD,\r
+       CM_CONN_DREP_SENT,\r
+       CM_CONN_TIMEWAIT,\r
+       CM_CONN_CANCELING,\r
+       CM_CONN_ERROR\r
+\r
+} cm_state_t;\r
+\r
+\r
+/*\r
+ * CM Structures.\r
+ */\r
+typedef struct _conn_req\r
+{\r
+       uint8_t                                         class_ver;\r
+\r
+       uint8_t                                         max_cm_retries;\r
+\r
+       net64_t                                         svc_id;\r
+       uint8_t                                         *p_compare_buffer;\r
+       uint32_t                                        compare_offset;\r
+       uint32_t                                        compare_length;\r
+\r
+       /* Transport type, used for peer to peer only. */\r
+       ib_qp_type_t                            xport_type;\r
+\r
+       /* Local QP number, used for REQ. */\r
+       ib_net32_t                                      local_qpn;\r
+\r
+       /* CA attributes for primary and alternate paths. */\r
+       ib_ca_attr_t                            *p_ca_attr;\r
+       /* Primary and alternate port index. */\r
+       uint8_t                                         port_idx;\r
+       uint8_t                                         alt_port_idx;\r
+\r
+       /*\r
+        * QP Modify structures filled in using received MAD information.\r
+        * While this is less memory efficient, it makes the code cleaner\r
+        * by removing the need to copy REQ and REP data to temporary fields\r
+        * and then copying again into the qp_mod structure when performing\r
+        * QP transitions.\r
+        */\r
+       ib_qp_mod_t                                     qp_mod_rtr;\r
+       ib_qp_mod_t                                     qp_mod_rts;\r
+\r
+       /* Callbacks used for establishment */\r
+       ib_pfn_cm_req_cb_t                      pfn_cm_req_cb;\r
+       ib_pfn_cm_rep_cb_t                      pfn_cm_rep_cb;\r
+       ib_pfn_cm_rtu_cb_t                      pfn_cm_rtu_cb;\r
+\r
+       /* SIDR info */\r
+       const void                                      *sidr_context;\r
+\r
+}      conn_req_t;\r
+\r
+\r
+typedef struct _al_listen\r
+{\r
+       al_obj_t                                        obj;\r
+\r
+       cl_list_item_t                          list_item;\r
+       cl_async_proc_item_t            async_item;\r
+\r
+       ib_cm_listen_t                          info;\r
+       ib_pfn_listen_err_cb_t          pfn_err_cb;\r
+       ib_api_status_t                         err_code;\r
+\r
+}      al_listen_t;\r
+\r
+\r
+/* Per-port CM object. */\r
+typedef struct _cm_port_agent\r
+{\r
+       al_obj_t                        obj;\r
+\r
+       ib_ca_handle_t          h_ca;\r
+       ib_pd_handle_t          h_pd;\r
+       ib_qp_handle_t          h_qp;\r
+       ib_pool_key_t           pool_key;\r
+       ib_mad_svc_handle_t     h_mad_svc;\r
+\r
+       uint8_t                         port_idx;\r
+\r
+       cl_spinlock_t           lock;\r
+       cl_qlist_t                      av_list;\r
+\r
+       /* save these attributes for quick lookup without query_ca */\r
+       ib_ca_attr_t            *p_ca_attr;\r
+\r
+}      cm_port_agent_t;\r
+\r
+\r
+\r
+typedef struct _al_conn\r
+{\r
+       /* Used to store connection structure with owning AL instance. */\r
+       cl_list_item_t                          al_item;\r
+       ib_al_handle_t                          h_al;\r
+       uint64_t                                        hdl;\r
+\r
+#if defined( CL_KERNEL )\r
+       cl_mutex_t                                      mutex;\r
+#else\r
+       cl_spinlock_t                           lock;\r
+#endif\r
+\r
+       /*\r
+        * Reference count to prevent connection objects from returning\r
+        * to the pool while sends are outstanding.\r
+        */\r
+       atomic32_t                                      ref_cnt;\r
+\r
+       /* Async proc item for queueing the connection object for destruction. */\r
+       cl_async_proc_item_t            destroy_item;\r
+       /* Async proc item for processing timeouts. */\r
+       cl_async_proc_item_t            timeout_item;\r
+\r
+       /* Map item for finding connections based on local/remote comm IDs. */\r
+       cl_map_item_t                           map_item;\r
+\r
+       /* Request information stored until the connection is established. */\r
+       conn_req_t                                      *p_req_info;\r
+\r
+       /* Callbacks that can be invoked once established. */\r
+       ib_pfn_cm_mra_cb_t                      pfn_cm_mra_cb;\r
+       ib_pfn_cm_lap_cb_t                      pfn_cm_lap_cb;\r
+       ib_pfn_cm_apr_cb_t                      pfn_cm_apr_cb;\r
+       ib_pfn_cm_dreq_cb_t                     pfn_cm_dreq_cb;\r
+       ib_pfn_cm_drep_cb_t                     pfn_cm_drep_cb;\r
+       ib_pfn_cm_rej_cb_t                      pfn_cm_rej_cb; /* If RTU times out */\r
+\r
+       /* Connection type */\r
+       ib_qp_type_t                            qp_type;\r
+\r
+       /* Communication ID's for the connection. */\r
+       ib_net32_t                                      local_comm_id;\r
+       ib_net32_t                                      remote_comm_id;\r
+\r
+       ib_net64_t                                      remote_ca_guid;\r
+\r
+       /* Remote QP, used for stale connection checking. */\r
+       ib_net32_t                                      remote_qpn;\r
+\r
+       /*\r
+        * Local QP number, used for the "additional check" required\r
+        * of the DREQ.\r
+        */\r
+       ib_net32_t                                      local_qpn;\r
+\r
+       /*\r
+        * Primary and alternate path info, used to create the address vectors for\r
+        * sending MADs, to locate the port CM agent to use for outgoing sends,\r
+        * and for creating the address vectors for transitioning QPs.\r
+        */\r
+       ib_path_rec_t                           path[2];\r
+       uint8_t                                         idx_primary;\r
+\r
+       /*\r
+        * New proposed alternate path.  Need to keep this from when we\r
+        * send/receive the LAP to when we receive/send the APR and load the path.\r
+        */\r
+       ib_path_rec_t                           new_alt_path;\r
+\r
+       /* Handle to the QP for the connection. */\r
+       ib_qp_handle_t                          h_qp;\r
+\r
+       cm_state_t                                      state;\r
+\r
+       /* Timer for managing retries and timeouts for the connection object. */\r
+       cl_timer_t                                      timer;\r
+\r
+       /*\r
+        * Flag that indicates whether a connection took the active role during\r
+        * establishment.  If this flag is FALSE, the target_ack_delay field\r
+        * should be zero.\r
+        */\r
+       //***TODO: Is a target ack delay of zero valid?  If not, this flag can be\r
+       //***TODO: merged with that field, with zero indicating that the\r
+       //***TODO: connection object took the passive role.\r
+       boolean_t                                       was_active;\r
+\r
+       /*\r
+        * Handle to the sent MAD, used for cancelling. We store the handle to\r
+        * the mad service so that we can properly cancel.  This should not be a\r
+        * problem since all outstanding sends should be completed before the\r
+        * mad service completes its destruction and the handle becomes invalid.\r
+        */\r
+       ib_mad_svc_handle_t                     h_mad_svc;\r
+       ib_mad_element_t                        *p_send_mad;\r
+\r
+       /* pointer to port_cm to handle responses */\r
+       cm_port_agent_t                         *p_port_cm;\r
+\r
+       /* Maximum retries per MAD.  Set at REQ time, stored to retry LAP. */\r
+       uint8_t                                         max_cm_retries;\r
+       /* Timeout value, in milliseconds. Set at REQ time, stored to retry LAP. */\r
+       uint32_t                                        retry_timeout;\r
+\r
+       /* Given by the REP, used for alternate path setup. */\r
+       uint8_t                                         target_ack_delay;\r
+\r
+       /* Event mechanism for synchronous connection establishment. */\r
+       cl_event_t                                      *p_sync_event;\r
+\r
+       /* Cache the last MAD sent for retransmission. */\r
+       union _mads\r
+       {\r
+               ib_mad_t                                hdr;\r
+               mad_cm_req_t                    req;\r
+               mad_cm_mra_t                    mra;\r
+               mad_cm_rej_t                    rej;\r
+               mad_cm_rep_t                    rep;\r
+               mad_cm_rtu_t                    rtu;\r
+               mad_cm_dreq_t                   dreq;\r
+               mad_cm_drep_t                   drep;\r
+               mad_cm_lap_t                    lap;\r
+               mad_cm_apr_t                    apr;\r
+               mad_cm_sidr_req_t               sidr_req;\r
+               mad_cm_sidr_rep_t               sidr_rep;\r
+\r
+       }       mads;\r
+\r
+}      al_conn_t;\r
+\r
+\r
+#define CM_CONN_POOL_MIN       (100)\r
+/*\r
+ * We reserve the upper byte of the connection ID as a revolving counter so\r
+ * that connections that are retried by the client change connection ID.\r
+ * The limit is one less than the maximum value for the lower 3-bytes because\r
+ * the connection IDs start at 1.\r
+ * See the IB spec, section 12.9.8.7 for details about REJ retry.\r
+ */\r
+#define CM_CONN_POOL_MAX       (0x00FFFFFE)\r
+#define CM_CONN_POOL_MAX_MASK  (0x00FFFFFF)\r
+#define CM_CONN_POOL_GROW      (100)\r
+#define CM_REQ_POOL_MIN                (50)\r
+#define CM_REQ_POOL_GROW       (50)\r
+\r
+\r
+#define CM_MAD_SQ_DEPTH                                (128)\r
+#define CM_MAD_RQ_DEPTH                                (1)     /* ignored. */\r
+#define CM_MAD_SQ_SGE                          (1)\r
+#define CM_MAD_RQ_SGE                          (1)     /* ignored. */\r
+\r
+\r
+/*\r
+ * Spinlock and Mutex implementations.\r
+ */\r
+#if defined( CL_KERNEL )\r
+\r
+#define cm_res_init( p_res )           cl_mutex_init( &p_res->mutex )\r
+#define cm_res_destroy( p_res )                cl_mutex_destroy( &p_res->mutex )\r
+#define cm_res_acquire( p_res )                cl_mutex_acquire( &p_res->mutex )\r
+#define cm_res_release( p_res )                cl_mutex_release( &p_res->mutex )\r
+\r
+#else\r
+\r
+#define cm_res_init( p_res )           cl_spinlock_init( &p_res->lock )\r
+#define cm_res_destroy( p_res )                cl_spinlock_destroy( &p_res->lock )\r
+#define cm_res_acquire( p_res )                cl_spinlock_acquire( &p_res->lock )\r
+#define cm_res_release( p_res )                cl_spinlock_release( &p_res->lock )\r
+\r
+#endif\r
+\r
+/*\r
+ * Global CM agent instance, creation, destruction.\r
+ */\r
+\r
+/* Global connection manager object. */\r
+typedef struct _al_cm_agent\r
+{\r
+       al_obj_t                obj;\r
+\r
+       /* List of active listens. */\r
+       cl_qlist_t              active_listen_list;\r
+       /*\r
+        * List of listens that are in the process of being cancelled or in error.\r
+        */\r
+       cl_qlist_t              inactive_listen_list;\r
+\r
+       /* List of pending connections. */\r
+       cl_qlist_t              pending_list;\r
+       /* Map of established connections.  Key is local+remote comm ID. */\r
+       cl_qmap_t               conn_map;\r
+       /* List of connection in the time wait state. */\r
+       cl_qlist_t              time_wait_list;\r
+\r
+       cl_qpool_t              conn_pool;\r
+       cl_pool_t               req_pool;\r
+\r
+       ib_pnp_handle_t h_pnp;\r
+\r
+}      al_cm_agent_t;\r
+\r
+\r
+/*\r
+ * Structure for queuing received MADs to the asynchronous processing\r
+ * manager.\r
+ */\r
+typedef struct _cm_async_mad\r
+{\r
+       cl_async_proc_item_t    item;\r
+       cm_port_agent_t                 *p_port_cm;\r
+       ib_mad_element_t                *p_mad;\r
+\r
+}      cm_async_mad_t;\r
+\r
+/*\r
+ * Structure to queue timer item to an asynch proc\r
+ */\r
+typedef struct _cm_async_timer\r
+{\r
+       cl_async_proc_item_t    item;\r
+       al_conn_t                               *p_conn;\r
+\r
+}      cm_async_timer_t;\r
+\r
+\r
+/*\r
+ * Global definitions to commonly used cm functions\r
+ */\r
+al_conn_t*\r
+__get_conn(\r
+       IN              const   ib_al_handle_t                  h_al,\r
+       IN              const   ib_qp_type_t                    qp_type );\r
+\r
+void\r
+__ref_conn(\r
+       IN                              al_conn_t* const                        p_conn );\r
+\r
+void\r
+__deref_conn(\r
+       IN                              al_conn_t* const                        p_conn );\r
+\r
+void\r
+__release_req_info(\r
+       IN                              al_conn_t* const                        p_conn );\r
+\r
+void\r
+__process_cm_req(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__process_cm_mra(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__process_cm_rej(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__process_cm_rep(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__process_cm_rtu(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__process_cm_dreq(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__process_cm_drep(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__process_cm_lap(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__process_cm_apr(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__proc_conn_timeout(\r
+       IN                              cl_async_proc_item_t            *p_item );\r
+\r
+void\r
+__proc_lap_timeout(\r
+       IN                              cl_async_proc_item_t*           p_item );\r
+\r
+void\r
+__proc_dconn_timeout(\r
+       IN                              cl_async_proc_item_t*           p_item );\r
+\r
+void\r
+__validate_listens( void );\r
+\r
+ib_api_status_t\r
+__cm_send(\r
+       IN                              cm_port_agent_t* const          p_port_cm,\r
+       IN                              al_conn_t* const                        p_conn );\r
+\r
+ib_api_status_t\r
+__cm_send_mad(\r
+       IN                              cm_port_agent_t* const          p_port_cm,\r
+       IN                              ib_mad_element_t* const         p_mad );\r
+\r
+ib_api_status_t\r
+__cm_lap_qp(\r
+       IN                              al_conn_t* const                        p_conn );\r
+\r
+ib_api_status_t\r
+cm_conn_req(\r
+       IN              const   ib_al_handle_t                          h_al,\r
+       IN              const   ib_cm_req_t* const                      p_cm_req );\r
+\r
+ib_api_status_t\r
+cm_conn_lap(\r
+       IN              const   ib_cm_lap_t* const                      p_cm_lap );\r
+\r
+ib_api_status_t\r
+cm_conn_apr(\r
+       IN              const   ib_cm_handle_t                          h_cm_lap,\r
+       IN              const   ib_cm_apr_t* const                      p_cm_apr );\r
+\r
+ib_api_status_t\r
+cm_conn_dreq(\r
+       IN              const   ib_cm_dreq_t* const                     p_cm_dreq );\r
+\r
+ib_api_status_t\r
+cm_conn_drep(\r
+       IN              const   ib_cm_drep_t* const                     p_cm_drep,\r
+               OUT                     al_conn_t*              const           p_conn );\r
+\r
+void\r
+cm_async_event_cb(\r
+       IN              const   ib_async_event_rec_t* const     p_event_rec );\r
+\r
+//***TODO: The following two functions need to be called when the corresponding\r
+//***TODO: events occur on the QP.\r
+/*\r
+ * Called when the HCA generates the communication&nb