svn commit: r207808 - in projects/ofed/base/sys/ofed: . drivers
drivers/infiniband drivers/infiniband/core
drivers/infiniband/debug drivers/infiniband/hw
drivers/infiniband/hw/amso1100 drivers/infi...
Jeff Roberson
jeff at FreeBSD.org
Sun May 9 02:05:20 UTC 2010
Author: jeff
Date: Sun May 9 02:05:20 2010
New Revision: 207808
URL: http://svn.freebsd.org/changeset/base/207808
Log:
- Import ofed kernel sources from:
git://git.openfabrics.org/ofed_1_5/linux-2.6
revision c559c00f2fabd28ef9014422c3fb1866b9981a7b
Sponsored by: Isilon Systems, iX Systems, and Panasas.
Added:
projects/ofed/base/sys/ofed/
projects/ofed/base/sys/ofed/drivers/
projects/ofed/base/sys/ofed/drivers/infiniband/
projects/ofed/base/sys/ofed/drivers/infiniband/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/core/
projects/ofed/base/sys/ofed/drivers/infiniband/core/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/core/addr.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/cache.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/cm.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/cm_msgs.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/cma.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/core_priv.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/device.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/fmr_pool.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/iwcm.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/iwcm.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/local_sa.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/mad_priv.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/mad_rmpp.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/mad_rmpp.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/multicast.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/notice.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/packer.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/sa.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/sa_query.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/smi.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/smi.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/sysfs.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/ucm.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/ucma.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/ud_header.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/umem.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/user_mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs.h
projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/uverbs_marshall.c
projects/ofed/base/sys/ofed/drivers/infiniband/core/verbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/debug/
projects/ofed/base/sys/ofed/drivers/infiniband/debug/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/debug/memtrack.c
projects/ofed/base/sys/ofed/drivers/infiniband/debug/memtrack.h
projects/ofed/base/sys/ofed/drivers/infiniband/debug/mtrack.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/Kbuild
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_ae.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_ae.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_alloc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_cm.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_cq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_intr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_mm.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_mq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_mq.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_pd.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_provider.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_provider.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_rnic.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_status.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_user.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_vq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_vq.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/amso1100/c2_wr.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_dbg.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_hal.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_resource.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/cxio_wr.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_cm.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_cm.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_cq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_ev.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_mem.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_provider.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_provider.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/iwch_user.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/cxgb3/tcb.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_av.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_classes.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_classes_pSeries.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_cq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_eq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_hca.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_irq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_irq.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_iverbs.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_mcast.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_mrmw.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_mrmw.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_pd.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_qes.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_reqs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_sqp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_tools.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ehca_uverbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/hcp_if.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/hcp_if.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/hcp_phyp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/hcp_phyp.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/hipz_fns.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/hipz_fns_core.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/hipz_hw.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ipz_pt_fn.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ehca/ipz_pt_fn.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_7220.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_common.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_cq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_debug.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_diag.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_dma.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_driver.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_eeprom.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_file_ops.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_fs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_iba6110.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_iba6120.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_iba7220.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_init_chip.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_intr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_kernel.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_keys.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_mmap.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_mr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_rc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_registers.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_ruc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_sd7220.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_sd7220_img.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_sdma.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_srq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_stats.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_sysfs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_uc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_ud.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_user_pages.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_user_sdma.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_user_sdma.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_verbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_verbs.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_wc_ppc64.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/ah.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/cq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/doorbell.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/main.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/mr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/srq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/user.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/wc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mlx4/wc.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_av.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_config_reg.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_cq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_doorbell.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_eq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_mcg.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_mr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_pd.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_profile.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_profile.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_srq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_uar.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_user.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/mthca/mthca_wqe.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_cm.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_cm.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_context.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_hw.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_hw.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_nic.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_user.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_utils.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_verbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/nes/nes_verbs.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_6120_regs.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_7220.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_7220_regs.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_7322_regs.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_common.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_cq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_debug.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_diag.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_dma.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_driver.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_eeprom.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_file_ops.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_fs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_iba6120.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_iba7220.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_iba7322.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_init.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_intr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_keys.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_mad.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_mad.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_mmap.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_mr.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_pcie.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_pio_copy.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_qp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_qsfp.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_qsfp.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_rc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_ruc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_sd7220.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_sd7220_img.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_sdma.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_srq.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_sysfs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_trace.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_trace.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_twsi.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_tx.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_uc.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_ud.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_user_pages.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_user_sdma.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_user_sdma.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_verbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_verbs.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_verbs_mcast.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_wc_pat.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_wc_pat.h
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_wc_ppc64.c
projects/ofed/base/sys/ofed/drivers/infiniband/hw/qib/qib_wc_x86_64.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/iser/
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/iser/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/iser/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/iser/iscsi_iser.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/iser/iscsi_iser.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/iser/iser_initiator.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/iser/iser_memory.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/iser/iser_verbs.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_config.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_config.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_control.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_control.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_control_pkt.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_data.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_data.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_ib.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_ib.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_main.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_multicast.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_multicast.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_netpath.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_netpath.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_stats.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_stats.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_sys.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_sys.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_trailer.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_util.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_viport.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/qlgc_vnic/vnic_viport.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_cma.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_dbg.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_proc.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_tx.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/sdp/sdp_zcopy.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srp/
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srp/Kbuild
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srp/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srp/ib_srp.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srp/ib_srp.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/ib_dm_mad.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/ib_srpt.c
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/ib_srpt.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/scst.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/scst_const.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/scst_debug.h
projects/ofed/base/sys/ofed/drivers/infiniband/ulp/srpt/scst_sgv.h
projects/ofed/base/sys/ofed/drivers/infiniband/util/
projects/ofed/base/sys/ofed/drivers/infiniband/util/Kconfig
projects/ofed/base/sys/ofed/drivers/infiniband/util/Makefile
projects/ofed/base/sys/ofed/drivers/infiniband/util/madeye.c
projects/ofed/base/sys/ofed/drivers/net/
projects/ofed/base/sys/ofed/drivers/net/mlx4/
projects/ofed/base/sys/ofed/drivers/net/mlx4/Makefile
projects/ofed/base/sys/ofed/drivers/net/mlx4/alloc.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/catas.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/cmd.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/cq.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_cq.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_ethtool.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_frag.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_main.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_netdev.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_params.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_port.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_port.h
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_resources.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_rx.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_selftest.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/en_tx.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/eq.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/fw.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/fw.h
projects/ofed/base/sys/ofed/drivers/net/mlx4/icm.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/icm.h
projects/ofed/base/sys/ofed/drivers/net/mlx4/intf.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/main.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/mcg.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/mlx4.h
projects/ofed/base/sys/ofed/drivers/net/mlx4/mlx4_en.h
projects/ofed/base/sys/ofed/drivers/net/mlx4/mr.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/pd.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/port.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/profile.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/qp.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/reset.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/sense.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/srq.c
projects/ofed/base/sys/ofed/drivers/net/mlx4/xrcd.c
projects/ofed/base/sys/ofed/include/
projects/ofed/base/sys/ofed/include/linux/
projects/ofed/base/sys/ofed/include/linux/mlx4/
projects/ofed/base/sys/ofed/include/linux/mlx4/cmd.h
projects/ofed/base/sys/ofed/include/linux/mlx4/cq.h
projects/ofed/base/sys/ofed/include/linux/mlx4/device.h
projects/ofed/base/sys/ofed/include/linux/mlx4/doorbell.h
projects/ofed/base/sys/ofed/include/linux/mlx4/driver.h
projects/ofed/base/sys/ofed/include/linux/mlx4/qp.h
projects/ofed/base/sys/ofed/include/linux/mlx4/srq.h
projects/ofed/base/sys/ofed/include/rdma/
projects/ofed/base/sys/ofed/include/rdma/Kbuild
projects/ofed/base/sys/ofed/include/rdma/ib_addr.h
projects/ofed/base/sys/ofed/include/rdma/ib_cache.h
projects/ofed/base/sys/ofed/include/rdma/ib_cm.h
projects/ofed/base/sys/ofed/include/rdma/ib_fmr_pool.h
projects/ofed/base/sys/ofed/include/rdma/ib_mad.h
projects/ofed/base/sys/ofed/include/rdma/ib_marshall.h
projects/ofed/base/sys/ofed/include/rdma/ib_pack.h
projects/ofed/base/sys/ofed/include/rdma/ib_sa.h
projects/ofed/base/sys/ofed/include/rdma/ib_smi.h
projects/ofed/base/sys/ofed/include/rdma/ib_umem.h
projects/ofed/base/sys/ofed/include/rdma/ib_user_cm.h
projects/ofed/base/sys/ofed/include/rdma/ib_user_mad.h
projects/ofed/base/sys/ofed/include/rdma/ib_user_sa.h
projects/ofed/base/sys/ofed/include/rdma/ib_user_verbs.h
projects/ofed/base/sys/ofed/include/rdma/ib_verbs.h
projects/ofed/base/sys/ofed/include/rdma/iw_cm.h
projects/ofed/base/sys/ofed/include/rdma/rdma_cm.h
projects/ofed/base/sys/ofed/include/rdma/rdma_cm_ib.h
projects/ofed/base/sys/ofed/include/rdma/rdma_user_cm.h
projects/ofed/base/sys/ofed/include/rdma/sdp_socket.h
Added: projects/ofed/base/sys/ofed/drivers/infiniband/Kconfig
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/Kconfig Sun May 9 02:05:20 2010 (r207808)
@@ -0,0 +1,66 @@
+menuconfig INFINIBAND
+ tristate "InfiniBand support"
+ depends on PCI || BROKEN
+ depends on HAS_IOMEM
+ ---help---
+ Core support for InfiniBand (IB). Make sure to also select
+ any protocols you wish to use as well as drivers for your
+ InfiniBand hardware.
+
+if INFINIBAND
+
+config INFINIBAND_USER_MAD
+ tristate "InfiniBand userspace MAD support"
+ depends on INFINIBAND
+ ---help---
+ Userspace InfiniBand Management Datagram (MAD) support. This
+ is the kernel side of the userspace MAD support, which allows
+ userspace processes to send and receive MADs. You will also
+ need libibumad from <http://www.openib.org>.
+
+config INFINIBAND_USER_ACCESS
+ tristate "InfiniBand userspace access (verbs and CM)"
+ ---help---
+ Userspace InfiniBand access support. This enables the
+ kernel side of userspace verbs and the userspace
+ communication manager (CM). This allows userspace processes
+ to set up connections and directly access InfiniBand
+ hardware for fast-path operations. You will also need
+ libibverbs, libibcm and a hardware driver library from
+ <http://www.openib.org>.
+
+config INFINIBAND_USER_MEM
+ bool
+ depends on INFINIBAND_USER_ACCESS != n
+ default y
+
+config INFINIBAND_ADDR_TRANS
+ bool
+ depends on INET
+ depends on !(INFINIBAND = y && IPV6 = m)
+ default y
+
+source "drivers/infiniband/hw/mthca/Kconfig"
+source "drivers/infiniband/hw/ipath/Kconfig"
+source "drivers/infiniband/hw/qib/Kconfig"
+source "drivers/infiniband/hw/ehca/Kconfig"
+source "drivers/infiniband/hw/amso1100/Kconfig"
+source "drivers/infiniband/hw/cxgb3/Kconfig"
+source "drivers/infiniband/hw/mlx4/Kconfig"
+source "drivers/infiniband/hw/nes/Kconfig"
+
+source "drivers/infiniband/ulp/ipoib/Kconfig"
+
+source "drivers/infiniband/ulp/srp/Kconfig"
+
+source "drivers/infiniband/ulp/srpt/Kconfig"
+
+source "drivers/infiniband/ulp/iser/Kconfig"
+
+source "drivers/infiniband/ulp/sdp/Kconfig"
+
+source "drivers/infiniband/ulp/qlgc_vnic/Kconfig"
+
+source "drivers/infiniband/util/Kconfig"
+
+endif # INFINIBAND
Added: projects/ofed/base/sys/ofed/drivers/infiniband/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/Makefile Sun May 9 02:05:20 2010 (r207808)
@@ -0,0 +1,17 @@
+obj-$(CONFIG_INFINIBAND) += core/
+obj-$(CONFIG_INFINIBAND_MTHCA) += hw/mthca/
+obj-$(CONFIG_INFINIBAND_IPATH) += hw/ipath/
+obj-$(CONFIG_INFINIBAND_QIB) += hw/qib/
+obj-$(CONFIG_INFINIBAND_EHCA) += hw/ehca/
+obj-$(CONFIG_INFINIBAND_AMSO1100) += hw/amso1100/
+obj-$(CONFIG_INFINIBAND_CXGB3) += hw/cxgb3/
+obj-$(CONFIG_INFINIBAND_NES) += hw/nes/
+obj-$(CONFIG_MLX4_INFINIBAND) += hw/mlx4/
+obj-$(CONFIG_INFINIBAND_NES) += hw/nes/
+obj-$(CONFIG_INFINIBAND_IPOIB) += ulp/ipoib/
+obj-$(CONFIG_INFINIBAND_SRP) += ulp/srp/
+obj-$(CONFIG_INFINIBAND_SRPT) += ulp/srpt/
+obj-$(CONFIG_INFINIBAND_ISER) += ulp/iser/
+obj-$(CONFIG_INFINIBAND_SDP) += ulp/sdp/
+obj-$(CONFIG_INFINIBAND_QLGC_VNIC) += ulp/qlgc_vnic/
+obj-$(CONFIG_INFINIBAND_MADEYE) += util/
Added: projects/ofed/base/sys/ofed/drivers/infiniband/core/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/Makefile Sun May 9 02:05:20 2010 (r207808)
@@ -0,0 +1,32 @@
+infiniband-$(CONFIG_INFINIBAND_ADDR_TRANS) := ib_addr.o rdma_cm.o
+user_access-$(CONFIG_INFINIBAND_ADDR_TRANS) := rdma_ucm.o
+
+obj-$(CONFIG_INFINIBAND) += ib_core.o ib_mad.o ib_sa.o \
+ ib_cm.o iw_cm.o $(infiniband-y)
+obj-$(CONFIG_INFINIBAND_USER_MAD) += ib_umad.o
+obj-$(CONFIG_INFINIBAND_USER_ACCESS) += ib_uverbs.o ib_ucm.o \
+ $(user_access-y)
+
+ib_core-y := packer.o ud_header.o verbs.o sysfs.o \
+ device.o fmr_pool.o cache.o
+ib_core-$(CONFIG_INFINIBAND_USER_MEM) += umem.o
+
+ib_mad-y := mad.o smi.o agent.o mad_rmpp.o
+
+ib_sa-y := sa_query.o multicast.o notice.o local_sa.o
+
+ib_cm-y := cm.o
+
+iw_cm-y := iwcm.o
+
+rdma_cm-y := cma.o
+
+rdma_ucm-y := ucma.o
+
+ib_addr-y := addr.o
+
+ib_umad-y := user_mad.o
+
+ib_ucm-y := ucm.o
+
+ib_uverbs-y := uverbs_main.o uverbs_cmd.o uverbs_marshall.o
Added: projects/ofed/base/sys/ofed/drivers/infiniband/core/addr.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/addr.c Sun May 9 02:05:20 2010 (r207808)
@@ -0,0 +1,455 @@
+/*
+ * Copyright (c) 2005 Voltaire Inc. All rights reserved.
+ * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
+ * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved.
+ * Copyright (c) 2005 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <linux/mutex.h>
+#include <linux/inetdevice.h>
+#include <linux/workqueue.h>
+#include <net/arp.h>
+#include <net/neighbour.h>
+#include <net/route.h>
+#include <net/netevent.h>
+#include <net/addrconf.h>
+#include <net/ip6_route.h>
+#include <rdma/ib_addr.h>
+
+MODULE_AUTHOR("Sean Hefty");
+MODULE_DESCRIPTION("IB Address Translation");
+MODULE_LICENSE("Dual BSD/GPL");
+
+struct addr_req {
+ struct list_head list;
+ struct sockaddr_storage src_addr;
+ struct sockaddr_storage dst_addr;
+ struct rdma_dev_addr *addr;
+ struct rdma_addr_client *client;
+ void *context;
+ void (*callback)(int status, struct sockaddr *src_addr,
+ struct rdma_dev_addr *addr, void *context);
+ unsigned long timeout;
+ int status;
+};
+
+static void process_req(struct work_struct *work);
+
+static DEFINE_MUTEX(lock);
+static LIST_HEAD(req_list);
+static DECLARE_DELAYED_WORK(work, process_req);
+static struct workqueue_struct *addr_wq;
+
+void rdma_addr_register_client(struct rdma_addr_client *client)
+{
+ atomic_set(&client->refcount, 1);
+ init_completion(&client->comp);
+}
+EXPORT_SYMBOL(rdma_addr_register_client);
+
+static inline void put_client(struct rdma_addr_client *client)
+{
+ if (atomic_dec_and_test(&client->refcount))
+ complete(&client->comp);
+}
+
+void rdma_addr_unregister_client(struct rdma_addr_client *client)
+{
+ put_client(client);
+ wait_for_completion(&client->comp);
+}
+EXPORT_SYMBOL(rdma_addr_unregister_client);
+
+int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev,
+ const unsigned char *dst_dev_addr)
+{
+ dev_addr->dev_type = dev->type;
+ memcpy(dev_addr->src_dev_addr, dev->dev_addr, MAX_ADDR_LEN);
+ memcpy(dev_addr->broadcast, dev->broadcast, MAX_ADDR_LEN);
+ if (dst_dev_addr)
+ memcpy(dev_addr->dst_dev_addr, dst_dev_addr, MAX_ADDR_LEN);
+ dev_addr->bound_dev_if = dev->ifindex;
+ return 0;
+}
+EXPORT_SYMBOL(rdma_copy_addr);
+
+int rdma_translate_ip(struct sockaddr *addr, struct rdma_dev_addr *dev_addr)
+{
+ struct net_device *dev;
+ int ret = -EADDRNOTAVAIL;
+
+ if (dev_addr->bound_dev_if) {
+ dev = dev_get_by_index(&init_net, dev_addr->bound_dev_if);
+ if (!dev)
+ return -ENODEV;
+ ret = rdma_copy_addr(dev_addr, dev, NULL);
+ dev_put(dev);
+ return ret;
+ }
+
+ switch (addr->sa_family) {
+ case AF_INET:
+ dev = ip_dev_find(&init_net,
+ ((struct sockaddr_in *) addr)->sin_addr.s_addr);
+
+ if (!dev)
+ return ret;
+
+ ret = rdma_copy_addr(dev_addr, dev, NULL);
+ dev_put(dev);
+ break;
+
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+ case AF_INET6:
+ read_lock(&dev_base_lock);
+ for_each_netdev(&init_net, dev) {
+ if (ipv6_chk_addr(&init_net,
+ &((struct sockaddr_in6 *) addr)->sin6_addr,
+ dev, 1)) {
+ ret = rdma_copy_addr(dev_addr, dev, NULL);
+ break;
+ }
+ }
+ read_unlock(&dev_base_lock);
+ break;
+#endif
+ }
+ return ret;
+}
+EXPORT_SYMBOL(rdma_translate_ip);
+
+static void set_timeout(unsigned long time)
+{
+ unsigned long delay;
+
+ cancel_delayed_work(&work);
+
+ delay = time - jiffies;
+ if ((long)delay <= 0)
+ delay = 1;
+
+ queue_delayed_work(addr_wq, &work, delay);
+}
+
+static void queue_req(struct addr_req *req)
+{
+ struct addr_req *temp_req;
+
+ mutex_lock(&lock);
+ list_for_each_entry_reverse(temp_req, &req_list, list) {
+ if (time_after_eq(req->timeout, temp_req->timeout))
+ break;
+ }
+
+ list_add(&req->list, &temp_req->list);
+
+ if (req_list.next == &req->list)
+ set_timeout(req->timeout);
+ mutex_unlock(&lock);
+}
+
+static int addr4_resolve(struct sockaddr_in *src_in,
+ struct sockaddr_in *dst_in,
+ struct rdma_dev_addr *addr)
+{
+ __be32 src_ip = src_in->sin_addr.s_addr;
+ __be32 dst_ip = dst_in->sin_addr.s_addr;
+ struct flowi fl;
+ struct rtable *rt;
+ struct neighbour *neigh;
+ int ret;
+
+ memset(&fl, 0, sizeof fl);
+ fl.nl_u.ip4_u.daddr = dst_ip;
+ fl.nl_u.ip4_u.saddr = src_ip;
+ fl.oif = addr->bound_dev_if;
+
+ ret = ip_route_output_key(&init_net, &rt, &fl);
+ if (ret)
+ goto out;
+
+ src_in->sin_family = AF_INET;
+ src_in->sin_addr.s_addr = rt->rt_src;
+
+ if (rt->idev->dev->flags & IFF_LOOPBACK) {
+ ret = rdma_translate_ip((struct sockaddr *) dst_in, addr);
+ if (!ret)
+ memcpy(addr->dst_dev_addr, addr->src_dev_addr, MAX_ADDR_LEN);
+ goto put;
+ }
+
+ /* If the device does ARP internally, return 'done' */
+ if (rt->idev->dev->flags & IFF_NOARP) {
+ rdma_copy_addr(addr, rt->idev->dev, NULL);
+ goto put;
+ }
+
+ neigh = neigh_lookup(&arp_tbl, &rt->rt_gateway, rt->idev->dev);
+ if (!neigh || !(neigh->nud_state & NUD_VALID)) {
+ neigh_event_send(rt->u.dst.neighbour, NULL);
+ ret = -ENODATA;
+ if (neigh)
+ goto release;
+ goto put;
+ }
+
+ ret = rdma_copy_addr(addr, neigh->dev, neigh->ha);
+release:
+ neigh_release(neigh);
+put:
+ ip_rt_put(rt);
+out:
+ return ret;
+}
+
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+static int addr6_resolve(struct sockaddr_in6 *src_in,
+ struct sockaddr_in6 *dst_in,
+ struct rdma_dev_addr *addr)
+{
+ struct flowi fl;
+ struct neighbour *neigh;
+ struct dst_entry *dst;
+ int ret;
+
+ memset(&fl, 0, sizeof fl);
+ ipv6_addr_copy(&fl.fl6_dst, &dst_in->sin6_addr);
+ ipv6_addr_copy(&fl.fl6_src, &src_in->sin6_addr);
+ fl.oif = addr->bound_dev_if;
+
+ dst = ip6_route_output(&init_net, NULL, &fl);
+ if ((ret = dst->error))
+ goto put;
+
+ if (ipv6_addr_any(&fl.fl6_src)) {
+ ret = ipv6_dev_get_saddr(&init_net, ip6_dst_idev(dst)->dev,
+ &fl.fl6_dst, 0, &fl.fl6_src);
+ if (ret)
+ goto put;
+
+ src_in->sin6_family = AF_INET6;
+ ipv6_addr_copy(&src_in->sin6_addr, &fl.fl6_src);
+ }
+
+ if (dst->dev->flags & IFF_LOOPBACK) {
+ ret = rdma_translate_ip((struct sockaddr *) dst_in, addr);
+ if (!ret)
+ memcpy(addr->dst_dev_addr, addr->src_dev_addr, MAX_ADDR_LEN);
+ goto put;
+ }
+
+ /* If the device does ARP internally, return 'done' */
+ if (dst->dev->flags & IFF_NOARP) {
+ ret = rdma_copy_addr(addr, dst->dev, NULL);
+ goto put;
+ }
+
+ neigh = dst->neighbour;
+ if (!neigh || !(neigh->nud_state & NUD_VALID)) {
+ neigh_event_send(dst->neighbour, NULL);
+ ret = -ENODATA;
+ goto put;
+ }
+
+ ret = rdma_copy_addr(addr, dst->dev, neigh->ha);
+put:
+ dst_release(dst);
+ return ret;
+}
+#else
+static int addr6_resolve(struct sockaddr_in6 *src_in,
+ struct sockaddr_in6 *dst_in,
+ struct rdma_dev_addr *addr)
+{
+ return -EADDRNOTAVAIL;
+}
+#endif
+
+static int addr_resolve(struct sockaddr *src_in,
+ struct sockaddr *dst_in,
+ struct rdma_dev_addr *addr)
+{
+ if (src_in->sa_family == AF_INET) {
+ return addr4_resolve((struct sockaddr_in *) src_in,
+ (struct sockaddr_in *) dst_in, addr);
+ } else
+ return addr6_resolve((struct sockaddr_in6 *) src_in,
+ (struct sockaddr_in6 *) dst_in, addr);
+}
+
+static void process_req(struct work_struct *work)
+{
+ struct addr_req *req, *temp_req;
+ struct sockaddr *src_in, *dst_in;
+ struct list_head done_list;
+
+ INIT_LIST_HEAD(&done_list);
+
+ mutex_lock(&lock);
+ list_for_each_entry_safe(req, temp_req, &req_list, list) {
+ if (req->status == -ENODATA) {
+ src_in = (struct sockaddr *) &req->src_addr;
+ dst_in = (struct sockaddr *) &req->dst_addr;
+ req->status = addr_resolve(src_in, dst_in, req->addr);
+ if (req->status && time_after_eq(jiffies, req->timeout))
+ req->status = -ETIMEDOUT;
+ else if (req->status == -ENODATA)
+ continue;
+ }
+ list_move_tail(&req->list, &done_list);
+ }
+
+ if (!list_empty(&req_list)) {
+ req = list_entry(req_list.next, struct addr_req, list);
+ set_timeout(req->timeout);
+ }
+ mutex_unlock(&lock);
+
+ list_for_each_entry_safe(req, temp_req, &done_list, list) {
+ list_del(&req->list);
+ req->callback(req->status, (struct sockaddr *) &req->src_addr,
+ req->addr, req->context);
+ put_client(req->client);
+ kfree(req);
+ }
+}
+
+int rdma_resolve_ip(struct rdma_addr_client *client,
+ struct sockaddr *src_addr, struct sockaddr *dst_addr,
+ struct rdma_dev_addr *addr, int timeout_ms,
+ void (*callback)(int status, struct sockaddr *src_addr,
+ struct rdma_dev_addr *addr, void *context),
+ void *context)
+{
+ struct sockaddr *src_in, *dst_in;
+ struct addr_req *req;
+ int ret = 0;
+
+ req = kzalloc(sizeof *req, GFP_KERNEL);
+ if (!req)
+ return -ENOMEM;
+
+ src_in = (struct sockaddr *) &req->src_addr;
+ dst_in = (struct sockaddr *) &req->dst_addr;
+
+ if (src_addr) {
+ if (src_addr->sa_family != dst_addr->sa_family) {
+ ret = -EINVAL;
+ goto err;
+ }
+
+ memcpy(src_in, src_addr, ip_addr_size(src_addr));
+ } else {
+ src_in->sa_family = dst_addr->sa_family;
+ }
+
+ memcpy(dst_in, dst_addr, ip_addr_size(dst_addr));
+ req->addr = addr;
+ req->callback = callback;
+ req->context = context;
+ req->client = client;
+ atomic_inc(&client->refcount);
+
+ req->status = addr_resolve(src_in, dst_in, addr);
+ switch (req->status) {
+ case 0:
+ req->timeout = jiffies;
+ queue_req(req);
+ break;
+ case -ENODATA:
+ req->timeout = msecs_to_jiffies(timeout_ms) + jiffies;
+ queue_req(req);
+ break;
+ default:
+ ret = req->status;
+ atomic_dec(&client->refcount);
+ goto err;
+ }
+ return ret;
+err:
+ kfree(req);
+ return ret;
+}
+EXPORT_SYMBOL(rdma_resolve_ip);
+
+void rdma_addr_cancel(struct rdma_dev_addr *addr)
+{
+ struct addr_req *req, *temp_req;
+
+ mutex_lock(&lock);
+ list_for_each_entry_safe(req, temp_req, &req_list, list) {
+ if (req->addr == addr) {
+ req->status = -ECANCELED;
+ req->timeout = jiffies;
+ list_move(&req->list, &req_list);
+ set_timeout(req->timeout);
+ break;
+ }
+ }
+ mutex_unlock(&lock);
+}
+EXPORT_SYMBOL(rdma_addr_cancel);
+
+static int netevent_callback(struct notifier_block *self, unsigned long event,
+ void *ctx)
+{
+ if (event == NETEVENT_NEIGH_UPDATE) {
+ struct neighbour *neigh = ctx;
+
+ if (neigh->nud_state & NUD_VALID) {
+ set_timeout(jiffies);
+ }
+ }
+ return 0;
+}
+
+static struct notifier_block nb = {
+ .notifier_call = netevent_callback
+};
+
+static int addr_init(void)
+{
+ addr_wq = create_singlethread_workqueue("ib_addr");
+ if (!addr_wq)
+ return -ENOMEM;
+
+ register_netevent_notifier(&nb);
+ return 0;
+}
+
+static void addr_cleanup(void)
+{
+ unregister_netevent_notifier(&nb);
+ destroy_workqueue(addr_wq);
+}
+
+module_init(addr_init);
+module_exit(addr_cleanup);
Added: projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.c Sun May 9 02:05:20 2010 (r207808)
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2004, 2005 Mellanox Technologies Ltd. All rights reserved.
+ * Copyright (c) 2004, 2005 Infinicon Corporation. All rights reserved.
+ * Copyright (c) 2004, 2005 Intel Corporation. All rights reserved.
+ * Copyright (c) 2004, 2005 Topspin Corporation. All rights reserved.
+ * Copyright (c) 2004-2007 Voltaire Corporation. All rights reserved.
+ * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ */
+
+#include <linux/slab.h>
+#include <linux/string.h>
+
+#include "agent.h"
+#include "smi.h"
+#include "mad_priv.h"
+
+#define SPFX "ib_agent: "
+
+struct ib_agent_port_private {
+ struct list_head port_list;
+ struct ib_mad_agent *agent[2];
+ struct ib_device *device;
+ u8 port_num;
+};
+
+static DEFINE_SPINLOCK(ib_agent_port_list_lock);
+static LIST_HEAD(ib_agent_port_list);
+
+static struct ib_agent_port_private *
+__ib_get_agent_port(struct ib_device *device, int port_num)
+{
+ struct ib_agent_port_private *entry;
+
+ list_for_each_entry(entry, &ib_agent_port_list, port_list)
+ if (entry->device == device && entry->port_num == port_num)
+ return entry;
+
+ return NULL;
+}
+
+static struct ib_agent_port_private *
+ib_get_agent_port(struct ib_device *device, int port_num)
+{
+ struct ib_agent_port_private *entry;
+ unsigned long flags;
+
+ spin_lock_irqsave(&ib_agent_port_list_lock, flags);
+ entry = __ib_get_agent_port(device, port_num);
+ spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
+ return entry;
+}
+
+void agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
+ struct ib_wc *wc, struct ib_device *device,
+ int port_num, int qpn)
+{
+ struct ib_agent_port_private *port_priv;
+ struct ib_mad_agent *agent;
+ struct ib_mad_send_buf *send_buf;
+ struct ib_ah *ah;
+ struct ib_mad_send_wr_private *mad_send_wr;
+
+ if (device->node_type == RDMA_NODE_IB_SWITCH)
+ port_priv = ib_get_agent_port(device, 0);
+ else
+ port_priv = ib_get_agent_port(device, port_num);
+
+ if (!port_priv) {
+ printk(KERN_ERR SPFX "Unable to find port agent\n");
+ return;
+ }
+
+ agent = port_priv->agent[qpn];
+ ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num);
+ if (IS_ERR(ah)) {
+ printk(KERN_ERR SPFX "ib_create_ah_from_wc error\n");
+ return;
+ }
+
+ send_buf = ib_create_send_mad(agent, wc->src_qp, wc->pkey_index, 0,
+ IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA,
+ GFP_KERNEL);
+ if (IS_ERR(send_buf)) {
+ printk(KERN_ERR SPFX "ib_create_send_mad error\n");
+ goto err1;
+ }
+
+ memcpy(send_buf->mad, mad, sizeof *mad);
+ send_buf->ah = ah;
+
+ if (device->node_type == RDMA_NODE_IB_SWITCH) {
+ mad_send_wr = container_of(send_buf,
+ struct ib_mad_send_wr_private,
+ send_buf);
+ mad_send_wr->send_wr.wr.ud.port_num = port_num;
+ }
+
+ if (ib_post_send_mad(send_buf, NULL)) {
+ printk(KERN_ERR SPFX "ib_post_send_mad error\n");
+ goto err2;
+ }
+ return;
+err2:
+ ib_free_send_mad(send_buf);
+err1:
+ ib_destroy_ah(ah);
+}
+
+static void agent_send_handler(struct ib_mad_agent *mad_agent,
+ struct ib_mad_send_wc *mad_send_wc)
+{
+ ib_destroy_ah(mad_send_wc->send_buf->ah);
+ ib_free_send_mad(mad_send_wc->send_buf);
+}
+
+int ib_agent_port_open(struct ib_device *device, int port_num)
+{
+ struct ib_agent_port_private *port_priv;
+ unsigned long flags;
+ int ret;
+
+ /* Create new device info */
+ port_priv = kzalloc(sizeof *port_priv, GFP_KERNEL);
+ if (!port_priv) {
+ printk(KERN_ERR SPFX "No memory for ib_agent_port_private\n");
+ ret = -ENOMEM;
+ goto error1;
+ }
+
+ if (rdma_port_link_layer(device, port_num) == IB_LINK_LAYER_INFINIBAND) {
+ /* Obtain send only MAD agent for SMI QP */
+ port_priv->agent[0] = ib_register_mad_agent(device, port_num,
+ IB_QPT_SMI, NULL, 0,
+ &agent_send_handler,
+ NULL, NULL);
+ if (IS_ERR(port_priv->agent[0])) {
+ ret = PTR_ERR(port_priv->agent[0]);
+ goto error2;
+ }
+ }
+
+ /* Obtain send only MAD agent for GSI QP */
+ port_priv->agent[1] = ib_register_mad_agent(device, port_num,
+ IB_QPT_GSI, NULL, 0,
+ &agent_send_handler,
+ NULL, NULL);
+ if (IS_ERR(port_priv->agent[1])) {
+ ret = PTR_ERR(port_priv->agent[1]);
+ goto error3;
+ }
+
+ port_priv->device = device;
+ port_priv->port_num = port_num;
+
+ spin_lock_irqsave(&ib_agent_port_list_lock, flags);
+ list_add_tail(&port_priv->port_list, &ib_agent_port_list);
+ spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
+
+ return 0;
+
+error3:
+ if (rdma_port_link_layer(device, port_num) == IB_LINK_LAYER_INFINIBAND)
+ ib_unregister_mad_agent(port_priv->agent[0]);
+error2:
+ kfree(port_priv);
+error1:
+ return ret;
+}
+
+int ib_agent_port_close(struct ib_device *device, int port_num)
+{
+ struct ib_agent_port_private *port_priv;
+ unsigned long flags;
+
+ spin_lock_irqsave(&ib_agent_port_list_lock, flags);
+ port_priv = __ib_get_agent_port(device, port_num);
+ if (port_priv == NULL) {
+ spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
+ printk(KERN_ERR SPFX "Port %d not found\n", port_num);
+ return -ENODEV;
+ }
+ list_del(&port_priv->port_list);
+ spin_unlock_irqrestore(&ib_agent_port_list_lock, flags);
+
+ ib_unregister_mad_agent(port_priv->agent[1]);
+ if (rdma_port_link_layer(device, port_num) == IB_LINK_LAYER_INFINIBAND)
+ ib_unregister_mad_agent(port_priv->agent[0]);
+
+ kfree(port_priv);
+ return 0;
+}
Added: projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/agent.h Sun May 9 02:05:20 2010 (r207808)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved.
+ * Copyright (c) 2004 Infinicon Corporation. All rights reserved.
+ * Copyright (c) 2004 Intel Corporation. All rights reserved.
+ * Copyright (c) 2004 Topspin Corporation. All rights reserved.
+ * Copyright (c) 2004 Voltaire Corporation. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef __AGENT_H_
+#define __AGENT_H_
+
+#include <linux/err.h>
+#include <rdma/ib_mad.h>
+
+extern int ib_agent_port_open(struct ib_device *device, int port_num);
+
+extern int ib_agent_port_close(struct ib_device *device, int port_num);
+
+extern void agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
+ struct ib_wc *wc, struct ib_device *device,
+ int port_num, int qpn);
+
+#endif /* __AGENT_H_ */
Added: projects/ofed/base/sys/ofed/drivers/infiniband/core/cache.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ofed/base/sys/ofed/drivers/infiniband/core/cache.c Sun May 9 02:05:20 2010 (r207808)
@@ -0,0 +1,397 @@
+/*
+ * Copyright (c) 2004 Topspin Communications. All rights reserved.
+ * Copyright (c) 2005 Intel Corporation. All rights reserved.
+ * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/workqueue.h>
+
+#include <rdma/ib_cache.h>
+
+#include "core_priv.h"
+
+struct ib_pkey_cache {
+ int table_len;
+ u16 table[0];
+};
+
+struct ib_gid_cache {
+ int table_len;
+ union ib_gid table[0];
+};
+
+struct ib_update_work {
+ struct work_struct work;
+ struct ib_device *device;
+ u8 port_num;
+};
+
+static inline int start_port(struct ib_device *device)
+{
+ return (device->node_type == RDMA_NODE_IB_SWITCH) ? 0 : 1;
+}
+
+static inline int end_port(struct ib_device *device)
+{
+ return (device->node_type == RDMA_NODE_IB_SWITCH) ?
+ 0 : device->phys_port_cnt;
+}
+
+int ib_get_cached_gid(struct ib_device *device,
+ u8 port_num,
+ int index,
+ union ib_gid *gid)
+{
+ struct ib_gid_cache *cache;
+ unsigned long flags;
+ int ret = 0;
+
+ if (port_num < start_port(device) || port_num > end_port(device))
+ return -EINVAL;
+
+ read_lock_irqsave(&device->cache.lock, flags);
+
+ cache = device->cache.gid_cache[port_num - start_port(device)];
+
+ if (index < 0 || index >= cache->table_len)
+ ret = -EINVAL;
+ else
+ *gid = cache->table[index];
+
+ read_unlock_irqrestore(&device->cache.lock, flags);
+
+ return ret;
+}
+EXPORT_SYMBOL(ib_get_cached_gid);
+
+int ib_find_cached_gid(struct ib_device *device,
+ union ib_gid *gid,
+ u8 *port_num,
+ u16 *index)
+{
+ struct ib_gid_cache *cache;
+ unsigned long flags;
+ int p, i;
+ int ret = -ENOENT;
+
+ *port_num = -1;
+ if (index)
+ *index = -1;
+
+ read_lock_irqsave(&device->cache.lock, flags);
+
+ for (p = 0; p <= end_port(device) - start_port(device); ++p) {
+ cache = device->cache.gid_cache[p];
+ for (i = 0; i < cache->table_len; ++i) {
+ if (!memcmp(gid, &cache->table[i], sizeof *gid)) {
+ *port_num = p + start_port(device);
+ if (index)
+ *index = i;
+ ret = 0;
+ goto found;
+ }
+ }
+ }
+found:
+ read_unlock_irqrestore(&device->cache.lock, flags);
+
+ return ret;
+}
+EXPORT_SYMBOL(ib_find_cached_gid);
+
+int ib_get_cached_pkey(struct ib_device *device,
+ u8 port_num,
+ int index,
+ u16 *pkey)
+{
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list