├── .clang-format ├── .gitignore ├── .mailmap ├── CMakeLists.txt ├── COPYING.BSD_FB ├── COPYING.BSD_MIT ├── COPYING.GPL2 ├── COPYING.md ├── Documentation ├── CMakeLists.txt ├── azure-pipelines.md ├── contributing.md ├── ibacm.md ├── ibsrpdm.md ├── libibverbs.md ├── librdmacm.md ├── pyverbs.md ├── release.md ├── rxe.md ├── stable.md ├── tag_matching.md ├── testing.md ├── udev.md └── versioning.md ├── MAINTAINERS ├── README.md ├── build.sh ├── buildlib ├── FindLDSymVer.cmake ├── FindLTTngUST.cmake ├── FindSystemd.cmake ├── FindUDev.cmake ├── Findcython.cmake ├── Findpandoc.cmake ├── Findrst2man.cmake ├── RDMA_BuildType.cmake ├── RDMA_DoFixup.cmake ├── RDMA_EnableCStd.cmake ├── RDMA_Sparse.cmake ├── azp-checkpatch ├── azure-pipelines-release.yml ├── azure-pipelines.yml ├── cbuild ├── check-build ├── config.h.in ├── const_structs.checkpatch ├── fixup-include │ ├── assert.h │ ├── linux-in.h │ ├── linux-in6.h │ ├── netlink-attr.h │ ├── netlink-msg.h │ ├── netlink-netlink.h │ ├── netlink-object-api.h │ ├── netlink-route-link-vlan.h │ ├── netlink-route-link.h │ ├── netlink-route-neighbour.h │ ├── netlink-route-route.h │ ├── netlink-route-rtnl.h │ ├── stdatomic.h │ ├── sys-auxv.h │ ├── sys-random.h │ ├── sys-stat.h │ ├── systemd-sd-daemon.h │ ├── valgrind-drd.h │ └── valgrind-memcheck.h ├── gen-sparse.py ├── make_abi_structs.py ├── pandoc-prebuilt.py ├── provider.map ├── publish_headers.cmake ├── pyverbs_functions.cmake ├── rdma_functions.cmake ├── rdma_man.cmake ├── relpath ├── sanitize_static_lib.py ├── sparse-include │ ├── 19 │ │ └── netinet-in.h.diff │ ├── 23 │ │ ├── netinet-in.h.diff │ │ └── sys-socket.h.diff │ ├── 25 │ │ └── netinet-in.h.diff │ ├── 27 │ │ ├── bits-sysmacros.h.diff │ │ ├── netinet-in.h.diff │ │ ├── stdlib.h.diff │ │ └── sys-socket.h.diff │ ├── 31 │ │ ├── bits-sysmacros.h.diff │ │ ├── netinet-in.h.diff │ │ ├── stdlib.h.diff │ │ └── sys-socket.h.diff │ ├── 35 │ │ ├── bits-sysmacros.h.diff │ │ ├── netinet-in.h.diff │ │ ├── stdlib.h.diff │ │ └── sys-socket.h.diff │ ├── endian.h │ ├── pthread.h │ └── stdatomic.h └── template.pc.in ├── ccan ├── CMakeLists.txt ├── LICENSE.CCO ├── LICENSE.MIT ├── array_size.h ├── build_assert.h ├── check_type.h ├── compiler.h ├── container_of.h ├── ilog.c ├── ilog.h ├── list.c ├── list.h ├── minmax.h ├── str.c ├── str.h └── str_debug.h ├── debian ├── .gitignore ├── changelog ├── compat ├── control ├── copyright ├── ibacm.install ├── ibacm.lintian-overrides ├── ibacm.maintscript ├── ibverbs-providers.install ├── ibverbs-providers.lintian-overrides ├── ibverbs-providers.maintscript ├── ibverbs-providers.symbols ├── ibverbs-utils.install ├── infiniband-diags.install ├── infiniband-diags.lintian-overrides ├── libibmad-dev.install ├── libibmad5.install ├── libibmad5.symbols ├── libibnetdisc-dev.install ├── libibnetdisc5.install ├── libibnetdisc5.symbols ├── libibumad-dev.install ├── libibumad3.install ├── libibumad3.symbols ├── libibverbs-dev.install ├── libibverbs1.install ├── libibverbs1.postinst ├── libibverbs1.symbols ├── librdmacm-dev.install ├── librdmacm1.install ├── librdmacm1.symbols ├── python3-pyverbs.examples ├── python3-pyverbs.install ├── rdma-core.install ├── rdma-core.lintian-overrides ├── rdma-core.maintscript ├── rdma-core.postinst ├── rdmacm-utils.install ├── rules ├── source │ └── format ├── srptools.default ├── srptools.init ├── srptools.install ├── srptools.links ├── srptools.lintian-overrides ├── srptools.postinst ├── upstream │ └── metadata └── watch ├── ibacm ├── CMakeLists.txt ├── ibacm.init.in ├── ibacm.service.in ├── ibacm.socket ├── ibacm_hosts.data ├── include │ ├── acm_mad.h │ └── infiniband │ │ └── acm_prov.h ├── linux │ └── osd.h ├── man │ ├── ib_acme.1 │ ├── ibacm.7 │ ├── ibacm.8 │ └── ibacm_prov.7.in ├── prov │ └── acmp │ │ └── src │ │ ├── acmp.c │ │ └── libibacmp.map └── src │ ├── acm.c │ ├── acm_util.c │ ├── acm_util.h │ ├── acme.c │ ├── libacm.c │ ├── libacm.h │ └── parse.c ├── infiniband-diags ├── CMakeLists.txt ├── dump_fts.c ├── etc │ ├── error_thresholds │ └── ibdiag.conf ├── ibaddr.c ├── ibcacheedit.c ├── ibccconfig.c ├── ibccquery.c ├── ibdiag_common.c ├── ibdiag_common.h ├── ibdiag_sa.c ├── ibdiag_sa.h ├── iblinkinfo.c ├── ibnetdiscover.c ├── ibping.c ├── ibportstate.c ├── ibqueryerrors.c ├── ibroute.c ├── ibsendtrap.c ├── ibstat.c ├── ibsysstat.c ├── ibtracert.c ├── man │ ├── CMakeLists.txt │ ├── check_lft_balance.8.in.rst │ ├── common │ │ ├── opt_C.rst │ │ ├── opt_D.rst │ │ ├── opt_D_with_param.rst │ │ ├── opt_G.rst │ │ ├── opt_G_with_param.rst │ │ ├── opt_K.rst │ │ ├── opt_L.rst │ │ ├── opt_P.rst │ │ ├── opt_V.rst │ │ ├── opt_cache.rst │ │ ├── opt_debug.rst │ │ ├── opt_diff.rst │ │ ├── opt_diffcheck.rst │ │ ├── opt_e.rst │ │ ├── opt_h.rst │ │ ├── opt_load-cache.rst │ │ ├── opt_node_name_map.rst │ │ ├── opt_o-outstanding_smps.rst │ │ ├── opt_ports-file.rst │ │ ├── opt_s.rst │ │ ├── opt_t.rst │ │ ├── opt_verbose.rst │ │ ├── opt_y.rst │ │ ├── opt_z-config.in.rst │ │ ├── sec_config-file.in.rst │ │ ├── sec_node-name-map.rst │ │ ├── sec_ports-file.rst │ │ ├── sec_portselection.rst │ │ └── sec_topology-file.rst │ ├── dump_fts.8.in.rst │ ├── ibaddr.8.in.rst │ ├── ibcacheedit.8.in.rst │ ├── ibccconfig.8.in.rst │ ├── ibccquery.8.in.rst │ ├── ibcheckerrors.8 │ ├── ibcheckerrs.8 │ ├── ibchecknet.8 │ ├── ibchecknode.8 │ ├── ibcheckport.8 │ ├── ibcheckportstate.8 │ ├── ibcheckportwidth.8 │ ├── ibcheckstate.8 │ ├── ibcheckwidth.8 │ ├── ibclearcounters.8 │ ├── ibclearerrors.8 │ ├── ibdatacounters.8 │ ├── ibdatacounts.8 │ ├── ibdiscover.8 │ ├── ibfindnodesusing.8.in.rst │ ├── ibhosts.8.in.rst │ ├── ibidsverify.8.in.rst │ ├── iblinkinfo.8.in.rst │ ├── ibnetdiscover.8.in.rst │ ├── ibnodes.8.in.rst │ ├── ibping.8.in.rst │ ├── ibportstate.8.in.rst │ ├── ibprintca.8 │ ├── ibprintrt.8 │ ├── ibprintswitch.8 │ ├── ibqueryerrors.8.in.rst │ ├── ibroute.8.in.rst │ ├── ibrouters.8.in.rst │ ├── ibstat.8.in.rst │ ├── ibstatus.8.in.rst │ ├── ibswitches.8.in.rst │ ├── ibswportwatch.8 │ ├── ibsysstat.8.in.rst │ ├── ibtracert.8.in.rst │ ├── infiniband-diags.8.in.rst │ ├── perfquery.8.in.rst │ ├── saquery.8.in.rst │ ├── sminfo.8.in.rst │ ├── smpdump.8.in.rst │ ├── smpquery.8.in.rst │ └── vendstat.8.in.rst ├── mcm_rereg_test.c ├── perfquery.c ├── saquery.c ├── scripts │ ├── CMakeLists.txt │ ├── IBswcountlimits.pm │ ├── check_lft_balance.pl │ ├── dump_lfts.sh.in │ ├── dump_mfts.sh.in │ ├── ibcheckerrors.in │ ├── ibcheckerrs.in │ ├── ibchecknet.in │ ├── ibchecknode.in │ ├── ibcheckport.in │ ├── ibcheckportstate.in │ ├── ibcheckportwidth.in │ ├── ibcheckstate.in │ ├── ibcheckwidth.in │ ├── ibclearcounters.in │ ├── ibclearerrors.in │ ├── ibdatacounters.in │ ├── ibdatacounts.in │ ├── ibdiscover.map │ ├── ibdiscover.pl │ ├── ibfindnodesusing.pl │ ├── ibhosts.in │ ├── ibidsverify.pl │ ├── iblinkinfo.pl.in │ ├── ibnodes.in │ ├── ibprintca.pl │ ├── ibprintrt.pl │ ├── ibprintswitch.pl │ ├── ibqueryerrors.pl.in │ ├── ibrouters.in │ ├── ibstatus │ ├── ibswitches.in │ ├── ibswportwatch.pl │ └── set_nodedesc.sh ├── sminfo.c ├── smpdump.c ├── smpquery.c └── vendstat.c ├── iwpmd ├── CMakeLists.txt ├── iwarp_pm.h ├── iwarp_pm_common.c ├── iwarp_pm_helper.c ├── iwarp_pm_server.c ├── iwpmd.8.in ├── iwpmd.conf ├── iwpmd.conf.5.in ├── iwpmd.rules ├── iwpmd.service.in ├── iwpmd_init.in └── modules-iwpmd.conf ├── kernel-boot ├── CMakeLists.txt ├── modules │ ├── infiniband.conf │ ├── iwarp.conf │ ├── opa.conf │ ├── rdma.conf │ └── roce.conf ├── persistent-ipoib.rules.in ├── rdma-description.rules ├── rdma-hw-modules.rules ├── rdma-hw.target.in ├── rdma-load-modules@.service.in ├── rdma-persistent-naming.rules ├── rdma-ulp-modules.rules ├── rdma-umad.rules └── rdma_rename.c ├── kernel-headers ├── CMakeLists.txt ├── kern-abi.c ├── linux │ ├── stddef.h │ └── vfio.h ├── rdma │ ├── bnxt_re-abi.h │ ├── cxgb4-abi.h │ ├── efa-abi.h │ ├── erdma-abi.h │ ├── hfi │ │ ├── hfi1_ioctl.h │ │ └── hfi1_user.h │ ├── hns-abi.h │ ├── ib_user_ioctl_cmds.h │ ├── ib_user_ioctl_verbs.h │ ├── ib_user_mad.h │ ├── ib_user_sa.h │ ├── ib_user_verbs.h │ ├── irdma-abi.h │ ├── mana-abi.h │ ├── mlx4-abi.h │ ├── mlx5-abi.h │ ├── mlx5_user_ioctl_cmds.h │ ├── mlx5_user_ioctl_verbs.h │ ├── mthca-abi.h │ ├── ocrdma-abi.h │ ├── qedr-abi.h │ ├── rdma_netlink.h │ ├── rdma_user_cm.h │ ├── rdma_user_ioctl.h │ ├── rdma_user_ioctl_cmds.h │ ├── rdma_user_rxe.h │ ├── rvt-abi.h │ ├── siw-abi.h │ └── vmw_pvrdma-abi.h └── update ├── libibmad ├── CMakeLists.txt ├── bm.c ├── cc.c ├── dump.c ├── fields.c ├── gs.c ├── iba_types.h ├── libibmad.map ├── mad.c ├── mad.h ├── mad_internal.h ├── mad_osd.h ├── portid.c ├── register.c ├── resolve.c ├── rpc.c ├── sa.c ├── serv.c ├── smp.c └── vendor.c ├── libibnetdisc ├── CMakeLists.txt ├── chassis.c ├── chassis.h ├── ibnetdisc.c ├── ibnetdisc.h ├── ibnetdisc_cache.c ├── ibnetdisc_osd.h ├── internal.h ├── libibnetdisc.map ├── man │ ├── CMakeLists.txt │ ├── ibnd_discover_fabric.3 │ ├── ibnd_find_node_guid.3 │ └── ibnd_iter_nodes.3 ├── query_smp.c └── tests │ └── testleaks.c ├── libibumad ├── CMakeLists.txt ├── libibumad.map ├── man │ ├── CMakeLists.txt │ ├── umad_addr_dump.3 │ ├── umad_alloc.3 │ ├── umad_class_str.3 │ ├── umad_close_port.3 │ ├── umad_debug.3 │ ├── umad_dump.3 │ ├── umad_free.3 │ ├── umad_free_ca_device_list.3.md │ ├── umad_get_ca.3 │ ├── umad_get_ca_device_list.3.md │ ├── umad_get_ca_portguids.3 │ ├── umad_get_cas_names.3 │ ├── umad_get_fd.3 │ ├── umad_get_issm_path.3 │ ├── umad_get_mad.3 │ ├── umad_get_mad_addr.3 │ ├── umad_get_pkey.3 │ ├── umad_get_port.3 │ ├── umad_get_smi_gsi_pair_by_ca_name.3 │ ├── umad_get_smi_gsi_pairs.3 │ ├── umad_init.3.md │ ├── umad_open_port.3 │ ├── umad_open_smi_port.3 │ ├── umad_poll.3 │ ├── umad_recv.3 │ ├── umad_register.3 │ ├── umad_register2.3 │ ├── umad_register_oui.3 │ ├── umad_send.3 │ ├── umad_set_addr.3 │ ├── umad_set_addr_net.3 │ ├── umad_set_grh.3 │ ├── umad_set_grh_net.3 │ ├── umad_set_pkey.3 │ ├── umad_size.3 │ ├── umad_sort_ca_device_list.3.md │ ├── umad_status.3 │ └── umad_unregister.3 ├── sysfs.c ├── sysfs.h ├── tests │ ├── CMakeLists.txt │ ├── umad_compile_test.c │ ├── umad_reg2_compat.c │ ├── umad_register2.c │ └── umad_sa_mcm_rereg_test.c ├── umad.c ├── umad.h ├── umad_cm.h ├── umad_sa.h ├── umad_sa_mcm.h ├── umad_sm.h ├── umad_str.c ├── umad_str.h └── umad_types.h ├── libibverbs ├── CMakeLists.txt ├── all_providers.c ├── arch.h ├── cmd.c ├── cmd_ah.c ├── cmd_counters.c ├── cmd_cq.c ├── cmd_device.c ├── cmd_dm.c ├── cmd_fallback.c ├── cmd_flow.c ├── cmd_flow_action.c ├── cmd_ioctl.c ├── cmd_ioctl.h ├── cmd_mr.c ├── cmd_mw.c ├── cmd_pd.c ├── cmd_qp.c ├── cmd_rwq_ind.c ├── cmd_srq.c ├── cmd_wq.c ├── cmd_write.h ├── cmd_xrcd.c ├── compat-1_0.c ├── device.c ├── driver.h ├── dummy_ops.c ├── dynamic_driver.c ├── enum_strs.c ├── examples │ ├── CMakeLists.txt │ ├── asyncwatch.c │ ├── device_list.c │ ├── devinfo.c │ ├── pingpong.c │ ├── pingpong.h │ ├── rc_pingpong.c │ ├── srq_pingpong.c │ ├── uc_pingpong.c │ ├── ud_pingpong.c │ └── xsrq_pingpong.c ├── ibdev_nl.c ├── ibverbs.h ├── init.c ├── kern-abi.h ├── libibverbs.map.in ├── man │ ├── CMakeLists.txt │ ├── ibv_advise_mr.3.md │ ├── ibv_alloc_dm.3 │ ├── ibv_alloc_mw.3 │ ├── ibv_alloc_null_mr.3.md │ ├── ibv_alloc_parent_domain.3 │ ├── ibv_alloc_pd.3 │ ├── ibv_alloc_td.3 │ ├── ibv_asyncwatch.1 │ ├── ibv_attach_counters_point_flow.3.md │ ├── ibv_attach_mcast.3.md │ ├── ibv_bind_mw.3 │ ├── ibv_create_ah.3 │ ├── ibv_create_ah_from_wc.3 │ ├── ibv_create_comp_channel.3 │ ├── ibv_create_counters.3.md │ ├── ibv_create_cq.3 │ ├── ibv_create_cq_ex.3 │ ├── ibv_create_flow.3 │ ├── ibv_create_flow_action.3.md │ ├── ibv_create_qp.3 │ ├── ibv_create_qp_ex.3 │ ├── ibv_create_rwq_ind_table.3 │ ├── ibv_create_srq.3 │ ├── ibv_create_srq_ex.3 │ ├── ibv_create_wq.3 │ ├── ibv_devices.1 │ ├── ibv_devinfo.1 │ ├── ibv_event_type_str.3.md │ ├── ibv_fork_init.3.md │ ├── ibv_get_async_event.3 │ ├── ibv_get_cq_event.3 │ ├── ibv_get_device_guid.3.md │ ├── ibv_get_device_index.3.md │ ├── ibv_get_device_list.3.md │ ├── ibv_get_device_name.3.md │ ├── ibv_get_pkey_index.3.md │ ├── ibv_get_srq_num.3.md │ ├── ibv_import_device.3.md │ ├── ibv_import_dm.3.md │ ├── ibv_import_mr.3.md │ ├── ibv_import_pd.3.md │ ├── ibv_inc_rkey.3.md │ ├── ibv_is_fork_initialized.3.md │ ├── ibv_modify_cq.3 │ ├── ibv_modify_qp.3 │ ├── ibv_modify_qp_rate_limit.3 │ ├── ibv_modify_srq.3 │ ├── ibv_modify_wq.3 │ ├── ibv_open_device.3 │ ├── ibv_open_qp.3 │ ├── ibv_open_xrcd.3 │ ├── ibv_poll_cq.3 │ ├── ibv_post_recv.3 │ ├── ibv_post_send.3 │ ├── ibv_post_srq_ops.3 │ ├── ibv_post_srq_recv.3 │ ├── ibv_query_device.3 │ ├── ibv_query_device_ex.3 │ ├── ibv_query_ece.3.md │ ├── ibv_query_gid.3.md │ ├── ibv_query_gid_ex.3.md │ ├── ibv_query_gid_table.3.md │ ├── ibv_query_pkey.3.md │ ├── ibv_query_port.3 │ ├── ibv_query_qp.3 │ ├── ibv_query_qp_data_in_order.3.md │ ├── ibv_query_rt_values_ex.3 │ ├── ibv_query_srq.3 │ ├── ibv_rate_to_mbps.3.md │ ├── ibv_rate_to_mult.3.md │ ├── ibv_rc_pingpong.1 │ ├── ibv_read_counters.3.md │ ├── ibv_reg_mr.3 │ ├── ibv_req_notify_cq.3.md │ ├── ibv_rereg_mr.3.md │ ├── ibv_resize_cq.3.md │ ├── ibv_set_ece.3.md │ ├── ibv_srq_pingpong.1 │ ├── ibv_uc_pingpong.1 │ ├── ibv_ud_pingpong.1 │ ├── ibv_wr_post.3.md │ └── ibv_xsrq_pingpong.1 ├── marshall.c ├── marshall.h ├── memory.c ├── neigh.c ├── neigh.h ├── opcode.h ├── sa-kern-abi.h ├── sa.h ├── static_driver.c ├── sysfs.c ├── tm_types.h ├── verbs.c ├── verbs.h └── verbs_api.h ├── librdmacm ├── CMakeLists.txt ├── acm.c ├── acm.h ├── addrinfo.c ├── cma.c ├── cma.h ├── docs │ └── rsocket ├── examples │ ├── CMakeLists.txt │ ├── cmatose.c │ ├── cmtime.c │ ├── common.c │ ├── common.h │ ├── mckey.c │ ├── rcopy.c │ ├── rdma_client.c │ ├── rdma_server.c │ ├── rdma_xclient.c │ ├── rdma_xserver.c │ ├── riostream.c │ ├── rping.c │ ├── rstream.c │ ├── udaddy.c │ └── udpong.c ├── ib.h ├── indexer.c ├── indexer.h ├── librdmacm.map ├── librspreload.map ├── man │ ├── CMakeLists.txt │ ├── cmtime.1 │ ├── mckey.1 │ ├── rcopy.1 │ ├── rdma_accept.3 │ ├── rdma_ack_cm_event.3 │ ├── rdma_bind_addr.3 │ ├── rdma_client.1 │ ├── rdma_cm.7 │ ├── rdma_connect.3 │ ├── rdma_create_ep.3 │ ├── rdma_create_event_channel.3 │ ├── rdma_create_id.3 │ ├── rdma_create_qp.3 │ ├── rdma_create_srq.3 │ ├── rdma_dereg_mr.3 │ ├── rdma_destroy_ep.3 │ ├── rdma_destroy_event_channel.3 │ ├── rdma_destroy_id.3 │ ├── rdma_destroy_qp.3 │ ├── rdma_destroy_srq.3 │ ├── rdma_disconnect.3 │ ├── rdma_establish.3.md │ ├── rdma_event_str.3 │ ├── rdma_free_devices.3 │ ├── rdma_freeaddrinfo.3.in.rst │ ├── rdma_get_cm_event.3 │ ├── rdma_get_devices.3 │ ├── rdma_get_dst_port.3 │ ├── rdma_get_local_addr.3 │ ├── rdma_get_peer_addr.3 │ ├── rdma_get_recv_comp.3 │ ├── rdma_get_remote_ece.3.md │ ├── rdma_get_request.3 │ ├── rdma_get_send_comp.3 │ ├── rdma_get_src_port.3 │ ├── rdma_getaddrinfo.3 │ ├── rdma_init_qp_attr.3.md │ ├── rdma_join_multicast.3 │ ├── rdma_join_multicast_ex.3 │ ├── rdma_leave_multicast.3 │ ├── rdma_listen.3 │ ├── rdma_migrate_id.3 │ ├── rdma_notify.3 │ ├── rdma_post_read.3 │ ├── rdma_post_readv.3 │ ├── rdma_post_recv.3 │ ├── rdma_post_recvv.3 │ ├── rdma_post_send.3 │ ├── rdma_post_sendv.3 │ ├── rdma_post_ud_send.3 │ ├── rdma_post_write.3 │ ├── rdma_post_writev.3 │ ├── rdma_reg_msgs.3 │ ├── rdma_reg_read.3 │ ├── rdma_reg_write.3 │ ├── rdma_reject.3 │ ├── rdma_resolve_addr.3 │ ├── rdma_resolve_route.3 │ ├── rdma_server.1 │ ├── rdma_set_local_ece.3.md │ ├── rdma_set_option.3 │ ├── rdma_xclient.1 │ ├── rdma_xserver.1 │ ├── riostream.1 │ ├── rping.1 │ ├── rsocket.7.in │ ├── rstream.1 │ ├── ucmatose.1 │ ├── udaddy.1 │ └── udpong.1 ├── preload.c ├── rdma_cma.h ├── rdma_cma_abi.h ├── rdma_verbs.h ├── rsocket.c └── rsocket.h ├── providers ├── bnxt_re │ ├── CMakeLists.txt │ ├── bnxt_re-abi.h │ ├── db.c │ ├── flush.h │ ├── main.c │ ├── main.h │ ├── memory.c │ ├── memory.h │ ├── verbs.c │ └── verbs.h ├── cxgb4 │ ├── CMakeLists.txt │ ├── cq.c │ ├── cxgb4-abi.h │ ├── dev.c │ ├── libcxgb4.h │ ├── qp.c │ ├── t4.h │ ├── t4_chip_type.h │ ├── t4_pci_id_tbl.h │ ├── t4_regs.h │ ├── t4fw_api.h │ ├── t4fw_ri_api.h │ └── verbs.c ├── efa │ ├── CMakeLists.txt │ ├── efa-abi.h │ ├── efa.c │ ├── efa.h │ ├── efa_io_defs.h │ ├── efa_io_regs_defs.h │ ├── efa_trace.c │ ├── efa_trace.h │ ├── efadv.h │ ├── libefa.map │ ├── man │ │ ├── CMakeLists.txt │ │ ├── efadv.7.md │ │ ├── efadv_create_cq.3.md │ │ ├── efadv_create_driver_qp.3.md │ │ ├── efadv_create_qp_ex.3.md │ │ ├── efadv_query_ah.3.md │ │ ├── efadv_query_device.3.md │ │ └── efadv_query_mr.3.md │ ├── verbs.c │ └── verbs.h ├── erdma │ ├── CMakeLists.txt │ ├── erdma.c │ ├── erdma.h │ ├── erdma_abi.h │ ├── erdma_db.c │ ├── erdma_db.h │ ├── erdma_hw.h │ ├── erdma_verbs.c │ └── erdma_verbs.h ├── hfi1verbs │ ├── CMakeLists.txt │ ├── hfi-abi.h │ ├── hfiverbs.c │ ├── hfiverbs.h │ └── verbs.c ├── hns │ ├── CMakeLists.txt │ ├── hns_roce_u.c │ ├── hns_roce_u.h │ ├── hns_roce_u_abi.h │ ├── hns_roce_u_buf.c │ ├── hns_roce_u_db.c │ ├── hns_roce_u_db.h │ ├── hns_roce_u_hw_v2.c │ ├── hns_roce_u_hw_v2.h │ ├── hns_roce_u_trace.c │ ├── hns_roce_u_trace.h │ ├── hns_roce_u_verbs.c │ ├── hnsdv.h │ ├── libhns.map │ └── man │ │ ├── CMakeLists.txt │ │ ├── hnsdv.7.md │ │ ├── hnsdv_create_qp.3.md │ │ ├── hnsdv_is_supported.3.md │ │ └── hnsdv_query_device.3.md ├── ipathverbs │ ├── CMakeLists.txt │ ├── COPYING │ ├── dracut_check │ ├── dracut_install │ ├── dracut_kmod │ ├── ipath-abi.h │ ├── ipathverbs.c │ ├── ipathverbs.h │ ├── truescale-serdes.cmds │ ├── truescale.conf.in │ └── verbs.c ├── irdma │ ├── CMakeLists.txt │ ├── abi.h │ ├── defs.h │ ├── i40e_devids.h │ ├── i40iw_hw.h │ ├── ice_devids.h │ ├── irdma.h │ ├── osdep.h │ ├── uk.c │ ├── umain.c │ ├── umain.h │ ├── user.h │ └── uverbs.c ├── mana │ ├── CMakeLists.txt │ ├── cq.c │ ├── doorbells.h │ ├── gdma.h │ ├── libmana.map │ ├── man │ │ ├── CMakeLists.txt │ │ ├── manadv.7.md │ │ ├── manadv_init_obj.3.md │ │ └── manadv_set_context_attr.3.md │ ├── mana.c │ ├── mana.h │ ├── manadv.c │ ├── manadv.h │ ├── qp.c │ ├── rollback.h │ ├── shadow_queue.h │ ├── wq.c │ └── wr.c ├── mlx4 │ ├── CMakeLists.txt │ ├── buf.c │ ├── cq.c │ ├── dbrec.c │ ├── libmlx4.map │ ├── man │ │ ├── CMakeLists.txt │ │ ├── mlx4dv.7 │ │ ├── mlx4dv_init_obj.3 │ │ ├── mlx4dv_query_device.3 │ │ └── mlx4dv_set_context_attr.3.md │ ├── mlx4-abi.h │ ├── mlx4.c │ ├── mlx4.conf │ ├── mlx4.h │ ├── mlx4dv.h │ ├── qp.c │ ├── srq.c │ └── verbs.c ├── mlx5 │ ├── CMakeLists.txt │ ├── buf.c │ ├── cq.c │ ├── dbrec.c │ ├── dr_action.c │ ├── dr_arg.c │ ├── dr_buddy.c │ ├── dr_crc32.c │ ├── dr_dbg.c │ ├── dr_devx.c │ ├── dr_domain.c │ ├── dr_icm_pool.c │ ├── dr_matcher.c │ ├── dr_ptrn.c │ ├── dr_rule.c │ ├── dr_send.c │ ├── dr_ste.c │ ├── dr_ste.h │ ├── dr_ste_v0.c │ ├── dr_ste_v1.c │ ├── dr_ste_v1.h │ ├── dr_ste_v2.c │ ├── dr_ste_v3.c │ ├── dr_table.c │ ├── dr_vports.c │ ├── libmlx5.map │ ├── man │ │ ├── CMakeLists.txt │ │ ├── mlx5dv.7 │ │ ├── mlx5dv_alloc_dm.3.md │ │ ├── mlx5dv_alloc_var.3.md │ │ ├── mlx5dv_create_cq.3.md │ │ ├── mlx5dv_create_flow.3.md │ │ ├── mlx5dv_create_flow_action_modify_header.3.md │ │ ├── mlx5dv_create_flow_action_packet_reformat.3.md │ │ ├── mlx5dv_create_flow_matcher.3.md │ │ ├── mlx5dv_create_mkey.3.md │ │ ├── mlx5dv_create_qp.3.md │ │ ├── mlx5dv_create_steering_anchor.3.md │ │ ├── mlx5dv_crypto_login.3.md │ │ ├── mlx5dv_crypto_login_create.3.md │ │ ├── mlx5dv_dci_stream_id_reset.3.md │ │ ├── mlx5dv_dek_create.3.md │ │ ├── mlx5dv_devx_alloc_msi_vector.3.md │ │ ├── mlx5dv_devx_alloc_uar.3.md │ │ ├── mlx5dv_devx_create_cmd_comp.3.md │ │ ├── mlx5dv_devx_create_eq.3.md │ │ ├── mlx5dv_devx_create_event_channel.3.md │ │ ├── mlx5dv_devx_get_event.3.md │ │ ├── mlx5dv_devx_obj_create.3.md │ │ ├── mlx5dv_devx_qp_modify.3.md │ │ ├── mlx5dv_devx_query_eqn.3.md │ │ ├── mlx5dv_devx_subscribe_devx_event.3.md │ │ ├── mlx5dv_devx_umem_reg.3.md │ │ ├── mlx5dv_dm_map_op_addr.3.md │ │ ├── mlx5dv_dr_flow.3.md │ │ ├── mlx5dv_dump.3.md │ │ ├── mlx5dv_flow_action_esp.3.md │ │ ├── mlx5dv_get_clock_info.3 │ │ ├── mlx5dv_get_data_direct_sysfs_path.3.md │ │ ├── mlx5dv_get_vfio_device_list.3.md │ │ ├── mlx5dv_init_obj.3 │ │ ├── mlx5dv_is_supported.3.md │ │ ├── mlx5dv_map_ah_to_qp.3.md │ │ ├── mlx5dv_mkey_check.3.md │ │ ├── mlx5dv_modify_qp_lag_port.3.md │ │ ├── mlx5dv_modify_qp_sched_elem.3.md │ │ ├── mlx5dv_modify_qp_udp_sport.3.md │ │ ├── mlx5dv_open_device.3.md │ │ ├── mlx5dv_pp_alloc.3.md │ │ ├── mlx5dv_qp_cancel_posted_send_wrs.3.md │ │ ├── mlx5dv_query_device.3 │ │ ├── mlx5dv_query_port.3.md │ │ ├── mlx5dv_query_qp_lag_port.3.md │ │ ├── mlx5dv_reg_dmabuf_mr.3.md │ │ ├── mlx5dv_reserved_qpn_alloc.3.md │ │ ├── mlx5dv_sched_node_create.3.md │ │ ├── mlx5dv_ts_to_ns.3 │ │ ├── mlx5dv_vfio_get_events_fd.3.md │ │ ├── mlx5dv_vfio_process_events.3.md │ │ ├── mlx5dv_wr_mkey_configure.3.md │ │ ├── mlx5dv_wr_post.3.md │ │ ├── mlx5dv_wr_set_mkey_crypto.3.md │ │ └── mlx5dv_wr_set_mkey_sig_block.3.md │ ├── mlx5-abi.h │ ├── mlx5.c │ ├── mlx5.h │ ├── mlx5_api.h │ ├── mlx5_ifc.h │ ├── mlx5_trace.c │ ├── mlx5_trace.h │ ├── mlx5_vfio.c │ ├── mlx5_vfio.h │ ├── mlx5dv.h │ ├── mlx5dv_dr.h │ ├── qp.c │ ├── srq.c │ ├── verbs.c │ └── wqe.h ├── mthca │ ├── CMakeLists.txt │ ├── ah.c │ ├── buf.c │ ├── cq.c │ ├── doorbell.h │ ├── memfree.c │ ├── mthca-abi.h │ ├── mthca.c │ ├── mthca.h │ ├── qp.c │ ├── srq.c │ ├── verbs.c │ └── wqe.h ├── ocrdma │ ├── CMakeLists.txt │ ├── Changelog │ ├── ocrdma_abi.h │ ├── ocrdma_main.c │ ├── ocrdma_main.h │ └── ocrdma_verbs.c ├── qedr │ ├── CMakeLists.txt │ ├── common_hsi.h │ ├── qelr.h │ ├── qelr_abi.h │ ├── qelr_chain.c │ ├── qelr_chain.h │ ├── qelr_hsi.h │ ├── qelr_hsi_rdma.h │ ├── qelr_main.c │ ├── qelr_verbs.c │ ├── qelr_verbs.h │ ├── rdma_common.h │ └── roce_common.h ├── rxe │ ├── CMakeLists.txt │ ├── man │ │ ├── CMakeLists.txt │ │ └── rxe.7 │ ├── rxe-abi.h │ ├── rxe.c │ ├── rxe.h │ ├── rxe_queue.h │ ├── rxe_trace.c │ └── rxe_trace.h ├── siw │ ├── CMakeLists.txt │ ├── siw.c │ ├── siw.h │ └── siw_abi.h └── vmw_pvrdma │ ├── CMakeLists.txt │ ├── cq.c │ ├── pvrdma-abi.h │ ├── pvrdma.h │ ├── pvrdma_main.c │ ├── pvrdma_ring.h │ ├── qp.c │ └── verbs.c ├── pyverbs ├── CMakeLists.txt ├── __init__.pxd ├── __init__.py ├── addr.pxd ├── addr.pyx ├── base.pxd ├── base.pyx ├── cm_enums.pyx ├── cmid.pxd ├── cmid.pyx ├── cq.pxd ├── cq.pyx ├── device.pxd ├── device.pyx ├── dma_util.pyx ├── dmabuf.pxd ├── dmabuf.pyx ├── dmabuf_alloc.c ├── dmabuf_alloc.h ├── dmabuf_alloc_stub.c ├── enums.pyx ├── examples │ └── ib_devices.py ├── flow.pxd ├── flow.pyx ├── fork.pyx ├── libibverbs.pxd ├── libibverbs.pyx ├── libibverbs_enums.pxd ├── libibverbs_enums.pyx ├── librdmacm.pxd ├── librdmacm.pyx ├── librdmacm_enums.pxd ├── librdmacm_enums.pyx ├── mem_alloc.pyx ├── mr.pxd ├── mr.pyx ├── pd.pxd ├── pd.pyx ├── providers │ ├── __init__.pxd │ ├── __init__.py │ ├── efa │ │ ├── CMakeLists.txt │ │ ├── __init__.pxd │ │ ├── __init__.py │ │ ├── efa_enums.pxd │ │ ├── efa_enums.pyx │ │ ├── efadv.pxd │ │ ├── efadv.pyx │ │ ├── libefa.pxd │ │ └── libefa.pyx │ └── mlx5 │ │ ├── CMakeLists.txt │ │ ├── __init__.pxd │ │ ├── __init__.py │ │ ├── dr_action.pxd │ │ ├── dr_action.pyx │ │ ├── dr_domain.pxd │ │ ├── dr_domain.pyx │ │ ├── dr_matcher.pxd │ │ ├── dr_matcher.pyx │ │ ├── dr_rule.pxd │ │ ├── dr_rule.pyx │ │ ├── dr_table.pxd │ │ ├── dr_table.pyx │ │ ├── libmlx5.pxd │ │ ├── libmlx5.pyx │ │ ├── mlx5_enums.pxd │ │ ├── mlx5_enums.pyx │ │ ├── mlx5_vfio.pxd │ │ ├── mlx5_vfio.pyx │ │ ├── mlx5dv.pxd │ │ ├── mlx5dv.pyx │ │ ├── mlx5dv_crypto.pxd │ │ ├── mlx5dv_crypto.pyx │ │ ├── mlx5dv_dmabuf.pxd │ │ ├── mlx5dv_dmabuf.pyx │ │ ├── mlx5dv_flow.pxd │ │ ├── mlx5dv_flow.pyx │ │ ├── mlx5dv_mkey.pxd │ │ ├── mlx5dv_mkey.pyx │ │ ├── mlx5dv_objects.pxd │ │ ├── mlx5dv_objects.pyx │ │ ├── mlx5dv_sched.pxd │ │ └── mlx5dv_sched.pyx ├── pyverbs_error.py ├── qp.pxd ├── qp.pyx ├── spec.pxd ├── spec.pyx ├── srq.pxd ├── srq.pyx ├── utils.py ├── wq.pxd ├── wq.pyx ├── wr.pxd ├── wr.pyx ├── xrcd.pxd └── xrcd.pyx ├── rdma-ndd ├── CMakeLists.txt ├── rdma-ndd.8.in ├── rdma-ndd.8.in.rst ├── rdma-ndd.c ├── rdma-ndd.rules └── rdma-ndd.service.in ├── redhat ├── rdma-core.spec ├── rdma.conf ├── rdma.mlx4-setup.sh ├── rdma.mlx4.conf ├── rdma.mlx4.sys.modprobe └── rdma.modules-setup.sh ├── srp_daemon ├── CMakeLists.txt ├── ibsrpdm.8 ├── modules-srp_daemon.conf ├── srp_daemon.8.in ├── srp_daemon.c ├── srp_daemon.conf ├── srp_daemon.h ├── srp_daemon.rules.in ├── srp_daemon.service.5 ├── srp_daemon.service.in ├── srp_daemon.sh.in ├── srp_daemon_port@.service.5 ├── srp_daemon_port@.service.in ├── srp_handle_traps.c ├── srp_ib_types.h ├── srp_sync.c ├── srpd.in └── start_on_all_ports.in ├── suse ├── module-setup.sh └── rdma-core.spec ├── tests ├── CMakeLists.txt ├── __init__.py ├── args_parser.py ├── base.py ├── base_rdmacm.py ├── cuda_utils.py ├── efa_base.py ├── irdma_base.py ├── mlx5_base.py ├── mlx5_prm_structs.py ├── rdmacm_utils.py ├── run_tests.py ├── test_addr.py ├── test_atomic.py ├── test_cq.py ├── test_cq_events.py ├── test_cqex.py ├── test_cuda_dmabuf.py ├── test_device.py ├── test_efa_srd.py ├── test_efadv.py ├── test_flow.py ├── test_fork.py ├── test_mlx5_cq.py ├── test_mlx5_crypto.py ├── test_mlx5_cuda_umem.py ├── test_mlx5_dc.py ├── test_mlx5_devx.py ├── test_mlx5_dm_ops.py ├── test_mlx5_dma_memcpy.py ├── test_mlx5_dmabuf.py ├── test_mlx5_dr.py ├── test_mlx5_flow.py ├── test_mlx5_huge_page.py ├── test_mlx5_lag_affinity.py ├── test_mlx5_mkey.py ├── test_mlx5_ooo_qp.py ├── test_mlx5_pp.py ├── test_mlx5_query_port.py ├── test_mlx5_raw_wqe.py ├── test_mlx5_rdma_ctrl.py ├── test_mlx5_rdmacm.py ├── test_mlx5_sched.py ├── test_mlx5_timestamp.py ├── test_mlx5_uar.py ├── test_mlx5_udp_sport.py ├── test_mlx5_var.py ├── test_mlx5_vfio.py ├── test_mr.py ├── test_odp.py ├── test_parent_domain.py ├── test_pd.py ├── test_qp.py ├── test_qpex.py ├── test_rdmacm.py ├── test_relaxed_ordering.py ├── test_rss_traffic.py ├── test_shared_pd.py ├── test_srq.py ├── test_tag_matching.py └── utils.py └── util ├── CMakeLists.txt ├── bitmap.c ├── bitmap.h ├── cl_map.c ├── cl_qmap.h ├── compiler.h ├── interval_set.c ├── interval_set.h ├── mmio.c ├── mmio.h ├── node_name_map.c ├── node_name_map.h ├── open_cdev.c ├── rdma_nl.c ├── rdma_nl.h ├── s390_mmio_insn.h ├── symver.h ├── tests ├── CMakeLists.txt └── bitmap_test.c ├── udma_barrier.h ├── util.c └── util.h /.gitignore: -------------------------------------------------------------------------------- 1 | # -*- mode: gitignore; -*- 2 | # CMake 3 | cmake_install.cmake 4 | CMakeFiles 5 | CMakeCache.txt 6 | lib*.a 7 | /bin/** 8 | /lib/** 9 | /include/** 10 | /.ninja* 11 | *.ninja 12 | Makefile 13 | 14 | # Tags 15 | TAGS 16 | .TAGS 17 | !TAGS/ 18 | tags 19 | .tags 20 | !tags/ 21 | gtags.files 22 | GTAGS 23 | GRTAGS 24 | GPATH 25 | 26 | # clangd 27 | .cache/ 28 | 29 | # cscope 30 | cscope.files 31 | cscope.out 32 | cscope.in.out 33 | cscope.po.out 34 | 35 | # Emacs 36 | *~ 37 | \#*\# 38 | /.emacs.desktop 39 | /.emacs.desktop.lock 40 | *.elc 41 | auto-save-list 42 | tramp 43 | .\#* 44 | 45 | # Org-mode 46 | .org-id-locations 47 | *_archive 48 | 49 | # flymake-mode 50 | *_flymake.* 51 | 52 | # eshell files 53 | /eshell/history 54 | /eshell/lastdir 55 | 56 | # elpa packages 57 | /elpa/ 58 | 59 | # reftex files 60 | *.rel 61 | 62 | # AUCTeX auto folder 63 | /auto/ 64 | 65 | # cask packages 66 | .cask/ 67 | 68 | # vim 69 | [._]*.s[a-w][a-z] 70 | [._]s[a-w][a-z] 71 | *.un~ 72 | Session.vim 73 | .netrwhist 74 | *~ 75 | 76 | # python 77 | *.pyc 78 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | # 2 | # This list is used by git-shortlog to fix a few botched name translations 3 | # in the git archive, either because the author's full name was messed up 4 | # and/or not always written the same way, making contributions from the 5 | # same person appearing not to be so or badly displayed. 6 | # 7 | Jason Gunthorpe 8 | Jason Gunthorpe 9 | Leon Romanovsky 10 | Leon Romanovsky 11 | Steve Wise 12 | Steve Wise 13 | -------------------------------------------------------------------------------- /COPYING.BSD_MIT: -------------------------------------------------------------------------------- 1 | OpenIB.org BSD license (MIT variant) 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | - Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | - Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /Documentation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(FILES 2 | ibacm.md 3 | ibsrpdm.md 4 | libibverbs.md 5 | librdmacm.md 6 | rxe.md 7 | udev.md 8 | tag_matching.md 9 | ../README.md 10 | ../MAINTAINERS 11 | DESTINATION "${CMAKE_INSTALL_DOCDIR}") 12 | -------------------------------------------------------------------------------- /Documentation/rxe.md: -------------------------------------------------------------------------------- 1 | # Configure Soft-RoCE (RXE): 2 | 3 | Create RXE device over network interface (e.g. eth0): 4 | 5 | # rdma link add rxe_eth0 type rxe netdev eth0 6 | 7 | Use the status command to display the current configuration: 8 | 9 | # rdma link 10 | 11 | If you are using a Mellanox HCA, make sure that the mlx4_ib/mlx5_ib kernel 12 | module is not loaded (modprobe –rv mlx4_ib) in the soft-RoCE machine. Now you 13 | have an Infiniband device called “rxe0_eth0” that can be used to run any RoCE 14 | app. 15 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | SRCDIR=`dirname $0` 5 | BUILDDIR="$SRCDIR/build" 6 | 7 | mkdir -p "$BUILDDIR" 8 | 9 | if hash cmake3 2>/dev/null; then 10 | # CentOS users are encouraged to install cmake3 from EPEL 11 | CMAKE=cmake3 12 | else 13 | CMAKE=cmake 14 | fi 15 | 16 | if hash ninja-build 2>/dev/null; then 17 | # Fedora uses this name 18 | NINJA=ninja-build 19 | elif hash ninja 2>/dev/null; then 20 | NINJA=ninja 21 | fi 22 | 23 | cd "$BUILDDIR" 24 | 25 | if [ "x$NINJA" == "x" ]; then 26 | $CMAKE -DIN_PLACE=1 ${EXTRA_CMAKE_FLAGS:-} .. 27 | make 28 | else 29 | $CMAKE -DIN_PLACE=1 -GNinja ${EXTRA_CMAKE_FLAGS:-} .. 30 | $NINJA 31 | fi 32 | -------------------------------------------------------------------------------- /buildlib/FindUDev.cmake: -------------------------------------------------------------------------------- 1 | # COPYRIGHT (c) 2016 Obsidian Research Corporation. 2 | # Licensed under BSD (MIT variant) or GPLv2. See COPYING. 3 | 4 | find_library(LIBUDEV_LIBRARY NAMES udev libudev) 5 | 6 | set(UDEV_LIBRARIES ${LIBUDEV_LIBRARY}) 7 | 8 | include(FindPackageHandleStandardArgs) 9 | find_package_handle_standard_args(UDev REQUIRED_VARS LIBUDEV_LIBRARY) 10 | 11 | mark_as_advanced(LIBUDEV_LIBRARY) 12 | -------------------------------------------------------------------------------- /buildlib/Findpandoc.cmake: -------------------------------------------------------------------------------- 1 | # COPYRIGHT (c) 2017 Mellanox Technologies Ltd 2 | # Licensed under BSD (MIT variant) or GPLv2. See COPYING. 3 | find_program(PANDOC_EXECUTABLE NAMES pandoc) 4 | 5 | if(PANDOC_EXECUTABLE) 6 | execute_process(COMMAND "${PANDOC_EXECUTABLE}" -v 7 | OUTPUT_VARIABLE _VERSION 8 | RESULT_VARIABLE _VERSION_RESULT 9 | ERROR_QUIET) 10 | 11 | if(NOT _VERSION_RESULT) 12 | string(REGEX REPLACE "^pandoc ([^\n]+)\n.*" "\\1" PANDOC_VERSION_STRING "${_VERSION}") 13 | endif() 14 | unset(_VERSION_RESULT) 15 | unset(_VERSION) 16 | endif() 17 | 18 | include(FindPackageHandleStandardArgs) 19 | find_package_handle_standard_args(pandoc REQUIRED_VARS PANDOC_EXECUTABLE PANDOC_VERSION_STRING VERSION_VAR PANDOC_VERSION_STRING) 20 | 21 | mark_as_advanced(PANDOC_EXECUTABLE) 22 | -------------------------------------------------------------------------------- /buildlib/Findrst2man.cmake: -------------------------------------------------------------------------------- 1 | # COPYRIGHT (c) 2019 Mellanox Technologies Ltd 2 | # Licensed under BSD (MIT variant) or GPLv2. See COPYING. 3 | find_program(RST2MAN_EXECUTABLE NAMES rst2man) 4 | 5 | if(RST2MAN_EXECUTABLE) 6 | execute_process(COMMAND "${RST2MAN_EXECUTABLE}" --version 7 | OUTPUT_VARIABLE _VERSION 8 | RESULT_VARIABLE _VERSION_RESULT 9 | ERROR_QUIET) 10 | 11 | if(NOT _VERSION_RESULT) 12 | string(REGEX REPLACE "^rst2man \\(Docutils ([^,]+), .*" "\\1" RST2MAN_VERSION_STRING "${_VERSION}") 13 | endif() 14 | unset(_VERSION_RESULT) 15 | unset(_VERSION) 16 | endif() 17 | 18 | include(FindPackageHandleStandardArgs) 19 | find_package_handle_standard_args(rst2man REQUIRED_VARS RST2MAN_EXECUTABLE RST2MAN_VERSION_STRING VERSION_VAR RST2MAN_VERSION_STRING) 20 | 21 | mark_as_advanced(RST2MAN_EXECUTABLE) 22 | -------------------------------------------------------------------------------- /buildlib/const_structs.checkpatch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/buildlib/const_structs.checkpatch -------------------------------------------------------------------------------- /buildlib/fixup-include/assert.h: -------------------------------------------------------------------------------- 1 | #ifndef _FIXUP_ASSERT_H 2 | #define _FIXUP_ASSERT_H 3 | 4 | #include_next 5 | 6 | /* Without C11 compiler support it is not possible to implement static_assert */ 7 | #undef static_assert 8 | #define static_assert(_cond, msg) 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /buildlib/fixup-include/linux-in.h: -------------------------------------------------------------------------------- 1 | /* if in.h can't be included just leave it empty */ 2 | #include 3 | -------------------------------------------------------------------------------- /buildlib/fixup-include/linux-in6.h: -------------------------------------------------------------------------------- 1 | /* if in6.h can't be included just leave it empty */ 2 | #include 3 | -------------------------------------------------------------------------------- /buildlib/fixup-include/netlink-msg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/buildlib/fixup-include/netlink-msg.h -------------------------------------------------------------------------------- /buildlib/fixup-include/netlink-netlink.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/buildlib/fixup-include/netlink-netlink.h -------------------------------------------------------------------------------- /buildlib/fixup-include/netlink-object-api.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/buildlib/fixup-include/netlink-object-api.h -------------------------------------------------------------------------------- /buildlib/fixup-include/netlink-route-link-vlan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/buildlib/fixup-include/netlink-route-link-vlan.h -------------------------------------------------------------------------------- /buildlib/fixup-include/netlink-route-link.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/buildlib/fixup-include/netlink-route-link.h -------------------------------------------------------------------------------- /buildlib/fixup-include/netlink-route-neighbour.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/buildlib/fixup-include/netlink-route-neighbour.h -------------------------------------------------------------------------------- /buildlib/fixup-include/netlink-route-route.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/buildlib/fixup-include/netlink-route-route.h -------------------------------------------------------------------------------- /buildlib/fixup-include/sys-auxv.h: -------------------------------------------------------------------------------- 1 | #ifndef _FIXUP_SYS_AUXV_H 2 | #define _FIXUP_SYS_AUXV_H 3 | #if defined(__s390x__) 4 | 5 | #include_next 6 | 7 | #define HWCAP_S390_PCI_MIO 2097152 8 | 9 | #endif 10 | #endif 11 | -------------------------------------------------------------------------------- /buildlib/fixup-include/sys-random.h: -------------------------------------------------------------------------------- 1 | #ifndef _FIXUP_SYS_RANDOM_H 2 | #define _FIXUP_SYS_RANDOM_H 3 | 4 | #include 5 | 6 | /* Flags for use with getrandom. */ 7 | #define GRND_NONBLOCK 0x01 8 | 9 | static inline ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) 10 | { 11 | return -1; 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /buildlib/fixup-include/sys-stat.h: -------------------------------------------------------------------------------- 1 | #ifndef _FIXUP_SYS_STAT_H 2 | #define _FIXUP_SYS_STAT_H 3 | 4 | #include_next 5 | 6 | extern int __fxstat(int __ver, int __fildes, struct stat *__stat_buf); 7 | #endif 8 | -------------------------------------------------------------------------------- /buildlib/fixup-include/systemd-sd-daemon.h: -------------------------------------------------------------------------------- 1 | #define SD_LISTEN_FDS_START 3 2 | 3 | static inline int sd_listen_fds(int unset_environment) 4 | { 5 | return 0; 6 | } 7 | 8 | static inline int sd_is_socket(int fd, int family, int type, int listening) 9 | { 10 | return 0; 11 | } 12 | 13 | static inline int sd_notify(int unset_environment, const char *state) 14 | { 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /buildlib/fixup-include/valgrind-drd.h: -------------------------------------------------------------------------------- 1 | static inline void ANNOTATE_BENIGN_RACE_SIZED(const void *mem,size_t len,const char *desc) {} 2 | #define ANNOTATE_BENIGN_RACE_SIZED ANNOTATE_BENIGN_RACE_SIZED 3 | 4 | -------------------------------------------------------------------------------- /buildlib/fixup-include/valgrind-memcheck.h: -------------------------------------------------------------------------------- 1 | static inline void VALGRIND_MAKE_MEM_DEFINED(const void *mem,size_t len) {} 2 | #define VALGRIND_MAKE_MEM_DEFINED VALGRIND_MAKE_MEM_DEFINED 3 | 4 | static inline void VALGRIND_MAKE_MEM_UNDEFINED(const void *mem,size_t len) {} 5 | #define VALGRIND_MAKE_MEM_UNDEFINED VALGRIND_MAKE_MEM_UNDEFINED 6 | -------------------------------------------------------------------------------- /buildlib/provider.map: -------------------------------------------------------------------------------- 1 | /* The providers do not export any symbols at all. Instead they rely on 2 | attribute(constructor) to cause their init function to run at dlopen 3 | time. */ 4 | { 5 | local: *; 6 | }; 7 | -------------------------------------------------------------------------------- /buildlib/publish_headers.cmake: -------------------------------------------------------------------------------- 1 | # COPYRIGHT (c) 2016 Obsidian Research Corporation. 2 | # Licensed under BSD (MIT variant) or GPLv2. See COPYING. 3 | 4 | # Same as publish_headers but does not install them during the install phase 5 | function(publish_internal_headers DEST) 6 | if(NOT ARGN) 7 | message(SEND_ERROR "Error: publish_internal_headers called without any files") 8 | return() 9 | endif() 10 | 11 | set(DDIR "${BUILD_INCLUDE}/${DEST}") 12 | file(MAKE_DIRECTORY "${DDIR}") 13 | 14 | foreach(SFIL ${ARGN}) 15 | get_filename_component(FIL ${SFIL} NAME) 16 | rdma_create_symlink("${CMAKE_CURRENT_SOURCE_DIR}/${SFIL}" "${DDIR}/${FIL}") 17 | endforeach() 18 | endfunction() 19 | 20 | # Copy headers from the source directory to the proper place in the 21 | # build/include directory. This also installs them into /usr/include/xx during 22 | # the install phase 23 | function(publish_headers DEST) 24 | publish_internal_headers("${DEST}" ${ARGN}) 25 | 26 | foreach(SFIL ${ARGN}) 27 | get_filename_component(FIL ${SFIL} NAME) 28 | install(FILES "${SFIL}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${DEST}/" RENAME "${FIL}") 29 | endforeach() 30 | endfunction() 31 | -------------------------------------------------------------------------------- /buildlib/relpath: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright 2017 Mellanox Technologies, Inc. 3 | # Licensed under BSD (MIT variant) or GPLv2. See COPYING. 4 | 5 | import os 6 | import sys 7 | 8 | print(os.path.relpath(sys.argv[1], sys.argv[2])) 9 | -------------------------------------------------------------------------------- /buildlib/sparse-include/23/sys-socket.h.diff: -------------------------------------------------------------------------------- 1 | --- /usr/include/sys/socket.h 2016-11-16 15:43:53.000000000 -0700 2 | +++ build-sparse/include/sys/socket.h 2017-03-15 12:43:28.736376893 -0600 3 | @@ -65,7 +65,7 @@ 4 | uses with any of the listed types to be allowed without complaint. 5 | G++ 2.7 does not support transparent unions so there we want the 6 | old-style declaration, too. */ 7 | -#if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU 8 | +#if 1 9 | # define __SOCKADDR_ARG struct sockaddr *__restrict 10 | # define __CONST_SOCKADDR_ARG const struct sockaddr * 11 | #else 12 | -------------------------------------------------------------------------------- /buildlib/sparse-include/27/bits-sysmacros.h.diff: -------------------------------------------------------------------------------- 1 | --- /usr/include/bits/sysmacros.h 2018-04-16 20:14:20.000000000 +0000 2 | +++ include/bits/sysmacros.h 2019-05-16 19:30:02.096174695 +0000 3 | @@ -40,8 +40,8 @@ 4 | __SYSMACROS_DECLARE_MAJOR (DECL_TEMPL) \ 5 | { \ 6 | unsigned int __major; \ 7 | - __major = ((__dev & (__dev_t) 0x00000000000fff00u) >> 8); \ 8 | - __major |= ((__dev & (__dev_t) 0xfffff00000000000u) >> 32); \ 9 | + __major = ((__dev & (__dev_t) 0x00000000000fff00ul) >> 8); \ 10 | + __major |= ((__dev & (__dev_t) 0xfffff00000000000ul) >> 32); \ 11 | return __major; \ 12 | } 13 | 14 | @@ -52,8 +52,8 @@ 15 | __SYSMACROS_DECLARE_MINOR (DECL_TEMPL) \ 16 | { \ 17 | unsigned int __minor; \ 18 | - __minor = ((__dev & (__dev_t) 0x00000000000000ffu) >> 0); \ 19 | - __minor |= ((__dev & (__dev_t) 0x00000ffffff00000u) >> 12); \ 20 | + __minor = ((__dev & (__dev_t) 0x00000000000000fful) >> 0); \ 21 | + __minor |= ((__dev & (__dev_t) 0x00000ffffff00000ul) >> 12); \ 22 | return __minor; \ 23 | } 24 | 25 | -------------------------------------------------------------------------------- /buildlib/sparse-include/27/stdlib.h.diff: -------------------------------------------------------------------------------- 1 | --- /usr/include/stdlib.h 2018-04-16 20:14:20.000000000 +0000 2 | +++ include/stdlib.h 2019-05-16 19:38:38.071615242 +0000 3 | @@ -130,6 +130,20 @@ 4 | 5 | /* Likewise for '_FloatN' and '_FloatNx'. */ 6 | 7 | +/* For whatever reason our sparse does not understand these new compiler types */ 8 | +#undef __GLIBC_USE_IEC_60559_TYPES_EXT 9 | +#define __GLIBC_USE_IEC_60559_TYPES_EXT 0 10 | +#undef __HAVE_FLOAT32 11 | +#define __HAVE_FLOAT32 0 12 | +#undef __HAVE_FLOAT32X 13 | +#define __HAVE_FLOAT32X 0 14 | +#undef __HAVE_FLOAT64 15 | +#define __HAVE_FLOAT64 0 16 | +#undef __HAVE_FLOAT64X 17 | +#define __HAVE_FLOAT64X 0 18 | +#undef __HAVE_FLOAT128 19 | +#define __HAVE_FLOAT128 0 20 | + 21 | #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) 22 | extern _Float16 strtof16 (const char *__restrict __nptr, 23 | char **__restrict __endptr) 24 | -------------------------------------------------------------------------------- /buildlib/sparse-include/27/sys-socket.h.diff: -------------------------------------------------------------------------------- 1 | --- /usr/include/sys/socket.h 2018-04-16 20:14:20.000000000 +0000 2 | +++ include/sys/socket.h 2019-05-16 19:22:42.721853727 +0000 3 | @@ -54,7 +54,7 @@ 4 | uses with any of the listed types to be allowed without complaint. 5 | G++ 2.7 does not support transparent unions so there we want the 6 | old-style declaration, too. */ 7 | -#if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU 8 | +#if 1 9 | # define __SOCKADDR_ARG struct sockaddr *__restrict 10 | # define __CONST_SOCKADDR_ARG const struct sockaddr * 11 | #else 12 | -------------------------------------------------------------------------------- /buildlib/sparse-include/31/bits-sysmacros.h.diff: -------------------------------------------------------------------------------- 1 | --- /usr/include/x86_64-linux-gnu/bits/sysmacros.h 2020-04-14 19:26:04.000000000 +0000 2 | +++ include/bits/sysmacros.h 2020-05-05 19:03:23.910980758 +0000 3 | @@ -40,8 +40,8 @@ 4 | __SYSMACROS_DECLARE_MAJOR (DECL_TEMPL) \ 5 | { \ 6 | unsigned int __major; \ 7 | - __major = ((__dev & (__dev_t) 0x00000000000fff00u) >> 8); \ 8 | - __major |= ((__dev & (__dev_t) 0xfffff00000000000u) >> 32); \ 9 | + __major = ((__dev & (__dev_t) 0x00000000000fff00ul) >> 8); \ 10 | + __major |= ((__dev & (__dev_t) 0xfffff00000000000ul) >> 32); \ 11 | return __major; \ 12 | } 13 | 14 | @@ -52,8 +52,8 @@ 15 | __SYSMACROS_DECLARE_MINOR (DECL_TEMPL) \ 16 | { \ 17 | unsigned int __minor; \ 18 | - __minor = ((__dev & (__dev_t) 0x00000000000000ffu) >> 0); \ 19 | - __minor |= ((__dev & (__dev_t) 0x00000ffffff00000u) >> 12); \ 20 | + __minor = ((__dev & (__dev_t) 0x00000000000000fful) >> 0); \ 21 | + __minor |= ((__dev & (__dev_t) 0x00000ffffff00000ul) >> 12); \ 22 | return __minor; \ 23 | } 24 | 25 | -------------------------------------------------------------------------------- /buildlib/sparse-include/31/stdlib.h.diff: -------------------------------------------------------------------------------- 1 | --- /usr/include/stdlib.h 2020-04-14 19:26:04.000000000 +0000 2 | +++ include/stdlib.h 2020-05-05 19:03:23.910980758 +0000 3 | @@ -130,6 +130,20 @@ 4 | 5 | /* Likewise for '_FloatN' and '_FloatNx'. */ 6 | 7 | +/* For whatever reason our sparse does not understand these new compiler types */ 8 | +#undef __GLIBC_USE_IEC_60559_TYPES_EXT 9 | +#define __GLIBC_USE_IEC_60559_TYPES_EXT 0 10 | +#undef __HAVE_FLOAT32 11 | +#define __HAVE_FLOAT32 0 12 | +#undef __HAVE_FLOAT32X 13 | +#define __HAVE_FLOAT32X 0 14 | +#undef __HAVE_FLOAT64 15 | +#define __HAVE_FLOAT64 0 16 | +#undef __HAVE_FLOAT64X 17 | +#define __HAVE_FLOAT64X 0 18 | +#undef __HAVE_FLOAT128 19 | +#define __HAVE_FLOAT128 0 20 | + 21 | #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT) 22 | extern _Float16 strtof16 (const char *__restrict __nptr, 23 | char **__restrict __endptr) 24 | -------------------------------------------------------------------------------- /buildlib/sparse-include/31/sys-socket.h.diff: -------------------------------------------------------------------------------- 1 | --- /usr/include/x86_64-linux-gnu/sys/socket.h 2020-04-14 19:26:04.000000000 +0000 2 | +++ include/sys/socket.h 2020-05-05 19:03:23.910980758 +0000 3 | @@ -54,7 +54,7 @@ 4 | uses with any of the listed types to be allowed without complaint. 5 | G++ 2.7 does not support transparent unions so there we want the 6 | old-style declaration, too. */ 7 | -#if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU 8 | +#if 1 9 | # define __SOCKADDR_ARG struct sockaddr *__restrict 10 | # define __CONST_SOCKADDR_ARG const struct sockaddr * 11 | #else 12 | -------------------------------------------------------------------------------- /buildlib/sparse-include/35/bits-sysmacros.h.diff: -------------------------------------------------------------------------------- 1 | --- /usr/include/x86_64-linux-gnu/bits/sysmacros.h 2022-07-06 23:23:23.000000000 +0000 2 | +++ include/bits/sysmacros.h 2022-11-25 17:37:07.471320582 +0000 3 | @@ -40,8 +40,8 @@ 4 | __SYSMACROS_DECLARE_MAJOR (DECL_TEMPL) \ 5 | { \ 6 | unsigned int __major; \ 7 | - __major = ((__dev & (__dev_t) 0x00000000000fff00u) >> 8); \ 8 | - __major |= ((__dev & (__dev_t) 0xfffff00000000000u) >> 32); \ 9 | + __major = ((__dev & (__dev_t) 0x00000000000fff00ul) >> 8); \ 10 | + __major |= ((__dev & (__dev_t) 0xfffff00000000000ul) >> 32); \ 11 | return __major; \ 12 | } 13 | 14 | @@ -52,8 +52,8 @@ 15 | __SYSMACROS_DECLARE_MINOR (DECL_TEMPL) \ 16 | { \ 17 | unsigned int __minor; \ 18 | - __minor = ((__dev & (__dev_t) 0x00000000000000ffu) >> 0); \ 19 | - __minor |= ((__dev & (__dev_t) 0x00000ffffff00000u) >> 12); \ 20 | + __minor = ((__dev & (__dev_t) 0x00000000000000fful) >> 0); \ 21 | + __minor |= ((__dev & (__dev_t) 0x00000ffffff00000ul) >> 12); \ 22 | return __minor; \ 23 | } 24 | 25 | -------------------------------------------------------------------------------- /buildlib/sparse-include/35/sys-socket.h.diff: -------------------------------------------------------------------------------- 1 | --- /usr/include/x86_64-linux-gnu/sys/socket.h 2022-07-06 23:23:23.000000000 +0000 2 | +++ include/sys/socket.h 2022-11-25 17:37:07.463320432 +0000 3 | @@ -54,7 +54,7 @@ 4 | uses with any of the listed types to be allowed without complaint. 5 | G++ 2.7 does not support transparent unions so there we want the 6 | old-style declaration, too. */ 7 | -#if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU 8 | +#if 1 9 | # define __SOCKADDR_ARG struct sockaddr *__restrict 10 | # define __CONST_SOCKADDR_ARG const struct sockaddr * 11 | #else 12 | -------------------------------------------------------------------------------- /buildlib/sparse-include/pthread.h: -------------------------------------------------------------------------------- 1 | /* COPYRIGHT (c) 2017 Obsidian Research Corporation. 2 | Licensed under BSD (MIT variant) or GPLv2. See COPYING. */ 3 | 4 | #ifndef _SPARSE_PTHREAD_H_ 5 | #define _SPARSE_PTHREAD_H_ 6 | 7 | #include_next 8 | 9 | /* Sparse complains that the glibc version of this has 0 instead of NULL */ 10 | #undef PTHREAD_MUTEX_INITIALIZER 11 | #define PTHREAD_MUTEX_INITIALIZER {} 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /buildlib/template.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: lib@PC_LIB_NAME@ 5 | Description: RDMA Core Userspace Library 6 | URL: https://github.com/linux-rdma/rdma-core 7 | Version: @PC_VERSION@ 8 | Libs: -L${libdir} -l@PC_LIB_NAME@ @PC_RPATH@ 9 | Libs.private: @PC_LIB_PRIVATE@ 10 | Requires.private: @PC_REQUIRES_PRIVATE@ 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /ccan/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | publish_internal_headers(ccan 2 | array_size.h 3 | build_assert.h 4 | check_type.h 5 | compiler.h 6 | container_of.h 7 | ilog.h 8 | list.h 9 | minmax.h 10 | str.h 11 | str_debug.h 12 | ) 13 | 14 | set(C_FILES 15 | ilog.c 16 | list.c 17 | str.c 18 | ) 19 | add_library(ccan STATIC ${C_FILES}) 20 | add_library(ccan_pic STATIC ${C_FILES}) 21 | set_property(TARGET ccan_pic PROPERTY POSITION_INDEPENDENT_CODE TRUE) 22 | -------------------------------------------------------------------------------- /ccan/LICENSE.MIT: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /ccan/array_size.h: -------------------------------------------------------------------------------- 1 | /* CC0 (Public domain) - see LICENSE file for details */ 2 | #ifndef CCAN_ARRAY_SIZE_H 3 | #define CCAN_ARRAY_SIZE_H 4 | #include "config.h" 5 | #include 6 | 7 | /** 8 | * ARRAY_SIZE - get the number of elements in a visible array 9 | * @arr: the array whose size you want. 10 | * 11 | * This does not work on pointers, or arrays declared as [], or 12 | * function parameters. With correct compiler support, such usage 13 | * will cause a build error (see build_assert). 14 | */ 15 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + _array_size_chk(arr)) 16 | 17 | #if HAVE_BUILTIN_TYPES_COMPATIBLE_P && HAVE_TYPEOF 18 | /* Two gcc extensions. 19 | * &a[0] degrades to a pointer: a different type from an array */ 20 | #define _array_size_chk(arr) \ 21 | BUILD_ASSERT_OR_ZERO(!__builtin_types_compatible_p(typeof(arr), \ 22 | typeof(&(arr)[0]))) 23 | #else 24 | #define _array_size_chk(arr) 0 25 | #endif 26 | #endif /* CCAN_ALIGNOF_H */ 27 | -------------------------------------------------------------------------------- /ccan/list.c: -------------------------------------------------------------------------------- 1 | /* Licensed under MIT - see LICENSE.MIT file for details */ 2 | #include 3 | #include 4 | #include "list.h" 5 | 6 | static void *corrupt(const char *abortstr, 7 | const struct list_node *head, 8 | const struct list_node *node, 9 | unsigned int count) 10 | { 11 | if (abortstr) { 12 | fprintf(stderr, 13 | "%s: prev corrupt in node %p (%u) of %p\n", 14 | abortstr, node, count, head); 15 | abort(); 16 | } 17 | return NULL; 18 | } 19 | 20 | struct list_node *list_check_node(const struct list_node *node, 21 | const char *abortstr) 22 | { 23 | const struct list_node *p, *n; 24 | int count = 0; 25 | 26 | for (p = node, n = node->next; n != node; p = n, n = n->next) { 27 | count++; 28 | if (n->prev != p) 29 | return corrupt(abortstr, node, n, count); 30 | } 31 | /* Check prev on head node. */ 32 | if (node->prev != p) 33 | return corrupt(abortstr, node, node, 0); 34 | 35 | return (struct list_node *)node; 36 | } 37 | 38 | struct list_head *list_check(const struct list_head *h, const char *abortstr) 39 | { 40 | if (!list_check_node(&h->n, abortstr)) 41 | return NULL; 42 | return (struct list_head *)h; 43 | } 44 | -------------------------------------------------------------------------------- /ccan/str.c: -------------------------------------------------------------------------------- 1 | /* CC0 (Public domain) - see LICENSE.CC0 file for details */ 2 | #include 3 | 4 | size_t strcount(const char *haystack, const char *needle) 5 | { 6 | size_t i = 0, nlen = strlen(needle); 7 | 8 | while ((haystack = strstr(haystack, needle)) != NULL) { 9 | i++; 10 | haystack += nlen; 11 | } 12 | return i; 13 | } 14 | -------------------------------------------------------------------------------- /ccan/str_debug.h: -------------------------------------------------------------------------------- 1 | /* CC0 (Public domain) - see LICENSE.CC0 file for details */ 2 | #ifndef CCAN_STR_DEBUG_H 3 | #define CCAN_STR_DEBUG_H 4 | 5 | /* #define CCAN_STR_DEBUG 1 */ 6 | 7 | #ifdef CCAN_STR_DEBUG 8 | /* Because we mug the real ones with macros, we need our own wrappers. */ 9 | int str_isalnum(int i); 10 | int str_isalpha(int i); 11 | int str_isascii(int i); 12 | #if HAVE_ISBLANK 13 | int str_isblank(int i); 14 | #endif 15 | int str_iscntrl(int i); 16 | int str_isdigit(int i); 17 | int str_isgraph(int i); 18 | int str_islower(int i); 19 | int str_isprint(int i); 20 | int str_ispunct(int i); 21 | int str_isspace(int i); 22 | int str_isupper(int i); 23 | int str_isxdigit(int i); 24 | 25 | char *str_strstr(const char *haystack, const char *needle); 26 | char *str_strchr(const char *s, int c); 27 | char *str_strrchr(const char *s, int c); 28 | #endif /* CCAN_STR_DEBUG */ 29 | 30 | #endif /* CCAN_STR_DEBUG_H */ 31 | -------------------------------------------------------------------------------- /debian/.gitignore: -------------------------------------------------------------------------------- 1 | /*.debhelper 2 | /*.log 3 | /*.substvars 4 | /files 5 | /ibacm/ 6 | /ibverbs-providers/ 7 | /ibverbs-utils/ 8 | /infiniband-diags/ 9 | /lib*/ 10 | /python3-pyverbs/ 11 | /rdma-core/ 12 | /rdmacm-utils/ 13 | /srptools/ 14 | /tmp/ 15 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /debian/ibacm.install: -------------------------------------------------------------------------------- 1 | lib/systemd/system/ibacm.service 2 | lib/systemd/system/ibacm.socket 3 | usr/bin/ib_acme 4 | usr/include/infiniband/acm.h 5 | usr/include/infiniband/acm_prov.h 6 | usr/lib/*/ibacm/libibacmp.so 7 | usr/sbin/ibacm 8 | usr/share/doc/rdma-core/ibacm.md usr/share/doc/ibacm/ 9 | usr/share/man/man1/ib_acme.1 10 | usr/share/man/man7/ibacm.7 11 | usr/share/man/man7/ibacm_prov.7 12 | usr/share/man/man8/ibacm.8 13 | -------------------------------------------------------------------------------- /debian/ibacm.lintian-overrides: -------------------------------------------------------------------------------- 1 | # The wantedby target rdma-hw.target is intentional (see rdma-core) 2 | ibacm: systemd-service-file-refers-to-unusual-wantedby-target rdma-hw.target [lib/systemd/system/ibacm.service] 3 | -------------------------------------------------------------------------------- /debian/ibacm.maintscript: -------------------------------------------------------------------------------- 1 | rm_conffile /etc/init.d/ibacm 19.0-1ubuntu1~ 2 | -------------------------------------------------------------------------------- /debian/ibverbs-providers.install: -------------------------------------------------------------------------------- 1 | etc/libibverbs.d/ 2 | usr/lib/*/libefa.so.* 3 | usr/lib/*/libhns.so.* 4 | usr/lib/*/libibverbs/lib*-rdmav*.so 5 | usr/lib/*/libmana.so.* 6 | usr/lib/*/libmlx4.so.* 7 | usr/lib/*/libmlx5.so.* 8 | -------------------------------------------------------------------------------- /debian/ibverbs-providers.lintian-overrides: -------------------------------------------------------------------------------- 1 | # libefa, libhns, libmana, libmlx4 and libmlx5 are ibverbs provider that provides more functions. 2 | ibverbs-providers: package-name-doesnt-match-sonames libefa1 libhns1 libmana1 libmlx4-1 libmlx5-1 3 | -------------------------------------------------------------------------------- /debian/ibverbs-providers.maintscript: -------------------------------------------------------------------------------- 1 | rm_conffile /etc/libibverbs.d/cxgb3.driver 27.0-2~ 2 | rm_conffile /etc/libibverbs.d/i40iw.driver 39.0-1~ 3 | rm_conffile /etc/libibverbs.d/nes.driver 27.0-2~ 4 | -------------------------------------------------------------------------------- /debian/ibverbs-utils.install: -------------------------------------------------------------------------------- 1 | usr/bin/ibv_asyncwatch 2 | usr/bin/ibv_devices 3 | usr/bin/ibv_devinfo 4 | usr/bin/ibv_rc_pingpong 5 | usr/bin/ibv_srq_pingpong 6 | usr/bin/ibv_uc_pingpong 7 | usr/bin/ibv_ud_pingpong 8 | usr/bin/ibv_xsrq_pingpong 9 | usr/share/man/man1/ibv_asyncwatch.1 10 | usr/share/man/man1/ibv_devices.1 11 | usr/share/man/man1/ibv_devinfo.1 12 | usr/share/man/man1/ibv_rc_pingpong.1 13 | usr/share/man/man1/ibv_srq_pingpong.1 14 | usr/share/man/man1/ibv_uc_pingpong.1 15 | usr/share/man/man1/ibv_ud_pingpong.1 16 | usr/share/man/man1/ibv_xsrq_pingpong.1 17 | -------------------------------------------------------------------------------- /debian/infiniband-diags.lintian-overrides: -------------------------------------------------------------------------------- 1 | # The infiniband-diags man page gives an overview of the available commands. 2 | infiniband-diags: spare-manual-page [usr/share/man/man8/infiniband-diags.8.gz] 3 | # For lintian < 2.115.2 4 | infiniband-diags: spare-manual-page usr/share/man/man8/infiniband-diags.8.gz 5 | -------------------------------------------------------------------------------- /debian/libibmad-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/infiniband/mad.h 2 | usr/include/infiniband/mad_osd.h 3 | usr/lib/*/libibmad*.a 4 | usr/lib/*/libibmad*.so 5 | usr/lib/*/pkgconfig/libibmad.pc 6 | -------------------------------------------------------------------------------- /debian/libibmad5.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libibmad*.so.* 2 | -------------------------------------------------------------------------------- /debian/libibnetdisc-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/infiniband/ibnetdisc* 2 | usr/lib/*/libibnetdisc*.a 3 | usr/lib/*/libibnetdisc*.so 4 | usr/lib/*/pkgconfig/libibnetdisc.pc 5 | usr/share/man/man3/ibnd_debug.3 6 | usr/share/man/man3/ibnd_destroy_fabric.3 7 | usr/share/man/man3/ibnd_discover_fabric.3 8 | usr/share/man/man3/ibnd_find_node_dr.3 9 | usr/share/man/man3/ibnd_find_node_guid.3 10 | usr/share/man/man3/ibnd_iter_nodes.3 11 | usr/share/man/man3/ibnd_iter_nodes_type.3 12 | usr/share/man/man3/ibnd_set_max_smps_on_wire.3 13 | usr/share/man/man3/ibnd_show_progress.3 14 | -------------------------------------------------------------------------------- /debian/libibnetdisc5.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libibnetdisc*.so.* 2 | -------------------------------------------------------------------------------- /debian/libibumad-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/infiniband/umad*.h 2 | usr/lib/*/libibumad*.so 3 | usr/lib/*/libibumad.a 4 | usr/lib/*/pkgconfig/libibumad.pc 5 | usr/share/man/man3/umad_* 6 | -------------------------------------------------------------------------------- /debian/libibumad3.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libibumad*.so.* 2 | -------------------------------------------------------------------------------- /debian/libibverbs1.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libibverbs*.so.* 2 | usr/share/doc/rdma-core/libibverbs.md usr/share/doc/libibverbs1/ 3 | -------------------------------------------------------------------------------- /debian/libibverbs1.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for libibverbs1 3 | 4 | set -e 5 | 6 | if [ "$1" = configure ]; then 7 | getent group rdma > /dev/null 2>&1 || addgroup --system --quiet rdma 8 | fi 9 | 10 | #DEBHELPER# 11 | -------------------------------------------------------------------------------- /debian/librdmacm-dev.install: -------------------------------------------------------------------------------- 1 | usr/include/infiniband/ib.h 2 | usr/include/rdma/rdma_cma.h 3 | usr/include/rdma/rdma_cma_abi.h 4 | usr/include/rdma/rdma_verbs.h 5 | usr/include/rdma/rsocket.h 6 | usr/lib/*/librdmacm*.so 7 | usr/lib/*/librdmacm.a 8 | usr/lib/*/pkgconfig/librdmacm.pc 9 | usr/share/man/man3/rdma_*.3 10 | usr/share/man/man7/rdma_cm.7 11 | usr/share/man/man7/rsocket.7 12 | -------------------------------------------------------------------------------- /debian/librdmacm1.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/librdmacm*.so.* 2 | usr/lib/*/rsocket/librspreload*.so* 3 | usr/share/doc/rdma-core/librdmacm.md usr/share/doc/librdmacm1/ 4 | -------------------------------------------------------------------------------- /debian/python3-pyverbs.examples: -------------------------------------------------------------------------------- 1 | pyverbs/examples/ib_devices.py 2 | -------------------------------------------------------------------------------- /debian/python3-pyverbs.install: -------------------------------------------------------------------------------- 1 | usr/lib/python3/dist-packages/pyverbs 2 | usr/share/doc/rdma-core/tests 3 | -------------------------------------------------------------------------------- /debian/rdma-core.lintian-overrides: -------------------------------------------------------------------------------- 1 | # "module -i ib_qib" will executes code. This cannot be replaced by the softdep command. 2 | rdma-core: obsolete-command-in-modprobe.d-file install [etc/modprobe.d/truescale.conf] 3 | # The rdma-ndd service is started by udev. 4 | rdma-core: systemd-service-file-missing-install-key [lib/systemd/system/iwpmd.service] 5 | rdma-core: systemd-service-file-missing-install-key [lib/systemd/system/rdma-ndd.service] 6 | # For lintian < 2.115.2 7 | rdma-core: obsolete-command-in-modprobe.d-file etc/modprobe.d/truescale.conf install 8 | -------------------------------------------------------------------------------- /debian/rdma-core.maintscript: -------------------------------------------------------------------------------- 1 | rm_conffile /etc/udev/rules.d/70-persistent-ipoib.rules 43.0 rdma-core 2 | -------------------------------------------------------------------------------- /debian/rdma-core.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | #DEBHELPER# 5 | 6 | if [ "$1" = "configure" ]; then 7 | # we ship udev rules, so trigger an update. This has to be done after 8 | # DEBHELPER restarts systemd to get our new service files loaded. 9 | udevadm trigger --subsystem-match=infiniband --action=change || true 10 | udevadm trigger --subsystem-match=net --action=change || true 11 | udevadm trigger --subsystem-match=infiniband_mad --action=change || true 12 | fi 13 | -------------------------------------------------------------------------------- /debian/rdmacm-utils.install: -------------------------------------------------------------------------------- 1 | usr/bin/cmtime 2 | usr/bin/mckey 3 | usr/bin/rcopy 4 | usr/bin/rdma_client 5 | usr/bin/rdma_server 6 | usr/bin/rdma_xclient 7 | usr/bin/rdma_xserver 8 | usr/bin/riostream 9 | usr/bin/rping 10 | usr/bin/rstream 11 | usr/bin/ucmatose 12 | usr/bin/udaddy 13 | usr/bin/udpong 14 | usr/share/man/man1/cmtime.1 15 | usr/share/man/man1/mckey.1 16 | usr/share/man/man1/rcopy.1 17 | usr/share/man/man1/rdma_client.1 18 | usr/share/man/man1/rdma_server.1 19 | usr/share/man/man1/rdma_xclient.1 20 | usr/share/man/man1/rdma_xserver.1 21 | usr/share/man/man1/riostream.1 22 | usr/share/man/man1/rping.1 23 | usr/share/man/man1/rstream.1 24 | usr/share/man/man1/ucmatose.1 25 | usr/share/man/man1/udaddy.1 26 | usr/share/man/man1/udpong.1 27 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/srptools.default: -------------------------------------------------------------------------------- 1 | # How often should srp_daemon rescan the fabric (seconds). 2 | RETRIES=60 3 | 4 | # Where should srp_daemon log to. 5 | LOG=/var/log/srp_daemon.log 6 | 7 | # What ports should srp_daemon be started on. 8 | # Format is CA:port 9 | # ALL or NONE will run on all ports on none 10 | # respectively 11 | 12 | PORTS=NONE 13 | #PORTS=ALL 14 | #PORTS="mthca0:1 mlx4_0:2" 15 | -------------------------------------------------------------------------------- /debian/srptools.install: -------------------------------------------------------------------------------- 1 | etc/rdma/modules/srp_daemon.conf 2 | etc/srp_daemon.conf 3 | lib/systemd/system/srp_daemon.service 4 | lib/systemd/system/srp_daemon_port@.service 5 | lib/udev/rules.d/60-srp_daemon.rules 6 | usr/lib/srp_daemon/start_on_all_ports 7 | usr/sbin/ibsrpdm 8 | usr/sbin/srp_daemon 9 | usr/share/doc/rdma-core/ibsrpdm.md usr/share/doc/srptools/ 10 | usr/share/man/man5/srp_daemon.service.5 11 | usr/share/man/man5/srp_daemon_port@.service.5 12 | usr/share/man/man8/ibsrpdm.8 13 | usr/share/man/man8/srp_daemon.8 14 | -------------------------------------------------------------------------------- /debian/srptools.links: -------------------------------------------------------------------------------- 1 | /lib/systemd/system/srp_daemon.service /lib/systemd/system/srptools.service 2 | -------------------------------------------------------------------------------- /debian/srptools.lintian-overrides: -------------------------------------------------------------------------------- 1 | # The wantedby target remote-fs-pre.target is intentional 2 | srptools: systemd-service-file-refers-to-unusual-wantedby-target remote-fs-pre.target [lib/systemd/system/*.service] 3 | -------------------------------------------------------------------------------- /debian/srptools.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | #DEBHELPER# 5 | 6 | if [ "$1" = "configure" ]; then 7 | # we ship udev rules, so trigger an update. This has to be done after 8 | # DEBHELPER restarts systemd to get our new service files loaded. 9 | udevadm trigger --subsystem-match=infiniband_mad --action=change || true 10 | fi 11 | -------------------------------------------------------------------------------- /debian/upstream/metadata: -------------------------------------------------------------------------------- 1 | Repository: https://github.com/linux-rdma/rdma-core.git 2 | Repository-Browse: https://github.com/linux-rdma/rdma-core 3 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | version=4 2 | opts="searchmode=plain" \ 3 | https://api.github.com/repos/linux-rdma/rdma-core/releases?per_page=100 \ 4 | https://github.com/linux-rdma/rdma-core/releases/download/v[^/]+/rdma-core-@ANY_VERSION@@ARCHIVE_EXT@ 5 | -------------------------------------------------------------------------------- /ibacm/ibacm.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=InfiniBand Address Cache Manager Daemon 3 | Documentation=man:ibacm file:@CMAKE_INSTALL_FULL_SYSCONFDIR@/rdma/ibacm_opts.cfg 4 | # Cause systemd to always start the socket, which means the parameters in 5 | # ibacm.socket always configures the listening socket, even if the deamon is 6 | # started directly. 7 | Wants=ibacm.socket 8 | # Ensure required kernel modules are loaded before starting 9 | Wants=rdma-load-modules@rdma.service 10 | After=rdma-load-modules@rdma.service 11 | # Order ibacm startup after basic RDMA hw setup. 12 | After=rdma-hw.target 13 | 14 | # Implicitly after basic.target, note that ibacm writes to /var/log directly 15 | # and thus needs writable filesystems setup. 16 | 17 | [Service] 18 | Type=notify 19 | ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/ibacm --systemd 20 | ProtectSystem=full 21 | ProtectHome=true 22 | ProtectHostname=true 23 | ProtectKernelLogs=true 24 | 25 | [Install] 26 | Also=ibacm.socket 27 | # Only want ibacm if RDMA hardware is present (or the socket is touched) 28 | WantedBy=rdma-hw.target 29 | -------------------------------------------------------------------------------- /ibacm/ibacm_hosts.data: -------------------------------------------------------------------------------- 1 | # InfiniBand Communication Management Assistant for clusters hosts file 2 | # 3 | # Entry format is: 4 | # address IB GID 5 | # 6 | # The address may be one of the following: 7 | # host_name - ascii character string, up to 31 characters 8 | # address - IPv4 or IPv6 formatted address 9 | # 10 | # There can be multiple entries for a single IB GID 11 | # 12 | # Samples: 13 | # luna3 fe80::8:f104:39a:169 14 | # 192.168.1.3 fe80::8:f104:39a:169 15 | # fe80::208:f104:39a:169 fe80::8:f104:39a:169 16 | -------------------------------------------------------------------------------- /ibacm/prov/acmp/src/libibacmp.map: -------------------------------------------------------------------------------- 1 | ACMP_1.0 { 2 | global: 3 | provider_query; 4 | local: *; 5 | }; 6 | -------------------------------------------------------------------------------- /infiniband-diags/etc/error_thresholds: -------------------------------------------------------------------------------- 1 | # Define error thresholds here 2 | 3 | #SymbolErrorCounter=10 4 | #LinkErrorRecoveryCounter=10 5 | #LinkDownedCounter=10 6 | #PortRcvErrors=10 7 | #PortRcvRemotePhysicalErrors=100 8 | #PortRcvSwitchRelayErrors=100 9 | #PortXmitDiscards=100 10 | #PortXmitConstraintErrors=100 11 | #PortRcvConstraintErrors=100 12 | #LocalLinkIntegrityErrors=10 13 | #ExcessiveBufferOverrunErrors=10 14 | #VL15Dropped=100 15 | #PortXmitWait=1000 16 | 17 | -------------------------------------------------------------------------------- /infiniband-diags/etc/ibdiag.conf: -------------------------------------------------------------------------------- 1 | # Define different defaults for all infiniband-diag tools. These can be 2 | # defined on the command line but this offers a more global config. 3 | 4 | # Defaults are to find the first port with Physical state == "LinkUp" 5 | #CA=mlx4_0 6 | 7 | # NOTE: that using a different Port may require an altered DR path. 8 | # for example -D 0,1 will not work with port 2 9 | #Port=1 10 | 11 | # define a different default timeout 12 | #timeout=50 13 | 14 | # disable query of Mellanox Extended PortInfo on ibnetdiscover subnet sweeps 15 | # Default = true 16 | #MLX_EPI=false 17 | 18 | # define a default m_key 19 | #m_key=0x00 20 | 21 | # default smkey to be used for SA requests 22 | #sa_key=0x00 23 | 24 | -------------------------------------------------------------------------------- /infiniband-diags/man/check_lft_balance.8.in.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | check_lft_balance 3 | ================= 4 | 5 | -------------------------------------------------- 6 | check InfiniBand unicast forwarding tables balance 7 | -------------------------------------------------- 8 | 9 | :Date: 2017-08-21 10 | :Manual section: 8 11 | :Manual group: Open IB Diagnostics 12 | 13 | SYNOPSIS 14 | ======== 15 | 16 | check_lft_balance.sh [-hRv] 17 | 18 | 19 | DESCRIPTION 20 | =========== 21 | 22 | check_lft_balance.sh is a script which checks for balancing in Infiniband 23 | unicast forwarding tables. It analyzes the output of 24 | **dump_lfts(8)** and **iblinkinfo(8)** 25 | 26 | OPTIONS 27 | ======= 28 | 29 | **-h** 30 | show help 31 | 32 | **-R** 33 | Recalculate dump_lfts information, ie do not use the cached 34 | information. This option is slower but should be used if the diag 35 | tools have not been used for some time or if there are other reasons to 36 | believe that the fabric has changed. 37 | 38 | **-v** 39 | verbose output 40 | 41 | SEE ALSO 42 | ======== 43 | 44 | **dump_lfts(8)** 45 | **iblinkinfo(8)** 46 | 47 | AUTHORS 48 | ======= 49 | 50 | Albert Chu 51 | < chu11@llnl.gov > 52 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_C.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -C 2 | 3 | **-C, --Ca ** use the specified ca_name. 4 | 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_D.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -D for Directed routes 2 | 3 | **-D, --Direct** The address specified is a directed route 4 | :: 5 | 6 | Examples: 7 | [options] -D [options] "0" # self port 8 | [options] -D [options] "0,1,2,1,4" # out via port 1, then 2, ... 9 | 10 | (Note the second number in the path specified must match the port being 11 | used. This can be specified using the port selection flag '-P' or the 12 | port found through the automatic selection process.) 13 | 14 | 15 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_D_with_param.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -D for Directed routes 2 | 3 | **-D, --Direct ** The address specified is a directed route 4 | :: 5 | 6 | Examples: 7 | -D "0" # self port 8 | -D "0,1,2,1,4" # out via port 1, then 2, ... 9 | 10 | (Note the second number in the path specified must match the port being 11 | used. This can be specified using the port selection flag '-P' or the 12 | port found through the automatic selection process.) 13 | 14 | 15 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_G.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -G 2 | 3 | **-G, --Guid** The address specified is a Port GUID 4 | 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_G_with_param.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -G 2 | 3 | **--port-guid, -G ** Specify a port_guid 4 | 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_K.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -K 2 | 3 | **-K, --show_keys** 4 | show security keys (mkey, smkey, etc.) associated with the request. 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_L.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -L 2 | 3 | **-L, --Lid** The address specified is a LID 4 | 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_P.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -P 2 | 3 | **-P, --Port ** use the specified ca_port. 4 | 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_V.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -V 2 | 3 | **-V, --version** show the version info. 4 | 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_cache.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option cache 2 | 3 | **--cache ** 4 | Cache the ibnetdiscover network data in the specified filename. This 5 | cache may be used by other tools for later analysis. 6 | 7 | 8 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_debug.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -d 2 | 3 | -d 4 | raise the IB debugging level. 5 | May be used several times (-ddd or -d -d -d). 6 | 7 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_diff.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option diff 2 | 3 | **--diff ** 4 | Load cached ibnetdiscover data and do a diff comparison to the current 5 | network or another cache. A special diff output for ibnetdiscover 6 | output will be displayed showing differences between the old and current 7 | fabric. By default, the following are compared for differences: switches, 8 | channel adapters, routers, and port connections. 9 | 10 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_diffcheck.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option diffcheck 2 | 3 | **--diffcheck ** 4 | Specify what diff checks should be done in the **--diff** option above. 5 | Comma separate multiple diff check key(s). The available diff checks 6 | are: **sw = switches**, **ca = channel adapters**, **router** = routers, 7 | **port** = port connections, **lid** = lids, **nodedesc** = node 8 | descriptions. Note that **port**, **lid**, and **nodedesc** are 9 | checked only for the node types that are specified (e.g. **sw**, 10 | **ca**, **router**). If **port** is specified alongside **lid** 11 | or **nodedesc**, remote port lids and node descriptions will also be compared. 12 | 13 | 14 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_e.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -e 2 | 3 | -e show send and receive errors (timeouts and others) 4 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_h.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -h 2 | 3 | **-h, --help** show the usage message 4 | 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_load-cache.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option load-cache 2 | 3 | **--load-cache ** 4 | Load and use the cached ibnetdiscover data stored in the specified 5 | filename. May be useful for outputting and learning about other 6 | fabrics or a previous state of a fabric. 7 | 8 | 9 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_node_name_map.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option --node-name-map 2 | 3 | **--node-name-map ** Specify a node name map. 4 | 5 | This file maps GUIDs to more user friendly names. See FILES section. 6 | 7 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_o-outstanding_smps.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -z 2 | 3 | **--outstanding_smps, -o ** 4 | Specify the number of outstanding SMP's which should be issued during the scan 5 | 6 | Default: 2 7 | 8 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_ports-file.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option --ports-file 2 | 3 | **--ports-file ** Specify a ports file. 4 | 5 | This file contains multiple source and destination lid or guid pairs. See FILES section. 6 | 7 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_s.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -s 2 | 3 | **-s, --sm_port ** use 'smlid' as the target lid for SA queries. 4 | 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_t.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -t 2 | 3 | **-t, --timeout ** override the default timeout for the solicited mads. 4 | 5 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_verbose.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -v 2 | 3 | **-v, --verbose** 4 | increase the application verbosity level. 5 | May be used several times (-vv or -v -v -v) 6 | 7 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_y.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -y 2 | 3 | **-y, --m_key ** 4 | use the specified M_key for requests. If non-numeric value (like 'x') 5 | is specified then a value will be prompted for. 6 | 7 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/opt_z-config.in.rst: -------------------------------------------------------------------------------- 1 | .. Define the common option -z 2 | 3 | **--config, -z ** Specify alternate config file. 4 | 5 | Default: @IBDIAG_CONFIG_PATH@/ibdiag.conf 6 | 7 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/sec_config-file.in.rst: -------------------------------------------------------------------------------- 1 | .. Common text for the config file 2 | 3 | CONFIG FILE 4 | ----------- 5 | 6 | @IBDIAG_CONFIG_PATH@/ibdiag.conf 7 | 8 | A global config file is provided to set some of the common options for all 9 | tools. See supplied config file for details. 10 | 11 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/sec_ports-file.rst: -------------------------------------------------------------------------------- 1 | .. Common text to describe the port file. 2 | 3 | PORTS FILE FORMAT 4 | ------------------------- 5 | 6 | The ports file can be used to specify multiple source and destination pairs. They can be lids or guids. If guids, use the -G option to indicate that. 7 | 8 | **Generically:** 9 | 10 | :: 11 | 12 | # comment 13 | 14 | 15 | **Example:** 16 | 17 | :: 18 | 19 | 73 207 20 | 203 657 21 | 531 101 22 | 23 | > OR < 24 | 25 | 0x0008f104003f125c 0x0008f104003f133d 26 | 0x0008f1040011ab07 0x0008f104004265c0 27 | 0x0008f104007c5510 0x0008f1040099bb08 28 | 29 | -------------------------------------------------------------------------------- /infiniband-diags/man/common/sec_portselection.rst: -------------------------------------------------------------------------------- 1 | .. Explanation of local port selection 2 | 3 | Local port Selection 4 | -------------------- 5 | 6 | Multiple port/Multiple CA support: when no IB device or port is specified 7 | (see the "local umad parameters" below), the libibumad library 8 | selects the port to use by the following criteria: 9 | 10 | 1. the first port that is ACTIVE. 11 | 2. if not found, the first port that is UP (physical link up). 12 | 13 | If a port and/or CA name is specified, the libibumad library attempts 14 | to fulfill the user request, and will fail if it is not possible. 15 | 16 | For example: 17 | 18 | :: 19 | 20 | ibaddr # use the first port (criteria #1 above) 21 | ibaddr -C mthca1 # pick the best port from "mthca1" only. 22 | ibaddr -P 2 # use the second (active/up) port from the first available IB device. 23 | ibaddr -C mthca0 -P 2 # use the specified port only. 24 | 25 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibcheckerrors.8: -------------------------------------------------------------------------------- 1 | .TH IBCHECKERRORS 8 "May 21, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibcheckerrors \- validate IB subnet and report errors 5 | 6 | .SH SYNOPSIS 7 | .B ibcheckerrors 8 | [\-h] [\-b] [\-v] [\-N | \-nocolor] [ | \-C ca_name 9 | \-P ca_port \-t(imeout) timeout_ms] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | ibcheckerrors is a script which uses a full topology file that was created by 14 | ibnetdiscover, scans the network to validate the connectivity and reports 15 | errors (from port counters). 16 | 17 | .SH OPTIONS 18 | .PP 19 | \-v increase the verbosity level 20 | .PP 21 | \-b brief mode. Reduce the output to show only if errors are present, 22 | not what they are. 23 | .PP 24 | \-N | \-nocolor use mono rather than color mode 25 | .PP 26 | \-C use the specified ca_name. 27 | .PP 28 | \-P use the specified ca_port. 29 | .PP 30 | \-t override the default timeout for the solicited mads. 31 | 32 | .SH SEE ALSO 33 | .BR ibnetdiscover(8), 34 | .BR ibchecknode(8), 35 | .BR ibcheckport(8), 36 | .BR ibcheckerrs(8) 37 | 38 | .SH AUTHOR 39 | .TP 40 | Hal Rosenstock 41 | .RI < halr@voltaire.com > 42 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibchecknet.8: -------------------------------------------------------------------------------- 1 | .TH IBCHECKNET 8 "May 21, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibchecknet \- validate IB subnet and report errors 5 | 6 | .SH SYNOPSIS 7 | .B ibchecknet 8 | [\-h] [\-N | \-nocolor] [ | \-C ca_name \-P ca_port 9 | \-t(imeout) timeout_ms] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | ibchecknet is a script which uses a full topology file that was created 14 | by ibnetdiscover, and scans the network to validate the connectivity and 15 | reports errors (from port counters). 16 | 17 | .SH OPTIONS 18 | .PP 19 | \-N | \-nocolor use mono rather than color mode 20 | .PP 21 | \-C use the specified ca_name. 22 | .PP 23 | \-P use the specified ca_port. 24 | .PP 25 | \-t override the default timeout for the solicited mads. 26 | 27 | .SH SEE ALSO 28 | .BR ibnetdiscover(8), 29 | .BR ibchecknode(8), 30 | .BR ibcheckport(8), 31 | .BR ibcheckerrs(8) 32 | 33 | .SH AUTHOR 34 | .TP 35 | Hal Rosenstock 36 | .RI < halr@voltaire.com > 37 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibchecknode.8: -------------------------------------------------------------------------------- 1 | .TH IBCHECKNODE 8 "May 21, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibchecknode \- validate IB node and report errors 5 | 6 | .SH SYNOPSIS 7 | .B ibchecknode 8 | [\-h] [\-v] [\-N | \-nocolor] [\-G] [\-C ca_name] [\-P ca_port] 9 | [\-t(imeout) timeout_ms] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | Check connectivity and do some simple sanity checks for the specified node. 14 | Port address is a lid unless -G option is used to specify a GUID address. 15 | 16 | .SH OPTIONS 17 | .PP 18 | \-G use GUID address argument. In most cases, it is the Port GUID. 19 | Example: 20 | "0x08f1040023" 21 | .PP 22 | \-v increase the verbosity level 23 | .PP 24 | \-N | \-nocolor use mono rather than color mode 25 | .PP 26 | \-C use the specified ca_name. 27 | .PP 28 | \-P use the specified ca_port. 29 | .PP 30 | \-t override the default timeout for the solicited mads. 31 | 32 | .SH EXAMPLE 33 | .PP 34 | ibchecknode 2 # check node via lid 2 35 | 36 | .SH SEE ALSO 37 | .BR smpquery(8), 38 | .BR ibaddr(8) 39 | 40 | .SH AUTHOR 41 | .TP 42 | Hal Rosenstock 43 | .RI < halr@voltaire.com > 44 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibcheckport.8: -------------------------------------------------------------------------------- 1 | .TH IBCHECKPORT 8 "May 21, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibcheckport \- validate IB port and report errors 5 | 6 | .SH SYNOPSIS 7 | .B ibcheckport 8 | [\-h] [\-v] [\-N | \-nocolor] [\-G] [\-C ca_name] [\-P ca_port] 9 | [\-t(imeout) timeout_ms] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | Check connectivity and do some simple sanity checks for the specified port. 14 | Port address is a lid unless -G option is used to specify a GUID address. 15 | 16 | .SH OPTIONS 17 | .PP 18 | \-G use GUID address argument. In most cases, it is the Port GUID. 19 | Example: 20 | "0x08f1040023" 21 | .PP 22 | \-v increase the verbosity level 23 | .PP 24 | \-N | \-nocolor use mono rather than color mode 25 | .PP 26 | \-C use the specified ca_name. 27 | .PP 28 | \-P use the specified ca_port. 29 | .PP 30 | \-t override the default timeout for the solicited mads. 31 | 32 | .SH EXAMPLE 33 | .PP 34 | ibcheckport 2 3 # check lid 2 port 3 35 | 36 | .SH SEE ALSO 37 | .BR smpquery(8), 38 | .BR ibaddr(8) 39 | 40 | .SH AUTHOR 41 | .TP 42 | Hal Rosenstock 43 | .RI < halr@voltaire.com > 44 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibcheckportwidth.8: -------------------------------------------------------------------------------- 1 | .TH IBCHECKPORTWIDTH 8 "May 21, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibcheckportwidth \- validate IB port for 1x link width 5 | 6 | .SH SYNOPSIS 7 | .B ibcheckportwidth 8 | [\-h] [\-v] [\-N | \-nocolor] [\-G] [\-C ca_name] [\-P ca_port] 9 | [\-t(imeout) timeout_ms] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | Check connectivity and check the specified port for 1x link width. 14 | Port address is a lid unless -G option is used to specify a GUID address. 15 | 16 | .SH OPTIONS 17 | .PP 18 | \-G use GUID address argument. In most cases, it is the Port GUID. 19 | Example: 20 | "0x08f1040023" 21 | .PP 22 | \-v increase the verbosity level 23 | .PP 24 | \-N | \-nocolor use mono rather than color mode 25 | .PP 26 | \-C use the specified ca_name. 27 | .PP 28 | \-P use the specified ca_port. 29 | .PP 30 | \-t override the default timeout for the solicited mads. 31 | 32 | .SH EXAMPLE 33 | .PP 34 | ibcheckportwidth 2 3 # check lid 2 port 3 35 | 36 | .SH SEE ALSO 37 | .BR smpquery(8), 38 | .BR ibaddr(8) 39 | 40 | .SH AUTHOR 41 | .TP 42 | Hal Rosenstock 43 | .RI < halr@voltaire.com > 44 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibcheckstate.8: -------------------------------------------------------------------------------- 1 | .TH IBCHECKSTATE 8 "May 21, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibcheckstate \- find ports in IB subnet which are link up but not active 5 | 6 | .SH SYNOPSIS 7 | .B ibcheckstate 8 | [\-h] [\-v] [\-N | \-nocolor] [ | \-C ca_name \-P ca_port 9 | \-t(imeout) timeout_ms] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | ibcheckstat is a script which uses a full topology file that was created by 14 | ibnetdiscover, scans the network to validate the port state and port physical 15 | state, and reports any ports which have a port state other than Active or 16 | a port physical state other than LinkUp. 17 | 18 | .SH OPTIONS 19 | .PP 20 | \-N | \-nocolor use mono rather than color mode 21 | .PP 22 | \-C use the specified ca_name. 23 | .PP 24 | \-P use the specified ca_port. 25 | .PP 26 | \-t override the default timeout for the solicited mads. 27 | 28 | .SH SEE ALSO 29 | .BR ibnetdiscover(8), 30 | .BR ibchecknode(8), 31 | .BR ibcheckportstate(8) 32 | 33 | .SH AUTHOR 34 | .TP 35 | Hal Rosenstock 36 | .RI < halr@voltaire.com > 37 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibcheckwidth.8: -------------------------------------------------------------------------------- 1 | .TH IBCHECKWIDTH 8 "May 21, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibcheckwidth \- find 1x links in IB subnet 5 | 6 | .SH SYNOPSIS 7 | .B ibcheckwidth 8 | [\-h] [\-v] [\-N | \-nocolor] [ | \-C ca_name 9 | \-P ca_port \-t(imeout) timeout_ms] 10 | 11 | 12 | .SH DESCRIPTION 13 | .PP 14 | ibcheckwidth is a script which uses a full topology file that was created by 15 | ibnetdiscover, scans the network to validate the active link widths and 16 | reports any 1x links. 17 | 18 | .SH OPTIONS 19 | .PP 20 | \-N | \-nocolor use mono rather than color mode 21 | .PP 22 | \-C use the specified ca_name. 23 | .PP 24 | \-P use the specified ca_port. 25 | .PP 26 | \-t override the default timeout for the solicited mads. 27 | 28 | .SH SEE ALSO 29 | .BR ibnetdiscover(8), 30 | .BR ibchecknode(8), 31 | .BR ibcheckportwidth(8) 32 | 33 | .SH AUTHOR 34 | .TP 35 | Hal Rosenstock 36 | .RI < halr@voltaire.com > 37 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibclearcounters.8: -------------------------------------------------------------------------------- 1 | .TH IBCLEARCOUNTERS 8 "May 21, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibclearcounters \- clear port counters in IB subnet 5 | 6 | .SH SYNOPSIS 7 | .B ibclearcounters 8 | [\-h] [ | \-C ca_name \-P ca_port \-t(imeout) timeout_ms] 9 | 10 | .SH DESCRIPTION 11 | .PP 12 | ibclearcounters is a script that clears the PMA port counters by either walking 13 | the IB subnet topology or using an already saved topology file. 14 | 15 | .SH OPTIONS 16 | .PP 17 | \-C use the specified ca_name. 18 | .PP 19 | \-P use the specified ca_port. 20 | .PP 21 | \-t override the default timeout for the solicited mads. 22 | 23 | .SH SEE ALSO 24 | .BR ibnetdiscover(8), 25 | .BR perfquery(8) 26 | 27 | .SH AUTHOR 28 | .TP 29 | Hal Rosenstock 30 | .RI < halr@voltaire.com > 31 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibclearerrors.8: -------------------------------------------------------------------------------- 1 | .TH IBCLEARERRORS 8 "May 21, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibclearerrors \- clear error counters in IB subnet 5 | 6 | .SH SYNOPSIS 7 | .B ibclearerrors 8 | [\-h] [\-N | \-nocolor] [ | \-C ca_name \-P ca_port 9 | \-t(imeout) timeout_ms] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | ibclearerrors is a script which clears the PMA error counters in PortCounters 14 | by either walking the IB subnet topology or using an already saved topology 15 | file. 16 | 17 | .SH OPTIONS 18 | .PP 19 | \-N | \-nocolor use mono rather than color mode 20 | .PP 21 | \-C use the specified ca_name. 22 | .PP 23 | \-P use the specified ca_port. 24 | .PP 25 | \-t override the default timeout for the solicited mads. 26 | 27 | .SH SEE ALSO 28 | .BR ibnetdiscover(8), 29 | .BR perfquery(8) 30 | 31 | .SH AUTHOR 32 | .TP 33 | Hal Rosenstock 34 | .RI < halr@voltaire.com > 35 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibdatacounters.8: -------------------------------------------------------------------------------- 1 | .TH IBDATACOUNTERS 8 "May 31, 2007" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibdatacounters \- query IB subnet for data counters 5 | 6 | .SH SYNOPSIS 7 | .B ibdatacounters 8 | [\-h] [\-b] [\-v] [\-N | \-nocolor] [ | \-C ca_name \-P ca_port 9 | \-t(imeout) timeout_ms] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | ibdatacounters is a script which uses a full topology file that was created by 14 | ibnetdiscover, scans the network to validate the connectivity and reports 15 | the data counters (from port counters). 16 | 17 | .SH OPTIONS 18 | .PP 19 | \-v increase the verbosity level 20 | .PP 21 | \-b brief mode. Reduce the output to show only if errors are present, 22 | not what they are. 23 | .PP 24 | \-N | \-nocolor use mono rather than color mode 25 | .PP 26 | \-C use the specified ca_name. 27 | .PP 28 | \-P use the specified ca_port. 29 | .PP 30 | \-t override the default timeout for the solicited mads. 31 | 32 | .SH SEE ALSO 33 | .BR ibnetdiscover(8), 34 | .BR ibdatacounts(8) 35 | 36 | .SH AUTHOR 37 | .TP 38 | Hal Rosenstock 39 | .RI < halr@voltaire.com > 40 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibhosts.8.in.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | IBHOSTS 3 | ======= 4 | 5 | -------------------------------------- 6 | show InfiniBand host nodes in topology 7 | -------------------------------------- 8 | 9 | :Date: 2016-12-20 10 | :Manual section: 8 11 | :Manual group: OpenIB Diagnostics 12 | 13 | SYNOPSIS 14 | ======== 15 | 16 | ibhosts [options] [] 17 | 18 | 19 | DESCRIPTION 20 | =========== 21 | 22 | ibhosts is a script which either walks the IB subnet topology or uses an 23 | already saved topology file and extracts the CA nodes. 24 | 25 | OPTIONS 26 | ======= 27 | 28 | .. include:: common/opt_C.rst 29 | .. include:: common/opt_P.rst 30 | .. include:: common/opt_t.rst 31 | .. include:: common/opt_y.rst 32 | .. include:: common/opt_h.rst 33 | .. include:: common/opt_z-config.rst 34 | 35 | .. include:: common/sec_portselection.rst 36 | 37 | FILES 38 | ===== 39 | 40 | .. include:: common/sec_config-file.rst 41 | .. include:: common/sec_node-name-map.rst 42 | 43 | SEE ALSO 44 | ======== 45 | 46 | ibnetdiscover(8) 47 | 48 | DEPENDENCIES 49 | ============ 50 | 51 | ibnetdiscover, ibnetdiscover format 52 | 53 | AUTHOR 54 | ====== 55 | 56 | Hal Rosenstock 57 | < halr@voltaire.com > 58 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibnodes.8.in.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | IBNODES 3 | ======= 4 | 5 | --------------------------------- 6 | show InfiniBand nodes in topology 7 | --------------------------------- 8 | 9 | :Date: 2012-05-14 10 | :Manual section: 8 11 | :Manual group: OpenIB Diagnostics 12 | 13 | 14 | SYNOPSIS 15 | ======== 16 | 17 | ibnodes [options] [] 18 | 19 | DESCRIPTION 20 | =========== 21 | 22 | ibnodes is a script which either walks the IB subnet topology or uses an 23 | already saved topology file and extracts the IB nodes (CAs and switches). 24 | 25 | 26 | OPTIONS 27 | ======= 28 | 29 | .. include:: common/opt_C.rst 30 | .. include:: common/opt_P.rst 31 | .. include:: common/opt_t.rst 32 | .. include:: common/opt_h.rst 33 | .. include:: common/opt_z-config.rst 34 | 35 | .. include:: common/sec_portselection.rst 36 | 37 | FILES 38 | ===== 39 | 40 | .. include:: common/sec_config-file.rst 41 | .. include:: common/sec_node-name-map.rst 42 | 43 | 44 | SEE ALSO 45 | ======== 46 | 47 | ibnetdiscover(8) 48 | 49 | DEPENDENCIES 50 | ============ 51 | 52 | ibnetdiscover, ibnetdiscover format 53 | 54 | AUTHOR 55 | ====== 56 | 57 | Hal Rosenstock 58 | < halr@voltaire.com > 59 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibrouters.8.in.rst: -------------------------------------------------------------------------------- 1 | ========= 2 | IBROUTERS 3 | ========= 4 | 5 | ---------------------------------------- 6 | show InfiniBand router nodes in topology 7 | ---------------------------------------- 8 | 9 | :Date: 2016-12-20 10 | :Manual section: 8 11 | :Manual group: OpenIB Diagnostics 12 | 13 | 14 | SYNOPSIS 15 | ======== 16 | 17 | ibrouters [options] [] 18 | 19 | DESCRIPTION 20 | =========== 21 | 22 | ibrouters is a script which either walks the IB subnet topology or uses an 23 | already saved topology file and extracts the router nodes. 24 | 25 | OPTIONS 26 | ======= 27 | 28 | .. include:: common/opt_C.rst 29 | .. include:: common/opt_P.rst 30 | .. include:: common/opt_t.rst 31 | .. include:: common/opt_y.rst 32 | .. include:: common/opt_h.rst 33 | .. include:: common/opt_z-config.rst 34 | 35 | .. include:: common/sec_portselection.rst 36 | 37 | FILES 38 | ===== 39 | 40 | .. include:: common/sec_config-file.rst 41 | .. include:: common/sec_node-name-map.rst 42 | 43 | SEE ALSO 44 | ======== 45 | 46 | ibnetdiscover(8) 47 | 48 | DEPENDENCIES 49 | ============ 50 | 51 | ibnetdiscover, ibnetdiscover format 52 | 53 | 54 | AUTHOR 55 | ====== 56 | 57 | Hal Rosenstock 58 | < halr@voltaire.com > 59 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibstatus.8.in.rst: -------------------------------------------------------------------------------- 1 | ======== 2 | ibstatus 3 | ======== 4 | 5 | ------------------------------------------ 6 | query basic status of InfiniBand device(s) 7 | ------------------------------------------ 8 | 9 | :Date: 2017-08-21 10 | :Manual section: 8 11 | :Manual group: Open IB Diagnostics 12 | 13 | SYNOPSIS 14 | ======== 15 | 16 | ibstatus [\-h] [devname[:port]]... 17 | 18 | DESCRIPTION 19 | =========== 20 | 21 | ibstatus is a script which displays basic information obtained from the local 22 | IB driver. Output includes LID, SMLID, port state, link width active, and port 23 | physical state. 24 | 25 | OPTIONS 26 | ======= 27 | 28 | .. include:: common/opt_h.rst 29 | 30 | **devname** 31 | InfiniBand device name 32 | 33 | **portnum** 34 | port number of InfiniBand device 35 | 36 | EXAMPLES 37 | ======== 38 | 39 | :: 40 | 41 | ibstatus # display status of all IB ports 42 | ibstatus mthca1 # status of mthca1 ports 43 | ibstatus mthca1:1 mthca0:2 # show status of specified ports 44 | 45 | SEE ALSO 46 | ======== 47 | 48 | **ibstat (8)** 49 | 50 | AUTHOR 51 | ====== 52 | 53 | Hal Rosenstock 54 | < halr@voltaire.com > 55 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibswitches.8.in.rst: -------------------------------------------------------------------------------- 1 | ========== 2 | IBSWITCHES 3 | ========== 4 | 5 | ---------------------------------------- 6 | show InfiniBand switch nodes in topology 7 | ---------------------------------------- 8 | 9 | :Date: 2016-12-20 10 | :Manual section: 8 11 | :Manual group: OpenIB Diagnostics 12 | 13 | 14 | SYNOPSIS 15 | ======== 16 | 17 | ibswitches [options] [] 18 | 19 | DESCRIPTION 20 | =========== 21 | 22 | ibswitches is a script which either walks the IB subnet topology or uses an 23 | already saved topology file and extracts the switch nodes. 24 | 25 | OPTIONS 26 | ======= 27 | 28 | .. include:: common/opt_C.rst 29 | .. include:: common/opt_P.rst 30 | .. include:: common/opt_t.rst 31 | .. include:: common/opt_y.rst 32 | .. include:: common/opt_h.rst 33 | .. include:: common/opt_z-config.rst 34 | 35 | .. include:: common/sec_portselection.rst 36 | 37 | FILES 38 | ===== 39 | 40 | .. include:: common/sec_config-file.rst 41 | .. include:: common/sec_node-name-map.rst 42 | 43 | SEE ALSO 44 | ======== 45 | ibnetdiscover(8) 46 | 47 | DEPENDENCIES 48 | ============ 49 | 50 | ibnetdiscover, ibnetdiscover format 51 | 52 | AUTHOR 53 | ====== 54 | 55 | Hal Rosenstock 56 | < halr@voltaire.com > 57 | -------------------------------------------------------------------------------- /infiniband-diags/man/ibswportwatch.8: -------------------------------------------------------------------------------- 1 | .TH IBSWPORTWATCH 8 "September 27, 2006" "OpenIB" "OpenIB Diagnostics" 2 | 3 | .SH NAME 4 | ibswportwatch.pl \- poll the counters on the specified switch/port and 5 | report rate of change information. 6 | 7 | .SH SYNOPSIS 8 | .B ibswportwatch.pl 9 | [-p -v -n -G] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | ibswportwatch.pl polls the port counters of the specified port and 14 | calculates rate of change information. 15 | 16 | .SH OPTIONS 17 | 18 | .PP 19 | .TP 20 | \fB\-p \fR 21 | Specify a pause time (polling interval) other than the default. 22 | .TP 23 | \fB\-v\fR 24 | Be verbose. 25 | .TP 26 | \fB\-n \fR 27 | Run for a set number of poll intervals and stop. (Default == -1 == forever) 28 | .TP 29 | \fB\-G\fR 30 | The address provided is a GUID rather than LID. 31 | 32 | .SH AUTHOR 33 | .TP 34 | Ira Weiny 35 | .RI < weiny2@llnl.gov > 36 | -------------------------------------------------------------------------------- /infiniband-diags/scripts/dump_lfts.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This simple script will collect outputs of ibroute for all switches 4 | # on the subnet and drop it on stdout. It can be used for LFTs dump 5 | # generation. 6 | # 7 | 8 | @IBSCRIPTPATH@/dump_fts $@ 9 | echo "" 10 | echo "*** WARNING ***: this command has been replaced by dump_fts" 11 | echo "" 12 | echo "" 13 | -------------------------------------------------------------------------------- /infiniband-diags/scripts/dump_mfts.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This simple script will collect outputs of ibroute for all switches 4 | # on the subnet and drop it on stdout. It can be used for MFTs dump 5 | # generation. 6 | # 7 | 8 | @IBSCRIPTPATH@/dump_fts -M $@ 9 | echo "" 10 | echo "*** WARNING ***: this command has been replaced by dump_fts -M" 11 | echo "" 12 | echo "" 13 | -------------------------------------------------------------------------------- /infiniband-diags/scripts/ibdiscover.map: -------------------------------------------------------------------------------- 1 | 8f10400410015|8|"ISR 6000"|# SW-6IB4 Voltaire port 0 lid 5 2 | 5442ba00003080|24|"ISR 9024"|# ISR9024 Voltaire port 0 lid 2 3 | 8f10403960558|2|"HCA 1"|# MT23108 InfiniHost Mellanox Technologies 4 | 5442b100004900|2|"HCA 2"|# MT23108 InfiniHost Mellanox Technologies 5 | 8f10403961354|2|"HCA 3"|# MT23108 InfiniHost Mellanox Technologies 6 | 8f10403960984|2|"HCA 4"|# MT23108 InfiniHost Mellanox Technologies 7 | -------------------------------------------------------------------------------- /infiniband-diags/scripts/ibnodes.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | IBPATH=${IBPATH:-@IBSCRIPTPATH@} 4 | 5 | $IBPATH/ibhosts $@; $IBPATH/ibswitches $@ 6 | -------------------------------------------------------------------------------- /iwpmd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_sbin_executable(iwpmd 2 | iwarp_pm_common.c 3 | iwarp_pm_helper.c 4 | iwarp_pm_server.c 5 | ) 6 | target_link_libraries(iwpmd LINK_PRIVATE 7 | ${SYSTEMD_LIBRARIES} 8 | ${NL_LIBRARIES} 9 | ${CMAKE_THREAD_LIBS_INIT} 10 | ) 11 | 12 | rdma_man_pages( 13 | iwpmd.8.in 14 | iwpmd.conf.5.in 15 | ) 16 | 17 | rdma_subst_install(FILES "iwpmd.service.in" 18 | RENAME "iwpmd.service" 19 | DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}") 20 | rdma_subst_install(FILES "iwpmd_init.in" 21 | DESTINATION "${CMAKE_INSTALL_INITDDIR}" 22 | RENAME "iwpmd" 23 | PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE) 24 | install(FILES "iwpmd.conf" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}") 25 | 26 | install(FILES "iwpmd.rules" 27 | RENAME "90-iwpmd.rules" 28 | DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}") 29 | 30 | install(FILES modules-iwpmd.conf 31 | RENAME "iwpmd.conf" 32 | DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/rdma/modules") 33 | -------------------------------------------------------------------------------- /iwpmd/iwpmd.conf: -------------------------------------------------------------------------------- 1 | nl_sock_rbuf_size=419430400 2 | -------------------------------------------------------------------------------- /iwpmd/iwpmd.conf.5.in: -------------------------------------------------------------------------------- 1 | .TH "iwpmd.conf" 5 "2016-09-16" "iwpmd.conf" "iwpmd.conf" iwpmd.conf 2 | .SH NAME 3 | iwpmd.conf \- iWARP port mapper config file. 4 | .SH SYNOPSIS 5 | .sp 6 | .nf 7 | \fIiwpmd.conf\fR 8 | .fi 9 | .SH "DESCRIPTION" 10 | The iwpmd.conf file provides configuration parameters for iwpmd. Parameters 11 | are in the form: param=value, and one per line. Parameters include: 12 | .P 13 | nl_sock_rbuf_size - The socket buffer size of the netlink socket used 14 | to communicate with the kernel port map client. The default is 400MB. 15 | .SH "EXAMPLES" 16 | nl_sock_rbuf_size=419430400 17 | .SH "FILES" 18 | @CMAKE_INSTALL_FULL_SYSCONFDIR@/iwpmd.conf 19 | .SH "SEE ALSO" 20 | iwpmd(8) 21 | -------------------------------------------------------------------------------- /iwpmd/iwpmd.rules: -------------------------------------------------------------------------------- 1 | TAG+="systemd", ENV{ID_RDMA_IWARP}=="1", ENV{SYSTEMD_WANTS}+="iwpmd.service" 2 | -------------------------------------------------------------------------------- /iwpmd/modules-iwpmd.conf: -------------------------------------------------------------------------------- 1 | # These modules are loaded by the system if iwpmd is to be run 2 | iw_cm 3 | -------------------------------------------------------------------------------- /kernel-boot/modules/infiniband.conf: -------------------------------------------------------------------------------- 1 | # These modules are loaded by the system if any InfiniBand device is installed 2 | # InfiniBand over IP netdevice 3 | ib_ipoib 4 | 5 | # Access to fabric management SMPs and GMPs from userspace. 6 | ib_umad 7 | 8 | # SCSI Remote Protocol target support 9 | # ib_srpt 10 | 11 | # ib_ucm provides the obsolete /dev/infiniband/ucm0 12 | # ib_ucm 13 | -------------------------------------------------------------------------------- /kernel-boot/modules/iwarp.conf: -------------------------------------------------------------------------------- 1 | # These modules are loaded by the system if any iWarp device is installed 2 | -------------------------------------------------------------------------------- /kernel-boot/modules/opa.conf: -------------------------------------------------------------------------------- 1 | # These modules are loaded by the system if any OmniPath Architecture device 2 | # is installed 3 | # Infiniband over IP netdevice 4 | ib_ipoib 5 | 6 | # Access to fabric management SMPs and GMPs from userspace. 7 | ib_umad 8 | 9 | # Omnipath Ethernet Virtual NIC netdevice 10 | opa_vnic 11 | -------------------------------------------------------------------------------- /kernel-boot/modules/rdma.conf: -------------------------------------------------------------------------------- 1 | # These modules are loaded by the system if any RDMA devices is installed 2 | # iSCSI over RDMA client support 3 | ib_iser 4 | 5 | # iSCSI over RDMA target support 6 | # ib_isert 7 | 8 | # User access to RDMA verbs (supports libibverbs) 9 | ib_uverbs 10 | 11 | # User access to RDMA connection management (supports librdmacm) 12 | rdma_ucm 13 | 14 | # RDS over RDMA support 15 | # rds_rdma 16 | 17 | # NFS over RDMA client support 18 | xprtrdma 19 | 20 | # NFS over RDMA server support 21 | svcrdma 22 | -------------------------------------------------------------------------------- /kernel-boot/modules/roce.conf: -------------------------------------------------------------------------------- 1 | # These modules are loaded by the system if any RDMA over Converged Ethernet 2 | # device is installed 3 | -------------------------------------------------------------------------------- /kernel-boot/persistent-ipoib.rules.in: -------------------------------------------------------------------------------- 1 | # This is a sample udev rules file that demonstrates how to get udev to 2 | # set the name of IPoIB interfaces to whatever you wish. Copy this file 3 | # into @CMAKE_INSTALL_SYSCONFDIR@/udev/rules.d before editing it! There is a 16 character limit 4 | # on network device names. 5 | # 6 | # Important items to note: ATTR{type}=="32" is IPoIB interfaces, and the 7 | # ATTR{address} match must start with ?* and only reference the last 8 8 | # bytes of the address or else the address might not match the variable QPN 9 | # portion. 10 | # 11 | # Modern udev is case sensitive and all addresses need to be in lower case. 12 | # 13 | # ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{type}=="32", ATTR{address}=="?*00:02:c9:03:00:31:78:f2", NAME="mlx4_ib3" 14 | -------------------------------------------------------------------------------- /kernel-boot/rdma-hw.target.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=RDMA Hardware 3 | Documentation=file:@CMAKE_INSTALL_FULL_DOCDIR@/udev.md 4 | StopWhenUnneeded=yes 5 | 6 | # Start the basic ULP RDMA kernel modules when RDMA hardware is detected (note 7 | # the rdma-load-modules@.service is already before this target) 8 | Wants=rdma-load-modules@rdma.service 9 | # Order after the standard network.target for compatibility with init.d 10 | # scripts that order after networking - this will mean RDMA is ready too. 11 | Before=network.target 12 | # We do not order rdma-hw before basic.target, units for daemons that use RDMA 13 | # have to manually order after rdma-hw.target 14 | -------------------------------------------------------------------------------- /kernel-boot/rdma-ulp-modules.rules: -------------------------------------------------------------------------------- 1 | ACTION=="remove", GOTO="rdma_ulp_modules_end" 2 | SUBSYSTEM!="infiniband", GOTO="rdma_ulp_modules_end" 3 | 4 | # Automatically load general RDMA ULP modules when RDMA hardware is installed 5 | TAG+="systemd", ENV{SYSTEMD_WANTS}+="rdma-hw.target" 6 | TAG+="systemd", ENV{ID_RDMA_INFINIBAND}=="1", ENV{SYSTEMD_WANTS}+="rdma-load-modules@infiniband.service" 7 | TAG+="systemd", ENV{ID_RDMA_IWARP}=="1", ENV{SYSTEMD_WANTS}+="rdma-load-modules@iwarp.service" 8 | TAG+="systemd", ENV{ID_RDMA_OPA}=="1", ENV{SYSTEMD_WANTS}+="rdma-load-modules@opa.service" 9 | TAG+="systemd", ENV{ID_RDMA_ROCE}=="1", ENV{SYSTEMD_WANTS}+="rdma-load-modules@roce.service" 10 | 11 | LABEL="rdma_ulp_modules_end" 12 | -------------------------------------------------------------------------------- /kernel-boot/rdma-umad.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="infiniband_mad", KERNEL=="*umad*", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/rdma/devices/$attr{ibdev}:$attr{port}/umad" 2 | -------------------------------------------------------------------------------- /kernel-headers/kern-abi.c: -------------------------------------------------------------------------------- 1 | /* empty file for cmake */ 2 | -------------------------------------------------------------------------------- /kernel-headers/rdma/erdma-abi.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ 2 | /* 3 | * Copyright (c) 2020-2022, Alibaba Group. 4 | */ 5 | 6 | #ifndef __ERDMA_USER_H__ 7 | #define __ERDMA_USER_H__ 8 | 9 | #include 10 | 11 | #define ERDMA_ABI_VERSION 1 12 | 13 | struct erdma_ureq_create_cq { 14 | __aligned_u64 db_record_va; 15 | __aligned_u64 qbuf_va; 16 | __u32 qbuf_len; 17 | __u32 rsvd0; 18 | }; 19 | 20 | struct erdma_uresp_create_cq { 21 | __u32 cq_id; 22 | __u32 num_cqe; 23 | }; 24 | 25 | struct erdma_ureq_create_qp { 26 | __aligned_u64 db_record_va; 27 | __aligned_u64 qbuf_va; 28 | __u32 qbuf_len; 29 | __u32 rsvd0; 30 | }; 31 | 32 | struct erdma_uresp_create_qp { 33 | __u32 qp_id; 34 | __u32 num_sqe; 35 | __u32 num_rqe; 36 | __u32 rq_offset; 37 | }; 38 | 39 | struct erdma_uresp_alloc_ctx { 40 | __u32 dev_id; 41 | __u32 pad; 42 | __u32 sdb_type; 43 | __u32 sdb_offset; 44 | __aligned_u64 sdb; 45 | __aligned_u64 rdb; 46 | __aligned_u64 cdb; 47 | }; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /libibmad/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | publish_headers(infiniband 2 | mad.h 3 | mad_osd.h 4 | ) 5 | 6 | publish_internal_headers(util 7 | iba_types.h 8 | ) 9 | 10 | rdma_library(ibmad libibmad.map 11 | # See Documentation/versioning.md 12 | 5 5.5.${PACKAGE_VERSION} 13 | bm.c 14 | cc.c 15 | dump.c 16 | fields.c 17 | gs.c 18 | mad.c 19 | portid.c 20 | register.c 21 | resolve.c 22 | rpc.c 23 | sa.c 24 | serv.c 25 | smp.c 26 | vendor.c 27 | ) 28 | target_link_libraries(ibmad LINK_PRIVATE 29 | ibumad 30 | ) 31 | rdma_pkg_config("ibmad" "libibumad" "") 32 | -------------------------------------------------------------------------------- /libibmad/mad_osd.h: -------------------------------------------------------------------------------- 1 | #warning "This header is obsolete." 2 | -------------------------------------------------------------------------------- /libibnetdisc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | publish_headers(infiniband 2 | ibnetdisc.h 3 | ibnetdisc_osd.h 4 | ) 5 | 6 | rdma_library(ibnetdisc libibnetdisc.map 7 | # See Documentation/versioning.md 8 | 5 5.1.${PACKAGE_VERSION} 9 | chassis.c 10 | ibnetdisc.c 11 | ibnetdisc_cache.c 12 | query_smp.c 13 | ) 14 | target_link_libraries(ibnetdisc LINK_PRIVATE 15 | ibmad 16 | ibumad 17 | ) 18 | rdma_pkg_config("ibnetdisc" "libibumad libibmad" "") 19 | 20 | rdma_test_executable(testleaks tests/testleaks.c) 21 | target_link_libraries(testleaks LINK_PRIVATE 22 | ibmad 23 | ibumad 24 | ibnetdisc 25 | ) 26 | -------------------------------------------------------------------------------- /libibnetdisc/ibnetdisc_osd.h: -------------------------------------------------------------------------------- 1 | #warning "This header is obsolete." 2 | -------------------------------------------------------------------------------- /libibnetdisc/libibnetdisc.map: -------------------------------------------------------------------------------- 1 | IBNETDISC_1.0 { 2 | global: 3 | ibnd_discover_fabric; 4 | ibnd_destroy_fabric; 5 | ibnd_load_fabric; 6 | ibnd_cache_fabric; 7 | ibnd_find_node_guid; 8 | ibnd_find_node_dr; 9 | ibnd_is_xsigo_guid; 10 | ibnd_is_xsigo_tca; 11 | ibnd_is_xsigo_hca; 12 | ibnd_get_chassis_guid; 13 | ibnd_get_chassis_type; 14 | ibnd_get_chassis_slot_str; 15 | ibnd_iter_nodes; 16 | ibnd_iter_nodes_type; 17 | ibnd_find_port_guid; 18 | ibnd_find_port_dr; 19 | ibnd_find_port_lid; 20 | ibnd_iter_ports; 21 | local: *; 22 | }; 23 | 24 | IBNETDISC_1.1 { 25 | global: 26 | ibnd_get_agg_linkspeedext_field; 27 | ibnd_get_agg_linkspeedext; 28 | ibnd_get_agg_linkspeedexten; 29 | ibnd_get_agg_linkspeedextsup; 30 | ibnd_dump_agg_linkspeedext_bits; 31 | ibnd_dump_agg_linkspeedext; 32 | ibnd_dump_agg_linkspeedexten; 33 | ibnd_dump_agg_linkspeedextsup; 34 | local: *; 35 | } IBNETDISC_1.0; 36 | -------------------------------------------------------------------------------- /libibnetdisc/man/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_man_pages( 2 | ibnd_discover_fabric.3 3 | ibnd_find_node_guid.3 4 | ibnd_iter_nodes.3 5 | ) 6 | 7 | rdma_alias_man_pages( 8 | ibnd_discover_fabric.3 ibnd_debug.3 9 | ibnd_discover_fabric.3 ibnd_destroy_fabric.3 10 | ibnd_discover_fabric.3 ibnd_set_max_smps_on_wire.3 11 | ibnd_discover_fabric.3 ibnd_show_progress.3 12 | ibnd_find_node_guid.3 ibnd_find_node_dr.3 13 | ibnd_iter_nodes.3 ibnd_iter_nodes_type.3 14 | ) 15 | -------------------------------------------------------------------------------- /libibnetdisc/man/ibnd_find_node_guid.3: -------------------------------------------------------------------------------- 1 | .TH IBND_FIND_NODE_GUID 3 "July 25, 2008" "OpenIB" "OpenIB Programmer's Manual" 2 | .SH "NAME" 3 | ibnd_find_node_guid, ibnd_find_node_dr \- given a fabric object find the node object within it which matches the guid or directed route specified. 4 | .SH "SYNOPSIS" 5 | .nf 6 | .B #include 7 | .sp 8 | .BI "ibnd_node_t *ibnd_find_node_guid(ibnd_fabric_t *fabric, uint64_t guid)" 9 | .BI "ibnd_node_t *ibnd_find_node_dr(ibnd_fabric_t *fabric, char *dr_str)" 10 | .SH "DESCRIPTION" 11 | .B ibnd_find_node_guid() 12 | Given a fabric object and a guid, return the ibnd_node_t object with that node guid. 13 | .B ibnd_find_node_dr() 14 | Given a fabric object and a directed route, return the ibnd_node_t object with 15 | that directed route. 16 | .SH "RETURN VALUE" 17 | .B ibnd_find_node_guid(), ibnd_find_node_dr() 18 | return NULL on failure, otherwise a valid ibnd_node_t object. 19 | .SH "AUTHORS" 20 | .TP 21 | Ira Weiny 22 | -------------------------------------------------------------------------------- /libibnetdisc/man/ibnd_iter_nodes.3: -------------------------------------------------------------------------------- 1 | .TH IBND_ITER_NODES 3 "July 25, 2008" "OpenIB" "OpenIB Programmer's Manual" 2 | .SH "NAME" 3 | ibnd_iter_nodes, ibnd_iter_nodes_type \- given a fabric object and a function itterate over the nodes in the fabric. 4 | .SH "SYNOPSIS" 5 | .nf 6 | .B #include 7 | .sp 8 | .BI "void ibnd_iter_nodes(ibnd_fabric_t *fabric, ibnd_iter_func_t func, void *user_data)" 9 | .BI "void ibnd_iter_nodes_type(ibnd_fabric_t *fabric, ibnd_iter_func_t func, ibnd_node_type_t type, void *user_data)" 10 | .SH "DESCRIPTION" 11 | .B ibnd_iter_nodes() 12 | Itterate through all the nodes in the fabric and call "func" on them. 13 | .B ibnd_iter_nodes_type() 14 | The same as ibnd_iter_nodes except to limit the iteration to the nodes with the specified type. 15 | .SH "RETURN VALUE" 16 | .B ibnd_iter_nodes(), ibnd_iter_nodes_type() 17 | NONE 18 | .SH "AUTHORS" 19 | .TP 20 | Ira Weiny 21 | -------------------------------------------------------------------------------- /libibumad/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | publish_headers(infiniband 2 | umad.h 3 | umad_cm.h 4 | umad_sa.h 5 | umad_sa_mcm.h 6 | umad_sm.h 7 | umad_str.h 8 | umad_types.h 9 | ) 10 | 11 | rdma_library(ibumad libibumad.map 12 | # See Documentation/versioning.md 13 | 3 3.4.${PACKAGE_VERSION} 14 | sysfs.c 15 | umad.c 16 | umad_str.c 17 | ) 18 | 19 | rdma_pkg_config("ibumad" "" "") 20 | -------------------------------------------------------------------------------- /libibumad/man/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_man_pages( 2 | umad_addr_dump.3 3 | umad_alloc.3 4 | umad_class_str.3 5 | umad_close_port.3 6 | umad_debug.3 7 | umad_dump.3 8 | umad_free.3 9 | umad_get_ca.3 10 | umad_get_ca_portguids.3 11 | umad_get_cas_names.3 12 | umad_get_fd.3 13 | umad_get_issm_path.3 14 | umad_get_mad.3 15 | umad_get_mad_addr.3 16 | umad_get_pkey.3 17 | umad_get_port.3 18 | umad_init.3.md 19 | umad_open_port.3 20 | umad_poll.3 21 | umad_recv.3 22 | umad_register.3 23 | umad_register2.3 24 | umad_register_oui.3 25 | umad_send.3 26 | umad_set_addr.3 27 | umad_set_addr_net.3 28 | umad_set_grh.3 29 | umad_set_grh_net.3 30 | umad_set_pkey.3 31 | umad_size.3 32 | umad_status.3 33 | umad_unregister.3 34 | ) 35 | rdma_alias_man_pages( 36 | umad_class_str.3 umad_attribute_str.3 37 | umad_class_str.3 umad_mad_status_str.3 38 | umad_class_str.3 umad_method_str.3 39 | umad_get_ca.3 umad_release_ca.3 40 | umad_get_port.3 umad_release_port.3 41 | umad_init.3 umad_done.3 42 | ) 43 | -------------------------------------------------------------------------------- /libibumad/man/umad_addr_dump.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_ADDR_DUMP 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_addr_dump \- dump addr structure to stderr 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "void umad_addr_dump(ib_mad_addr_t " "*addr"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_addr_dump() 15 | dumps the given 16 | .I addr\fR 17 | to stderr. 18 | The argument 19 | .I addr 20 | is an 21 | .I ib_mad_addr_t 22 | struct, as specified in . 23 | .PP 24 | .nf 25 | typedef struct ib_mad_addr { 26 | .in +8 27 | uint32_t qpn; 28 | uint32_t qkey; 29 | uint16_t lid; 30 | uint8_t sl; 31 | uint8_t path_bits; 32 | uint8_t grh_present; 33 | uint8_t gid_index; 34 | uint8_t hop_limit; 35 | uint8_t traffic_class; 36 | uint8_t gid[16]; 37 | uint32_t flow_label; 38 | .in -8 39 | } ib_mad_addr_t; 40 | .fi 41 | .SH "RETURN VALUE" 42 | .B umad_addr_dump() 43 | returns no value. 44 | .SH "AUTHOR" 45 | .TP 46 | Hal Rosenstock 47 | -------------------------------------------------------------------------------- /libibumad/man/umad_alloc.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_ALLOC 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_alloc \- allocate memory for umad buffers 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "void * umad_alloc(int " "num" ", size_t " "size"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_alloc() 15 | allocates memory for an array of 16 | .I num\fR 17 | umad buffers of 18 | .I size 19 | bytes\fR. 20 | Note that 21 | .I size\fR 22 | should include the 23 | .B umad_size() 24 | plus the length (MAD_BLOCK_SIZE for normal MADs or the length returned from 25 | .B umad_recv() 26 | for RMPP MADs). 27 | .SH "RETURN VALUE" 28 | .B umad_alloc() 29 | returns NULL if out of memory. 30 | .SH "SEE ALSO" 31 | .BR umad_free (3) 32 | .SH "AUTHOR" 33 | .TP 34 | Hal Rosenstock 35 | -------------------------------------------------------------------------------- /libibumad/man/umad_close_port.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_OPEN_PORT 3 "May 11, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_close_port \- close InfiniBand device port for umad access 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_close_port(int " "portid" ); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_close_port() 15 | closes the port specified by the handle 16 | .I portid\fR. 17 | .SH "RETURN VALUE" 18 | .B umad_close_port() 19 | returns 0 on success, and a negative value on error. 20 | -EINVAL is returned if the 21 | .I portid\fR 22 | is not a handle to a valid (open) port. 23 | .SH "SEE ALSO" 24 | .BR umad_open_port (3) 25 | .SH "AUTHOR" 26 | .TP 27 | Hal Rosenstock 28 | -------------------------------------------------------------------------------- /libibumad/man/umad_debug.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_DEBUG 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_debug \- set debug level 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_debug(int " "level" ); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_debug() 15 | sets the umad library internal debug level to 16 | .I level\fR. 17 | The following 18 | debug levels are supported: 0 - no debug (the default), 19 | 1 - basic debug information, 2 - verbose debug information. Negative values are 20 | ignored in terms of set. Note that the current debug level can 21 | be queried by passing a negative value as 22 | .I level\fR. 23 | .SH "RETURN VALUE" 24 | .B umad_debug() 25 | returns the actual debug level. 26 | .SH "AUTHORS" 27 | .TP 28 | Hal Rosenstock 29 | .TP 30 | Dotan Barak 31 | -------------------------------------------------------------------------------- /libibumad/man/umad_dump.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_DUMP 3 "May 17, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_dump \- dump umad buffer to stderr 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "void umad_dump(void " "*umad"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_dump() 15 | dumps the given 16 | .I umad\fR 17 | buffer to stderr. 18 | .SH "RETURN VALUE" 19 | .B umad_dump() 20 | returns no value. 21 | .SH "AUTHOR" 22 | .TP 23 | Hal Rosenstock 24 | -------------------------------------------------------------------------------- /libibumad/man/umad_free.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_FREE 3 "May 17, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_free \- frees memory of umad buffers 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "void umad_free(void " "*umad"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_free() 15 | frees memory previously allocated with 16 | .B umad_alloc()\fR. 17 | .SH "RETURN VALUE" 18 | .B umad_free() 19 | returns no value. 20 | .SH "SEE ALSO" 21 | .BR umad_alloc (3) 22 | .SH "AUTHOR" 23 | .TP 24 | Hal Rosenstock 25 | -------------------------------------------------------------------------------- /libibumad/man/umad_free_ca_device_list.3.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | date: "May 1, 2018" 4 | footer: "OpenIB" 5 | header: "OpenIB Programmer's Manual" 6 | layout: page 7 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' 8 | section: 3 9 | title: UMAD_FREE_CA_DEVICE_LIST 10 | --- 11 | 12 | # NAME 13 | 14 | umad_free_ca_device_list - free InfiniBand devices name list 15 | 16 | # SYNOPSIS 17 | 18 | ```c 19 | #include 20 | 21 | void umad_free_ca_device_list(struct umad_device_node *head); 22 | ``` 23 | 24 | # DESCRIPTION 25 | 26 | **umad_free_ca_device_list()** frees the *struct umad_device_node* 27 | list and its values that allocated with umad_get_ca_namelist(). 28 | The argument head is list of *struct umad_device_node* filled with 29 | local IB devices(CAs) names. 30 | 31 | # RETURN VALUE 32 | 33 | **umad_free_ca_device_list()** returns no value. 34 | 35 | # SEE ALSO 36 | 37 | **umad_get_ca_device_list** 38 | 39 | # AUTHORS 40 | 41 | Vladimir Koushnir , 42 | Hal Rosenstock , 43 | Haim Boozaglo 44 | -------------------------------------------------------------------------------- /libibumad/man/umad_get_cas_names.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_GET_CAS_NAMES 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_get_cas_names \- get list of available InfiniBand device names 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_get_cas_names(char " "cas[][UMAD_CA_NAME_LEN]" ", int " "max" ); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_get_cas_names() 15 | fills the 16 | .I cas 17 | array with up to 18 | .I max 19 | local IB devices (CAs) names. 20 | The argument 21 | .I cas 22 | is a character array with 23 | .I max 24 | entries, each with 25 | .B UMAD_CA_NAME_LEN 26 | characters. 27 | .SH "RETURN VALUE" 28 | .B umad_get_cas_names() 29 | returns a non-negative value equal to the number of entries filled, 30 | or \-1 on errors. 31 | .SH "SEE ALSO" 32 | .BR umad_get_ca_portguids (3), 33 | .BR umad_open_port (3) 34 | .SH "AUTHORS" 35 | .TP 36 | Hal Rosenstock 37 | .TP 38 | Dotan Barak 39 | -------------------------------------------------------------------------------- /libibumad/man/umad_get_fd.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_GET_FD 3 "May 17, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_get_fd \- get the umad fd for the requested port 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_get_fd(int " "portid" ); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_get_fd() 15 | returns the umad fd for the port specified by 16 | .I portid\fR. 17 | .SH "RETURN VALUE" 18 | .B umad_get_fd() 19 | returns the fd for the 20 | .I portid\fR 21 | requested or -EINVAL if 22 | .I portid\fR 23 | is invalid. 24 | .SH "AUTHOR" 25 | .TP 26 | Hal Rosenstock 27 | -------------------------------------------------------------------------------- /libibumad/man/umad_get_mad.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_GET_MAD 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_get_mad \- get the MAD pointer of a umad buffer 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "void * umad_get_mad(void " "*umad"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_get_mad() 15 | returns a pointer to the MAD contained within the 16 | .I umad\fR 17 | buffer. 18 | .SH "RETURN VALUE" 19 | .B umad_get_mad() 20 | returns a pointer to the MAD contained within the supplied 21 | .I umad\fR 22 | buffer. 23 | .SH "AUTHOR" 24 | .TP 25 | Hal Rosenstock 26 | -------------------------------------------------------------------------------- /libibumad/man/umad_get_mad_addr.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_GET_MAD_ADDR 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_get_mad_addr \- get the address of the ib_mad_addr from a umad buffer 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "ib_mad_addr_t * umad_get_mad_addr(void " "*umad"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_get_mad_addr() 15 | returns a pointer to the ib_mad_addr struct within the specified 16 | .I umad\fR 17 | buffer. 18 | .SH "RETURN VALUE" 19 | The return value 20 | is a pointer to an 21 | .I ib_mad_addr_t 22 | struct, as specified in . 23 | .PP 24 | .nf 25 | typedef struct ib_mad_addr { 26 | .in +8 27 | uint32_t qpn; 28 | uint32_t qkey; 29 | uint16_t lid; 30 | uint8_t sl; 31 | uint8_t path_bits; 32 | uint8_t grh_present; 33 | uint8_t gid_index; 34 | uint8_t hop_limit; 35 | uint8_t traffic_class; 36 | uint8_t gid[16]; 37 | uint32_t flow_label; 38 | .in -8 39 | } ib_mad_addr_t; 40 | .fi 41 | .SH "AUTHOR" 42 | .TP 43 | Hal Rosenstock 44 | -------------------------------------------------------------------------------- /libibumad/man/umad_get_pkey.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_GET_PKEY 3 "Jan 15, 2008" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_get_pkey \- get pkey index from umad buffer 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_get_pkey(void " "*umad"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_get_pkey() 15 | gets the pkey index from the specified 16 | .I umad\fR 17 | buffer. 18 | .SH "RETURN VALUE" 19 | .B umad_get_pkey() 20 | returns value of pkey index (or zero if pkey index is not supported by 21 | user_mad interface). 22 | .SH "AUTHOR" 23 | .TP 24 | Sasha Khapyorsky 25 | -------------------------------------------------------------------------------- /libibumad/man/umad_init.3.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | date: "May 21, 2007" 4 | footer: "OpenIB" 5 | header: "OpenIB Programmer's Manual" 6 | layout: page 7 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' 8 | section: 3 9 | title: UMAD_INIT 10 | --- 11 | 12 | # NAME 13 | 14 | umad_init, umad_done - perform library initialization and finalization 15 | 16 | # SYNOPSIS 17 | 18 | ```c 19 | #include 20 | 21 | int umad_init(void); 22 | 23 | int umad_done(void); 24 | ``` 25 | 26 | # DESCRIPTION 27 | 28 | **umad_init()** and **umad_done()** do nothing. 29 | 30 | # RETURN VALUE 31 | 32 | Always 0. 33 | 34 | # COMPATIBILITY 35 | 36 | Versions prior to release 18 of the library require **umad_init()** to be 37 | called prior to using any other library functions. Old versions could return a 38 | failure code of -1 from **umad_init()**. 39 | 40 | For compatibility, applications should continue to call **umad_init()**, and 41 | check the return code, prior to calling other **umad_** functions. If 42 | **umad_init()** returns an error, then no further use of the umad library 43 | should be attempted. 44 | 45 | # AUTHORS 46 | 47 | Dotan Barak , 48 | Hal Rosenstock 49 | -------------------------------------------------------------------------------- /libibumad/man/umad_set_addr.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_SET_ADDR 3 "May 17, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_set_addr \- set MAD address fields within umad buffer using host ordering 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_set_addr(void " "*umad" ", int " "dlid" ", int " "dqp" ", int " "sl" ", int " "qkey"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_set_addr() 15 | sets the MAD address fields within the specified 16 | .I umad\fR 17 | buffer using the provided host ordered fields. 18 | .I dlid\fR 19 | is the destination LID. 20 | .I dqp\fR 21 | is the destination QP (queue pair). 22 | .I sl\fR 23 | is the SL (service level). 24 | .I qkey\fR 25 | is the Q_Key (queue key). 26 | .SH "RETURN VALUE" 27 | .B umad_set_addr() 28 | returns 0 on success, and a negative value on errors. Currently, there 29 | are no errors indicated. 30 | .SH "SEE ALSO" 31 | .BR umad_set_addr_net (3) 32 | .SH "AUTHOR" 33 | .TP 34 | Hal Rosenstock 35 | -------------------------------------------------------------------------------- /libibumad/man/umad_set_addr_net.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_SET_ADDR_NET 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_set_addr_net \- set MAD address fields within umad buffer using network ordering 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_set_addr_net(void " "*umad" ", __be16 " "dlid" ", __be32 " "dqp" ", int " "sl" ", __be32 " "qkey"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_set_addr_net() 15 | sets the MAD address fields within the specified 16 | .I umad\fR 17 | buffer using the provided network ordered fields. 18 | .I dlid\fR 19 | is the destination LID. 20 | .I dqp\fR 21 | is the destination QP (queue pair). 22 | .I sl\fR 23 | is the SL (service level). 24 | .I qkey\fR 25 | is the Q_Key (queue key). 26 | .SH "RETURN VALUE" 27 | .B umad_set_addr_net() 28 | returns 0 on success, and a negative value on errors. Currently, there 29 | are no errors indicated. 30 | .SH "SEE ALSO" 31 | .BR umad_set_addr (3) 32 | .SH "AUTHOR" 33 | .TP 34 | Hal Rosenstock 35 | -------------------------------------------------------------------------------- /libibumad/man/umad_set_pkey.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_SET_PKEY 3 "June 20, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_set_pkey \- set pkey index within umad buffer 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_set_pkey(void " "*umad" ", int " "pkey_index"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_set_pkey() 15 | sets the pkey index within the specified 16 | .I umad\fR 17 | buffer. 18 | .SH "RETURN VALUE" 19 | .B umad_set_pkey() 20 | returns 0 on success, and a negative value on an error. 21 | .SH "AUTHOR" 22 | .TP 23 | Hal Rosenstock 24 | -------------------------------------------------------------------------------- /libibumad/man/umad_size.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_SIZE 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_size \- get the size of umad buffer 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "size_t umad_size(void); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_size() 15 | returns the size of umad buffer (in bytes). 16 | .SH "RETURN VALUE" 17 | .B umad_size() 18 | returns the size of umad buffer (in bytes). 19 | .SH "AUTHOR" 20 | .TP 21 | Hal Rosenstock 22 | -------------------------------------------------------------------------------- /libibumad/man/umad_status.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_STATUS 3 "May 17, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_status \- get the status of a umad buffer 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_status(void " "*umad" ); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_status() 15 | get the internal 16 | .I umad\fR 17 | status field. 18 | .SH "RETURN VALUE" 19 | After a packet is received, 20 | .B umad_status() 21 | returns 0 on a successful receive, or a non zero status. 22 | ETIMEDOUT means that the packet had 23 | a send-timeout indication. In this case, the transaction ID will be 24 | set to the TID of the original request. 25 | .SH "AUTHOR" 26 | .TP 27 | Hal Rosenstock 28 | -------------------------------------------------------------------------------- /libibumad/man/umad_unregister.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 3 | .\" 4 | .TH UMAD_UNREGISTER 3 "May 21, 2007" "OpenIB" "OpenIB Programmer's Manual" 5 | .SH "NAME" 6 | umad_unregister \- unregister umad agent 7 | .SH "SYNOPSIS" 8 | .nf 9 | .B #include 10 | .sp 11 | .BI "int umad_unregister(int " "portid" ", int " "agentid"); 12 | .fi 13 | .SH "DESCRIPTION" 14 | .B umad_unregister() 15 | unregisters the specified 16 | .I agentid\fR 17 | previously registered using 18 | .B umad_register() 19 | or 20 | .B umad_register_oui()\fR. 21 | .SH "RETURN VALUE" 22 | .B umad_unregister() 23 | returns 0 on success and negative value on error as follows: 24 | -EINVAL invalid port handle or agentid 25 | * (kernel error codes) 26 | .SH "SEE ALSO" 27 | .BR umad_register (3), 28 | .BR umad_register_oui (3) 29 | .SH "AUTHOR" 30 | .TP 31 | Hal Rosenstock 32 | -------------------------------------------------------------------------------- /libibumad/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_test_executable(umad_reg2 umad_reg2_compat.c) 2 | target_link_libraries(umad_reg2 LINK_PRIVATE ibumad) 3 | 4 | rdma_test_executable(umad_register2 umad_register2.c) 5 | target_link_libraries(umad_register2 LINK_PRIVATE ibumad) 6 | 7 | rdma_test_executable(umad_sa_mcm_rereg_test umad_sa_mcm_rereg_test.c) 8 | target_link_libraries(umad_sa_mcm_rereg_test LINK_PRIVATE ibumad) 9 | 10 | rdma_test_executable(umad_compile_test umad_compile_test.c) 11 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_asyncwatch.1: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH IBV_ASYNCWATCH 1 "August 30, 2005" "libibverbs" "USER COMMANDS" 3 | 4 | .SH NAME 5 | ibv_asyncwatch \- display asynchronous events 6 | 7 | .SH SYNOPSIS 8 | .B ibv_asyncwatch 9 | [\-d device] [-h] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | Display asynchronous events forwarded to userspace for an RDMA device. 14 | 15 | .SH OPTIONS 16 | 17 | .PP 18 | .TP 19 | \fB\-d\fR, \fB\-\-ib\-dev\fR=\fIDEVICE\fR 20 | use IB device \fIDEVICE\fR (default first device found) 21 | .TP 22 | \fB\-h\fR, \fB\-\-help\fR=\fIDEVICE\fR 23 | Print a help text and exit. 24 | 25 | .SH AUTHORS 26 | .TP 27 | Roland Dreier 28 | .RI < rolandd@cisco.com > 29 | .TP 30 | Eran Ben Elisha 31 | .RI < eranbe@mellanox.com > 32 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_devices.1: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH IBV_DEVICES 1 "August 30, 2005" "libibverbs" "USER COMMANDS" 3 | 4 | .SH NAME 5 | ibv_devices \- list RDMA devices 6 | 7 | .SH SYNOPSIS 8 | .B ibv_devices 9 | 10 | .SH DESCRIPTION 11 | .PP 12 | List RDMA devices available for use from userspace. 13 | 14 | .SH SEE ALSO 15 | .BR ibv_devinfo (1) 16 | 17 | .SH AUTHORS 18 | .TP 19 | Roland Dreier 20 | .RI < rolandd@cisco.com > 21 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_devinfo.1: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH IBV_DEVINFO 1 "August 30, 2005" "libibverbs" "USER COMMANDS" 3 | 4 | .SH NAME 5 | ibv_devinfo \- query RDMA devices 6 | 7 | .SH SYNOPSIS 8 | .B ibv_devinfo 9 | [\-d device] [\-i port] [\-l] [\-v] 10 | 11 | .SH DESCRIPTION 12 | .PP 13 | Print information about RDMA devices available for use from userspace. 14 | 15 | .SH OPTIONS 16 | 17 | .PP 18 | .TP 19 | \fB\-d\fR, \fB\-\-ib\-dev\fR=\fIDEVICE\fR 20 | use IB device \fIDEVICE\fR (default all devices) 21 | 22 | \fB\-i\fR, \fB\-\-ib\-port\fR=\fIPORT\fR 23 | query port \fIPORT\fR (default all ports) 24 | 25 | \fB\-l\fR, \fB\-\-list\fR 26 | only list names of RDMA devices 27 | 28 | \fB\-v\fR, \fB\-\-verbose\fR 29 | print all available information about RDMA devices 30 | 31 | .SH SEE ALSO 32 | .BR ibv_devices (1) 33 | 34 | .SH AUTHORS 35 | .TP 36 | Dotan Barak 37 | .RI < dotanba@gmail.com > 38 | .TP 39 | Roland Dreier 40 | .RI < rolandd@cisco.com > 41 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_get_device_guid.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2006-10-31 3 | footer: libibverbs 4 | header: "Libibverbs Programmer's Manual" 5 | layout: page 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' 7 | section: 3 8 | title: IBV_GET_DEVICE_GUID 9 | --- 10 | 11 | # NAME 12 | 13 | ibv_get_device_guid - get an RDMA device's GUID 14 | 15 | # SYNOPSIS 16 | 17 | ```c 18 | #include 19 | 20 | uint64_t ibv_get_device_guid(struct ibv_device *device); 21 | ``` 22 | 23 | # DESCRIPTION 24 | 25 | **ibv_get_device_guid()** returns the Global Unique IDentifier (GUID) of the 26 | RDMA device *device*. 27 | 28 | # RETURN VALUE 29 | 30 | **ibv_get_device_guid()** returns the GUID of the device in network byte 31 | order. 32 | 33 | # SEE ALSO 34 | **ibv_get_device_index**(3), 35 | **ibv_get_device_list**(3), 36 | **ibv_get_device_name**(3), 37 | **ibv_open_device**(3) 38 | 39 | # AUTHOR 40 | 41 | Dotan Barak 42 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_get_device_index.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: ' 2020-04-22' 3 | footer: libibverbs 4 | header: "Libibverbs Programmer's Manual" 5 | layout: page 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' 7 | section: 3 8 | title: IBV_GET_DEVICE_INDEX 9 | --- 10 | 11 | # NAME 12 | 13 | ibv_get_device_index - get an RDMA device index 14 | 15 | # SYNOPSIS 16 | 17 | ```c 18 | #include 19 | 20 | int ibv_get_device_index(struct ibv_device *device); 21 | ``` 22 | 23 | # DESCRIPTION 24 | 25 | **ibv_get_device_index()** returns stable IB device index as it is assigned by the kernel. 26 | 27 | # RETURN VALUE 28 | 29 | **ibv_get_device_index()** returns an index, or -1 if the kernel doesn't support device indexes. 30 | 31 | # SEE ALSO 32 | 33 | **ibv_get_device_name**(3), 34 | **ibv_get_device_guid**(3), 35 | **ibv_get_device_list**(3), 36 | **ibv_open_device**(3) 37 | 38 | # AUTHOR 39 | 40 | Leon Romanovsky 41 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_get_device_name.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: ' 2006-10-31' 3 | footer: libibverbs 4 | header: "Libibverbs Programmer's Manual" 5 | layout: page 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' 7 | section: 3 8 | title: IBV_GET_DEVICE_NAME 9 | --- 10 | 11 | # NAME 12 | 13 | ibv_get_device_name - get an RDMA device's name 14 | 15 | # SYNOPSIS 16 | 17 | ```c 18 | #include 19 | 20 | const char *ibv_get_device_name(struct ibv_device *device); 21 | ``` 22 | 23 | # DESCRIPTION 24 | 25 | **ibv_get_device_name()** returns a human-readable name associated with the 26 | RDMA device *device*. 27 | 28 | # RETURN VALUE 29 | 30 | **ibv_get_device_name()** returns a pointer to the device name, or NULL if the 31 | request fails. 32 | 33 | # SEE ALSO 34 | 35 | **ibv_get_device_guid**(3), 36 | **ibv_get_device_list**(3), 37 | **ibv_open_device**(3) 38 | 39 | # AUTHOR 40 | 41 | Dotan Barak 42 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_get_srq_num.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2013-06-26 3 | footer: libibverbs 4 | header: "Libibverbs Programmer's Manual" 5 | layout: page 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' 7 | section: 3 8 | title: IBV_GET_SRQ_NUM 9 | --- 10 | 11 | # NAME 12 | 13 | ibv_get_srq_num - return srq number associated with the given shared receive 14 | queue (SRQ) 15 | 16 | # SYNOPSIS 17 | 18 | ```c 19 | #include 20 | 21 | int ibv_get_srq_num(struct ibv_srq *srq, uint32_t *srq_num); 22 | ``` 23 | 24 | # DESCRIPTION 25 | 26 | **ibv_get_srq_num()** return srq number associated with the given XRC shared 27 | receive queue The argument *srq* is an ibv_srq struct, as defined in 28 | . *srq_num* is an output parameter that holds the returned 29 | srq number. 30 | 31 | 32 | # RETURN VALUE 33 | 34 | **ibv_get_srq_num()** returns 0 on success, or the value of errno on failure 35 | (which indicates the failure reason). 36 | 37 | # SEE ALSO 38 | 39 | **ibv_alloc_pd**(3), 40 | **ibv_create_srq_ex**(3), 41 | **ibv_modify_srq**(3) 42 | 43 | # AUTHOR 44 | 45 | Yishai Hadas 46 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_inc_rkey.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2015-01-29 3 | footer: libibverbs 4 | header: "Libibverbs Programmer's Manual" 5 | layout: page 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' 7 | section: 3 8 | title: IBV_INC_RKEY 9 | --- 10 | 11 | # NAME 12 | 13 | ibv_inc_rkey - creates a new rkey from the given one 14 | 15 | # SYNOPSIS 16 | 17 | ```c 18 | #include 19 | 20 | uint32_t ibv_inc_rkey(uint32_t rkey); 21 | ``` 22 | 23 | # DESCRIPTION 24 | 25 | **ibv_inc_rkey()** Increases the 8 LSB of *rkey* and returns the new value. 26 | 27 | 28 | # RETURN VALUE 29 | 30 | **ibv_inc_rkey()** returns the new rkey. 31 | 32 | # NOTES 33 | 34 | 35 | The verb generates a new rkey that is different from the previous one on its 36 | tag part but has the same index (bits 0xffffff00). A use case for this verb 37 | can be to create a new rkey from a Memory window's rkey when binding it to a 38 | Memory region. 39 | 40 | # AUTHORS 41 | 42 | Majd Dibbiny , 43 | Yishai Hadas 44 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_query_gid.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2006-10-31 3 | footer: libibverbs 4 | header: "Libibverbs Programmer's Manual" 5 | layout: page 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' 7 | section: 3 8 | title: IBV_QUERY_GID 9 | --- 10 | 11 | # NAME 12 | 13 | ibv_query_gid - query an InfiniBand port's GID table 14 | 15 | # SYNOPSIS 16 | 17 | ```c 18 | #include 19 | 20 | int ibv_query_gid(struct ibv_context *context, 21 | uint8_t port_num, 22 | int index, 23 | union ibv_gid *gid); 24 | ``` 25 | 26 | # DESCRIPTION 27 | 28 | **ibv_query_gid()** returns the GID value in entry *index* of port *port_num* 29 | for device context *context* through the pointer *gid*. 30 | 31 | # RETURN VALUE 32 | 33 | **ibv_query_gid()** returns 0 on success, and -1 on error. 34 | 35 | # SEE ALSO 36 | 37 | **ibv_open_device**(3), 38 | **ibv_query_device**(3), 39 | **ibv_query_pkey**(3), 40 | **ibv_query_port**(3) 41 | 42 | # AUTHOR 43 | 44 | Dotan Barak 45 | -------------------------------------------------------------------------------- /libibverbs/man/ibv_query_pkey.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2006-10-31 3 | footer: libibverbs 4 | header: "Libibverbs Programmer's Manual" 5 | layout: page 6 | license: 'Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md' 7 | section: 3 8 | title: IBV_QUERY_PKEY 9 | --- 10 | 11 | # NAME 12 | 13 | ibv_query_pkey - query an InfiniBand port's P_Key table 14 | 15 | # SYNOPSIS 16 | 17 | ```c 18 | #include 19 | 20 | int ibv_query_pkey(struct ibv_context *context, 21 | uint8_t port_num, 22 | int index, 23 | uint16_t *pkey); 24 | ``` 25 | 26 | # DESCRIPTION 27 | 28 | **ibv_query_pkey()** returns the P_Key value (in network byte order) in entry 29 | *index* of port *port_num* for device context *context* through the pointer 30 | *pkey*. 31 | 32 | # RETURN VALUE 33 | 34 | **ibv_query_pkey()** returns 0 on success, and -1 on error. 35 | 36 | # SEE ALSO 37 | 38 | **ibv_open_device**(3), 39 | **ibv_query_device**(3), 40 | **ibv_query_gid**(3), 41 | **ibv_query_port**(3) 42 | 43 | # AUTHOR 44 | 45 | Dotan Barak 46 | -------------------------------------------------------------------------------- /librdmacm/librspreload.map: -------------------------------------------------------------------------------- 1 | { 2 | /* FIXME: It is probably not a great idea to not tag these with the 3 | proper symbol version from glibc, at least if glibc ever changes 4 | the signature this will go sideways.. */ 5 | global: 6 | accept; 7 | bind; 8 | close; 9 | connect; 10 | dup2; 11 | fcntl; 12 | getpeername; 13 | getsockname; 14 | getsockopt; 15 | listen; 16 | poll; 17 | read; 18 | readv; 19 | recv; 20 | recvfrom; 21 | recvmsg; 22 | select; 23 | send; 24 | sendfile; 25 | sendmsg; 26 | sendto; 27 | setsockopt; 28 | shutdown; 29 | socket; 30 | write; 31 | writev; 32 | local: *; 33 | }; 34 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_ack_cm_event.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_ACK_CM_EVENT" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_ack_cm_event \- Free a communication event. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "int" rdma_ack_cm_event 9 | .BI "(struct rdma_cm_event *" event ");" 10 | .SH ARGUMENTS 11 | .IP "event" 12 12 | Event to be released. 13 | .SH "DESCRIPTION" 14 | All events which are allocated by rdma_get_cm_event must be released, 15 | there should be a one-to-one correspondence between successful gets 16 | and acks. This call frees the event structure and any memory that it 17 | references. 18 | .SH "RETURN VALUE" 19 | Returns 0 on success, or -1 on error. If an error occurs, errno will be 20 | set to indicate the failure reason. 21 | .SH "SEE ALSO" 22 | rdma_get_cm_event(3), rdma_destroy_id(3) 23 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_destroy_ep.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | 3 | .TH "RDMA_DESTROY_EP" 3 "2011-06-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 4 | .SH NAME 5 | rdma_destroy_ep \- Release a communication identifier. 6 | .SH SYNOPSIS 7 | .B "#include " 8 | .P 9 | .B "void" rdma_destroy_ep 10 | .BI "(struct rdma_cm_id *" id ");" 11 | .SH ARGUMENTS 12 | .IP "id" 12 13 | The communication identifier to destroy. 14 | .SH "DESCRIPTION" 15 | Destroys the specified rdma_cm_id and all associated resources 16 | .SH "NOTES" 17 | rdma_destroy_ep will automatically destroy any QP and SRQ associated with 18 | the rdma_cm_id. 19 | .SH "SEE ALSO" 20 | rdma_create_ep(3) 21 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_destroy_event_channel.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_DESTROY_EVENT_CHANNEL" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_destroy_event_channel \- Close an event communication channel. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "void" rdma_destroy_event_channel 9 | .BI "(struct rdma_event_channel *" channel ");" 10 | .SH ARGUMENTS 11 | .IP "channel" 12 12 | The communication channel to destroy. 13 | .SH "DESCRIPTION" 14 | Release all resources associated with an event channel and closes the 15 | associated file descriptor. 16 | .SH "RETURN VALUE" 17 | None 18 | .SH "NOTES" 19 | All rdma_cm_id's associated with the event channel must be destroyed, 20 | and all returned events must be acked before calling this function. 21 | .SH "SEE ALSO" 22 | rdma_create_event_channel(3), rdma_get_cm_event(3), rdma_ack_cm_event(3) 23 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_destroy_id.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_DESTROY_ID" 3 "2010-07-19" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_destroy_id \- Release a communication identifier. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "int" rdma_destroy_id 9 | .BI "(struct rdma_cm_id *" id ");" 10 | .SH ARGUMENTS 11 | .IP "id" 12 12 | The communication identifier to destroy. 13 | .SH "DESCRIPTION" 14 | Destroys the specified rdma_cm_id and cancels any outstanding 15 | asynchronous operation. 16 | .SH "RETURN VALUE" 17 | Returns 0 on success, or -1 on error. If an error occurs, errno will be 18 | set to indicate the failure reason. 19 | .SH "NOTES" 20 | Users must free any associated QP with the rdma_cm_id before 21 | calling this routine and ack all related events. 22 | .SH "SEE ALSO" 23 | rdma_create_id(3), rdma_destroy_qp(3), rdma_ack_cm_event(3) 24 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_destroy_qp.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_DESTROY_QP" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_destroy_qp \- Deallocate a QP. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "void" rdma_destroy_qp 9 | .BI "(struct rdma_cm_id *" id ");" 10 | .SH ARGUMENTS 11 | .IP "id" 12 12 | RDMA identifier. 13 | .SH "DESCRIPTION" 14 | Destroy a QP allocated on the rdma_cm_id. 15 | .SH "NOTES" 16 | Users must destroy any QP associated with an rdma_cm_id before 17 | destroying the ID. 18 | .SH "SEE ALSO" 19 | rdma_create_qp(3), rdma_destroy_id(3), ibv_destroy_qp(3) 20 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_destroy_srq.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_DESTROY_SRQ" 3 "2011-06-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_destroy_srq \- Deallocate a SRQ. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "void" rdma_destroy_srq 9 | .BI "(struct rdma_cm_id *" id ");" 10 | .SH ARGUMENTS 11 | .IP "id" 12 12 | RDMA identifier. 13 | .SH "DESCRIPTION" 14 | Destroy an SRQ allocated on the rdma_cm_id. 15 | .SH "RETURN VALUE" 16 | None 17 | .SH "NOTES" 18 | Users should destroy any SRQ associated with an rdma_cm_id before 19 | destroying the ID. 20 | .SH "SEE ALSO" 21 | rdma_create_srq(3), rdma_destroy_id(3), ibv_destroy_srq(3) 22 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_disconnect.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_DISCONNECT" 3 "2008-01-02" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_disconnect \- This function disconnects a connection. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "int" rdma_disconnect 9 | .BI "(struct rdma_cm_id *" id ");" 10 | .SH ARGUMENTS 11 | .IP "id" 12 12 | RDMA identifier. 13 | .SH "DESCRIPTION" 14 | Disconnects a connection and transitions any associated QP to the error state, 15 | which will flush any posted work requests to the completion queue. This 16 | routine should be called by both the client and server side of a connection. 17 | After successfully disconnecting, an RDMA_CM_EVENT_DISCONNECTED event will be 18 | generated on both sides of the connection. 19 | .SH "RETURN VALUE" 20 | Returns 0 on success, or -1 on error. If an error occurs, errno will be 21 | set to indicate the failure reason. 22 | .SH "SEE ALSO" 23 | rdma_connect(3), rdma_listen(3), rdma_accept(3), rdma_get_cm_event(3) 24 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_event_str.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_EVENT_STR" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_event_str \- Returns a string representation of an rdma cm event. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "char *" rdma_event_str 9 | .BI "("enum rdma_cm_event_type " event ");" 10 | .SH ARGUMENTS 11 | .IP "event" 12 12 | Asynchronous event. 13 | .SH "DESCRIPTION" 14 | Returns a string representation of an asynchronous event. 15 | .SH "RETURN VALUE" 16 | Returns a pointer to a static character string corresponding to the event. 17 | .SH "SEE ALSO" 18 | rdma_get_cm_event(3) 19 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_free_devices.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_FREE_DEVICES" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_free_devices \- Frees the list of devices returned by rdma_get_devices. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "void" rdma_free_devices 9 | .BI "(struct ibv_context **" list ");" 10 | .SH ARGUMENTS 11 | .IP "list" 12 12 | List of devices returned from rdma_get_devices. 13 | .SH "DESCRIPTION" 14 | Frees the device array returned by rdma_get_devices. 15 | .SH "RETURN VALUE" 16 | None 17 | .SH "SEE ALSO" 18 | rdma_get_devices(3) 19 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_freeaddrinfo.3.in.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | RDMA_FREEADDRINFO 3 | ================= 4 | 5 | ----------------------------------------------------------------------- 6 | Frees the list of rdma_addrinfo structures returned by rdma_getaddrinfo 7 | ----------------------------------------------------------------------- 8 | 9 | :Date: 2025-02-03 10 | :Manual section: 3 11 | :Manual group: Librdmacm Programmer's Manual 12 | 13 | 14 | SYNOPSIS 15 | ======== 16 | 17 | #include 18 | 19 | void rdma_freeaddrinfo (struct rdma_addrinfo \*res); 20 | 21 | ARGUMENTS 22 | ========= 23 | 24 | res List of rdma_addrinfo structures returned by rdma_getaddrinfo. 25 | 26 | DESCRIPTION 27 | =========== 28 | 29 | Frees the list of rdma_addrinfo structures returned by rdma_getaddrinfo. 30 | 31 | RETURN VALUE 32 | ============ 33 | 34 | None 35 | 36 | SEE ALSO 37 | ======== 38 | 39 | rdma_getaddrinfo(3) 40 | 41 | AUTHOR 42 | ====== 43 | 44 | Mark Zhang 45 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_get_devices.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_GET_DEVICES" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_get_devices \- Get a list of RDMA devices currently available. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "struct ibv_context **" rdma_get_devices 9 | .BI "(int *" num_devices ");" 10 | .SH ARGUMENTS 11 | .IP "num_devices" 12 12 | If non-NULL, set to the number of devices returned. 13 | .SH "DESCRIPTION" 14 | Return a NULL-terminated array of opened RDMA devices. Callers can use 15 | this routine to allocate resources on specific RDMA devices that will be 16 | shared across multiple rdma_cm_id's. 17 | .SH "RETURN VALUE" 18 | Returns an array of available RDMA devices, or NULL if the request 19 | fails. On failure, errno will be set to indicate the failure reason. 20 | .SH "NOTES" 21 | The returned array must be released by calling rdma_free_devices. Devices 22 | remain opened while the librdmacm is loaded. 23 | .SH "SEE ALSO" 24 | rdma_free_devices(3) 25 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_get_dst_port.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_GET_DST_PORT" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_get_dst_port \- Returns the remote port number of a bound rdma_cm_id. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "uint16_t" rdma_get_dst_port 9 | .BI "(struct rdma_cm_id *" id ");" 10 | .SH ARGUMENTS 11 | .IP "id" 12 12 | RDMA identifier. 13 | .SH "DESCRIPTION" 14 | Returns the remote port number for an rdma_cm_id that has been bound to 15 | a remote address. 16 | .SH "RETURN VALUE" 17 | Returns the 16-bit port identifier associated with the peer endpoint. If 18 | the rdma_cm_id is not connected, the returned value is 0. 19 | .SH "SEE ALSO" 20 | rdma_connect(3), rdma_accept(3), rdma_get_cm_event(3), rdma_get_src_port(3), 21 | rdma_get_local_addr(3), rdma_get_peer_addr(3) 22 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_get_local_addr.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_GET_LOCAL_ADDR" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_get_local_addr \- Returns the local IP address of a bound rdma_cm_id. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "struct sockaddr *" rdma_get_local_addr 9 | .BI "(struct rdma_cm_id *" id ");" 10 | .SH ARGUMENTS 11 | .IP "id" 12 12 | RDMA identifier. 13 | .SH "DESCRIPTION" 14 | Returns the local IP address for an rdma_cm_id that has been bound to 15 | a local device. 16 | .SH "RETURN VALUE" 17 | Returns a pointer to the local sockaddr address of the rdma_cm_id. If 18 | the rdma_cm_id is not bound to an address, the contents of the sockaddr 19 | structure will be set to all zeroes. 20 | .SH "SEE ALSO" 21 | rdma_bind_addr(3), rdma_resolve_addr(3), rdma_get_src_port(3), 22 | rdma_get_dst_port(3), rdma_get_peer_addr(3) 23 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_get_peer_addr.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_GET_PEER_ADDR" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_get_peer_addr \- Returns the remote IP address of a bound rdma_cm_id. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "struct sockaddr *" rdma_get_peer_addr 9 | .BI "(struct rdma_cm_id *" id ");" 10 | .SH ARGUMENTS 11 | .IP "id" 12 12 | RDMA identifier. 13 | .SH "DESCRIPTION" 14 | Returns the remote IP address associated with an rdma_cm_id. 15 | .SH "RETURN VALUE" 16 | Returns a pointer to the sockaddr address of the connected peer. If 17 | the rdma_cm_id is not connected, the contents of the sockaddr 18 | structure will be set to all zeroes. 19 | .SH "SEE ALSO" 20 | rdma_resolve_addr(3), rdma_get_src_port(3), rdma_get_dst_port(3), 21 | rdma_get_local_addr(3) 22 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_get_src_port.3: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_GET_SRC_PORT" 3 "2007-05-15" "librdmacm" "Librdmacm Programmer's Manual" librdmacm 3 | .SH NAME 4 | rdma_get_src_port \- Returns the local port number of a bound rdma_cm_id. 5 | .SH SYNOPSIS 6 | .B "#include " 7 | .P 8 | .B "uint16_t" rdma_get_src_port 9 | .BI "(struct rdma_cm_id *" id ");" 10 | .SH ARGUMENTS 11 | .IP "id" 12 12 | RDMA identifier. 13 | .SH "DESCRIPTION" 14 | Returns the local port number for an rdma_cm_id that has been bound to 15 | a local address. 16 | .SH "RETURN VALUE" 17 | Returns the 16-bit port identifier associated with the local endpoint. If 18 | the rdma_cm_id is not bound to a port, the returned value is 0. 19 | .SH "SEE ALSO" 20 | rdma_bind_addr(3), rdma_resolve_addr(3), rdma_get_dst_port(3), 21 | rdma_get_local_addr(3), rdma_get_peer_addr(3) 22 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_server.1: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_SERVER" 1 "2010-07-19" "librdmacm" "librdmacm" librdmacm 3 | .SH NAME 4 | rdma_server \- simple RDMA CM connection and ping-pong test. 5 | .SH SYNOPSIS 6 | .sp 7 | .nf 8 | \fIrdma_server\fR [-p port] 9 | .fi 10 | .SH "DESCRIPTION" 11 | Uses synchronous librdmam calls to establish an RDMA connections between 12 | two nodes. This example is intended to provide a very simple coding 13 | example of how to use RDMA. 14 | .SH "OPTIONS" 15 | .TP 16 | \-s server_address 17 | Specifies the address that the rdma_server listens on. By default the 18 | server listens on any address(0.0.0.0). 19 | .TP 20 | \-p port 21 | Changes the port number that the server listens on. By default the server 22 | listens on port 7471. 23 | .SH "NOTES" 24 | Basic usage is to start rdma_server, then connect to the server using the 25 | rdma_client program. 26 | .P 27 | Because this test maps RDMA resources to userspace, users must ensure 28 | that they have available system resources and permissions. See the 29 | libibverbs README file for additional details. 30 | .SH "SEE ALSO" 31 | rdma_cm(7), udaddy(1), mckey(1), rping(1), rdma_client(1) 32 | -------------------------------------------------------------------------------- /librdmacm/man/rdma_xserver.1: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH "RDMA_XSERVER" 1 "2011-06-15" "librdmacm" "librdmacm" librdmacm 3 | .SH NAME 4 | rdma_xserver \- RDMA CM communication server test program 5 | .SH SYNOPSIS 6 | .sp 7 | .nf 8 | \fIrdma_xserver\fR [-p port] [-c comm_type] 9 | .fi 10 | .SH "DESCRIPTION" 11 | Uses the librdmacm to establish various forms of communication and exchange 12 | data. 13 | .SH "OPTIONS" 14 | .TP 15 | \-p port 16 | Changes the port number that the server listens on. By default the server 17 | listens on port 7471. 18 | .TP 19 | \-c communication type 20 | Specifies the type of communication established with the client program. 'r' 21 | results in using a reliable-connected QP (the default). 'x' uses 22 | extended reliable-connected XRC QPs. 23 | .SH "NOTES" 24 | Basic usage is to start rdma_xserver, then connect to the server using the 25 | rdma_xclient program. 26 | .P 27 | Because this test maps RDMA resources to userspace, users must ensure 28 | that they have available system resources and permissions. See the 29 | libibverbs README file for additional details. 30 | .SH "SEE ALSO" 31 | rdma_cm(7), udaddy(1), mckey(1), rping(1), rdma_server(1), rdma_xclient(1) 32 | -------------------------------------------------------------------------------- /providers/bnxt_re/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_provider(bnxt_re 2 | db.c 3 | main.c 4 | memory.c 5 | verbs.c 6 | ) 7 | -------------------------------------------------------------------------------- /providers/cxgb4/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NO_STRICT_ALIASING_FLAGS}") 2 | 3 | rdma_provider(cxgb4 4 | cq.c 5 | dev.c 6 | qp.c 7 | verbs.c 8 | ) 9 | -------------------------------------------------------------------------------- /providers/efa/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (ENABLE_LTTNG AND LTTNGUST_FOUND) 2 | set(TRACE_FILE efa_trace.c) 3 | endif() 4 | 5 | rdma_shared_provider(efa libefa.map 6 | 1 1.3.${PACKAGE_VERSION} 7 | ${TRACE_FILE} 8 | efa.c 9 | verbs.c 10 | ) 11 | 12 | publish_headers(infiniband 13 | efadv.h 14 | ) 15 | 16 | rdma_pkg_config("efa" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}") 17 | 18 | if (ENABLE_LTTNG AND LTTNGUST_FOUND) 19 | target_include_directories(efa PUBLIC ".") 20 | target_link_libraries(efa LINK_PRIVATE LTTng::UST) 21 | endif() 22 | -------------------------------------------------------------------------------- /providers/efa/efa-abi.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ 2 | /* 3 | * Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All rights reserved. 4 | */ 5 | 6 | #ifndef __EFA_ABI_H__ 7 | #define __EFA_ABI_H__ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #define EFA_ABI_VERSION 1 14 | 15 | DECLARE_DRV_CMD(efa_alloc_ucontext, IB_USER_VERBS_CMD_GET_CONTEXT, 16 | efa_ibv_alloc_ucontext_cmd, efa_ibv_alloc_ucontext_resp); 17 | DECLARE_DRV_CMD(efa_alloc_pd, IB_USER_VERBS_CMD_ALLOC_PD, empty, 18 | efa_ibv_alloc_pd_resp); 19 | DECLARE_DRV_CMD(efa_create_cq, IB_USER_VERBS_EX_CMD_CREATE_CQ, 20 | efa_ibv_create_cq, efa_ibv_create_cq_resp); 21 | DECLARE_DRV_CMD(efa_create_qp, IB_USER_VERBS_CMD_CREATE_QP, efa_ibv_create_qp, 22 | efa_ibv_create_qp_resp); 23 | DECLARE_DRV_CMD(efa_create_ah, IB_USER_VERBS_CMD_CREATE_AH, empty, 24 | efa_ibv_create_ah_resp); 25 | DECLARE_DRV_CMD(efa_query_device_ex, IB_USER_VERBS_EX_CMD_QUERY_DEVICE, empty, 26 | efa_ibv_ex_query_device_resp); 27 | 28 | #endif /* __EFA_ABI_H__ */ 29 | -------------------------------------------------------------------------------- /providers/efa/efa_io_regs_defs.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ 2 | /* 3 | * Copyright 2021 Amazon.com, Inc. or its affiliates. All rights reserved. 4 | */ 5 | 6 | #ifndef _EFA_IO_REGS_H_ 7 | #define _EFA_IO_REGS_H_ 8 | 9 | /* cq_db register */ 10 | #define EFA_IO_REGS_CQ_DB_CONSUMER_INDEX_MASK 0xffff 11 | #define EFA_IO_REGS_CQ_DB_CMD_SN_MASK 0x60000000 12 | #define EFA_IO_REGS_CQ_DB_ARM_MASK 0x80000000 13 | 14 | #endif /* _EFA_IO_REGS_H_ */ 15 | -------------------------------------------------------------------------------- /providers/efa/efa_trace.c: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ 2 | /* 3 | * Copyright 2023 Amazon.com, Inc. or its affiliates. All rights reserved. 4 | */ 5 | 6 | #define LTTNG_UST_TRACEPOINT_CREATE_PROBES 7 | #define LTTNG_UST_TRACEPOINT_DEFINE 8 | 9 | #include "efa_trace.h" 10 | -------------------------------------------------------------------------------- /providers/efa/libefa.map: -------------------------------------------------------------------------------- 1 | /* Export symbols should be added below according to 2 | Documentation/versioning.md document. */ 3 | EFA_1.0 { 4 | global: 5 | efadv_create_driver_qp; 6 | local: *; 7 | }; 8 | 9 | EFA_1.1 { 10 | global: 11 | efadv_create_qp_ex; 12 | efadv_query_ah; 13 | efadv_query_device; 14 | } EFA_1.0; 15 | 16 | EFA_1.2 { 17 | global: 18 | efadv_cq_from_ibv_cq_ex; 19 | efadv_create_cq; 20 | } EFA_1.1; 21 | 22 | EFA_1.3 { 23 | global: 24 | efadv_query_mr; 25 | } EFA_1.2; 26 | -------------------------------------------------------------------------------- /providers/efa/man/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_man_pages( 2 | efadv.7.md 3 | efadv_create_driver_qp.3.md 4 | efadv_create_qp_ex.3.md 5 | efadv_query_ah.3.md 6 | efadv_query_device.3.md 7 | efadv_query_mr.3.md 8 | ) 9 | -------------------------------------------------------------------------------- /providers/efa/man/efadv.7.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: EFADV 4 | section: 7 5 | tagline: Verbs 6 | date: 2019-01-19 7 | header: "EFA Direct Verbs Manual" 8 | footer: efa 9 | --- 10 | 11 | # NAME 12 | 13 | efadv - Direct verbs for efa devices 14 | 15 | This provides low level access to efa devices to perform direct operations, 16 | without general branching performed by libibverbs. 17 | 18 | # DESCRIPTION 19 | The libibverbs API is an abstract one. It is agnostic to any underlying 20 | provider specific implementation. While this abstraction has the advantage 21 | of user applications portability, it has a performance penalty. For some 22 | applications optimizing performance is more important than portability. 23 | 24 | The efa direct verbs API is intended for such applications. 25 | It exposes efa specific low level operations, allowing the application 26 | to bypass the libibverbs API. 27 | 28 | The direct include of efadv.h together with linkage to efa library will 29 | allow usage of this new interface. 30 | 31 | # SEE ALSO 32 | **verbs**(7) 33 | 34 | # AUTHORS 35 | 36 | Gal Pressman 37 | -------------------------------------------------------------------------------- /providers/erdma/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_provider(erdma 2 | erdma.c 3 | erdma_db.c 4 | erdma_verbs.c 5 | ) 6 | -------------------------------------------------------------------------------- /providers/erdma/erdma_abi.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 or OpenIB.org BSD (MIT) See COPYING file */ 2 | /* 3 | * Authors: Cheng Xu 4 | * Copyright (c) 2020-2021, Alibaba Group. 5 | */ 6 | 7 | #ifndef __ERDMA_ABI_H__ 8 | #define __ERDMA_ABI_H__ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | DECLARE_DRV_CMD(erdma_cmd_alloc_context, IB_USER_VERBS_CMD_GET_CONTEXT, empty, 15 | erdma_uresp_alloc_ctx); 16 | DECLARE_DRV_CMD(erdma_cmd_create_cq, IB_USER_VERBS_CMD_CREATE_CQ, 17 | erdma_ureq_create_cq, erdma_uresp_create_cq); 18 | DECLARE_DRV_CMD(erdma_cmd_create_qp, IB_USER_VERBS_CMD_CREATE_QP, 19 | erdma_ureq_create_qp, erdma_uresp_create_qp); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /providers/erdma/erdma_db.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 or OpenIB.org BSD (MIT) See COPYING file */ 2 | /* 3 | * Authors: Cheng Xu 4 | * Copyright (c) 2020-2021, Alibaba Group. 5 | */ 6 | 7 | #ifndef __ERDMA_DB_H__ 8 | #define __ERDMA_DB_H__ 9 | 10 | #include 11 | 12 | #include "erdma.h" 13 | 14 | uint64_t *erdma_alloc_dbrecords(struct erdma_context *ctx); 15 | void erdma_dealloc_dbrecords(struct erdma_context *ctx, uint64_t *dbrecords); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /providers/hfi1verbs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_provider(hfi1verbs 2 | hfiverbs.c 3 | verbs.c 4 | ) 5 | -------------------------------------------------------------------------------- /providers/hns/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (ENABLE_LTTNG AND LTTNGUST_FOUND) 2 | set(TRACE_FILE hns_roce_u_trace.c) 3 | endif() 4 | 5 | rdma_shared_provider(hns libhns.map 6 | 1 1.0.${PACKAGE_VERSION} 7 | ${TRACE_FILE} 8 | hns_roce_u.c 9 | hns_roce_u_buf.c 10 | hns_roce_u_db.c 11 | hns_roce_u_hw_v2.c 12 | hns_roce_u_verbs.c 13 | ) 14 | 15 | publish_headers(infiniband 16 | hnsdv.h 17 | ) 18 | 19 | rdma_pkg_config("hns" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}") 20 | 21 | if (ENABLE_LTTNG AND LTTNGUST_FOUND) 22 | target_include_directories(hns PUBLIC ".") 23 | target_link_libraries(hns LINK_PRIVATE LTTng::UST) 24 | endif() 25 | -------------------------------------------------------------------------------- /providers/hns/hns_roce_u_trace.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 2 | /* 3 | * Copyright (c) 2025 Hisilicon Limited. 4 | */ 5 | 6 | #define LTTNG_UST_TRACEPOINT_CREATE_PROBES 7 | #define LTTNG_UST_TRACEPOINT_DEFINE 8 | 9 | #include "hns_roce_u_trace.h" 10 | -------------------------------------------------------------------------------- /providers/hns/libhns.map: -------------------------------------------------------------------------------- 1 | /* Export symbols should be added below according to 2 | Documentation/versioning.md document. */ 3 | HNS_1.0 { 4 | global: 5 | hnsdv_is_supported; 6 | hnsdv_create_qp; 7 | hnsdv_query_device; 8 | local: *; 9 | }; 10 | -------------------------------------------------------------------------------- /providers/hns/man/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_man_pages( 2 | hnsdv.7.md 3 | hnsdv_create_qp.3.md 4 | hnsdv_is_supported.3.md 5 | hnsdv_query_device.3.md 6 | ) 7 | -------------------------------------------------------------------------------- /providers/hns/man/hnsdv_is_supported.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: HNSDV_IS_SUPPORTED 4 | section: 3 5 | tagline: Verbs 6 | date: 2024-02-06 7 | header: "HNS Programmer's Manual" 8 | footer: hns 9 | --- 10 | 11 | # NAME 12 | 13 | hnsdv_is_supported - Check whether an RDMA device implemented by the hns provider 14 | 15 | # SYNOPSIS 16 | 17 | ```c 18 | #include 19 | 20 | bool hnsdv_is_supported(struct ibv_device *device); 21 | ``` 22 | 23 | # DESCRIPTION 24 | 25 | hnsdv functions may be called only if this function returns true for the RDMA device. 26 | 27 | # ARGUMENTS 28 | 29 | *device* 30 | : RDMA device to check. 31 | 32 | # RETURN VALUE 33 | Returns true if device is implemented by hns provider. 34 | 35 | # SEE ALSO 36 | 37 | *hnsdv(7)* 38 | 39 | # AUTHOR 40 | 41 | Junxian Huang 42 | -------------------------------------------------------------------------------- /providers/ipathverbs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_provider(ipathverbs 2 | ipathverbs.c 3 | verbs.c 4 | ) 5 | 6 | rdma_subst_install(FILES "truescale.conf.in" 7 | DESTINATION "${CMAKE_INSTALL_MODPROBEDIR}/" 8 | RENAME "truescale.conf") 9 | install(FILES truescale-serdes.cmds 10 | DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}" 11 | PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE) 12 | -------------------------------------------------------------------------------- /providers/ipathverbs/dracut_check: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -n "$hostonly" ]; then 4 | lspci -n 2>/dev/null | grep -q -i "1077\|1fc1" 5 | exit $? 6 | fi 7 | 8 | exit 0 9 | -------------------------------------------------------------------------------- /providers/ipathverbs/dracut_install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | inst /etc/modprobe.d/truescale.conf 4 | inst /usr/libexec/truescale-serdes.cmds 5 | 6 | # All files needed by truescale-serdes.cmds need to be present here 7 | inst /sbin/lspci 8 | inst /bin/grep 9 | inst /bin/sed 10 | inst /usr/bin/logger 11 | inst /usr/sbin/dmidecode 12 | inst /bin/readlink 13 | inst /bin/echo 14 | -------------------------------------------------------------------------------- /providers/ipathverbs/dracut_kmod: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | instmods ib_qib 4 | 5 | -------------------------------------------------------------------------------- /providers/ipathverbs/truescale.conf.in: -------------------------------------------------------------------------------- 1 | install ib_qib modprobe -i ib_qib $CMDLINE_OPTS && @CMAKE_INSTALL_FULL_LIBEXECDIR@/truescale-serdes.cmds start 2 | -------------------------------------------------------------------------------- /providers/irdma/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2019, Intel Corporation. 3 | 4 | rdma_provider(irdma 5 | uk.c 6 | umain.c 7 | uverbs.c 8 | ) 9 | -------------------------------------------------------------------------------- /providers/irdma/i40iw_hw.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB */ 2 | /* Copyright (c) 2015 - 2023 Intel Corporation */ 3 | #ifndef I40IW_HW_H 4 | #define I40IW_HW_H 5 | 6 | enum i40iw_device_caps_const { 7 | I40IW_MAX_WQ_FRAGMENT_COUNT = 3, 8 | I40IW_MAX_SGE_RD = 1, 9 | I40IW_MAX_PUSH_PAGE_COUNT = 0, 10 | I40IW_MAX_INLINE_DATA_SIZE = 48, 11 | I40IW_MAX_IRD_SIZE = 63, 12 | I40IW_MAX_ORD_SIZE = 127, 13 | I40IW_MAX_WQ_ENTRIES = 2048, 14 | I40IW_MAX_WQE_SIZE_RQ = 128, 15 | I40IW_MAX_PDS = 32768, 16 | I40IW_MAX_STATS_COUNT = 16, 17 | I40IW_MAX_CQ_SIZE = 1048575, 18 | I40IW_MAX_OUTBOUND_MSG_SIZE = 2147483647, 19 | I40IW_MAX_INBOUND_MSG_SIZE = 2147483647, 20 | I40IW_MIN_WQ_SIZE = 4 /* WQEs */, 21 | }; 22 | 23 | #define I40IW_QP_WQE_MIN_SIZE 32 24 | #define I40IW_QP_WQE_MAX_SIZE 128 25 | #define I40IW_MAX_RQ_WQE_SHIFT 2 26 | #define I40IW_MAX_QUANTA_PER_WR 2 27 | 28 | #define I40IW_QP_SW_MAX_SQ_QUANTA 2048 29 | #define I40IW_QP_SW_MAX_RQ_QUANTA 16384 30 | #define I40IW_QP_SW_MAX_WQ_QUANTA 2048 31 | #endif /* I40IW_HW_H */ 32 | -------------------------------------------------------------------------------- /providers/irdma/osdep.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB */ 2 | /* Copyright (c) 2015 - 2021 Intel Corporation */ 3 | #ifndef IRDMA_OSDEP_H 4 | #define IRDMA_OSDEP_H 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | static inline void db_wr32(__u32 val, __u32 *wqe_word) 21 | { 22 | *wqe_word = val; 23 | } 24 | #endif /* IRDMA_OSDEP_H */ 25 | -------------------------------------------------------------------------------- /providers/mana/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_shared_provider(mana libmana.map 2 | 1 1.0.${PACKAGE_VERSION} 3 | mana.c 4 | manadv.c 5 | qp.c 6 | wq.c 7 | cq.c 8 | wr.c 9 | ) 10 | 11 | publish_headers(infiniband 12 | manadv.h 13 | ) 14 | 15 | rdma_pkg_config("mana" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}") 16 | -------------------------------------------------------------------------------- /providers/mana/libmana.map: -------------------------------------------------------------------------------- 1 | /* Export symbols should be added below according to 2 | Documentation/versioning.md document. */ 3 | MANA_1.0 { 4 | global: 5 | manadv_set_context_attr; 6 | manadv_init_obj; 7 | local: *; 8 | }; 9 | -------------------------------------------------------------------------------- /providers/mana/man/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_man_pages( 2 | manadv.7.md 3 | manadv_init_obj.3.md 4 | manadv_set_context_attr.3.md 5 | ) 6 | -------------------------------------------------------------------------------- /providers/mlx4/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_shared_provider(mlx4 libmlx4.map 2 | 1 1.0.${PACKAGE_VERSION} 3 | buf.c 4 | cq.c 5 | dbrec.c 6 | mlx4.c 7 | qp.c 8 | srq.c 9 | verbs.c 10 | ) 11 | 12 | publish_headers(infiniband 13 | mlx4dv.h 14 | ) 15 | 16 | install(FILES "mlx4.conf" DESTINATION "${CMAKE_INSTALL_MODPROBEDIR}/") 17 | 18 | rdma_pkg_config("mlx4" "libibverbs" "${CMAKE_THREAD_LIBS_INIT}") 19 | -------------------------------------------------------------------------------- /providers/mlx4/libmlx4.map: -------------------------------------------------------------------------------- 1 | /* Export symbols should be added below according to 2 | Documentation/versioning.md document. */ 3 | MLX4_1.0 { 4 | global: 5 | mlx4dv_init_obj; 6 | mlx4dv_query_device; 7 | mlx4dv_create_qp; 8 | mlx4dv_set_context_attr; 9 | local: *; 10 | }; 11 | -------------------------------------------------------------------------------- /providers/mlx4/man/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_man_pages( 2 | mlx4dv_init_obj.3 3 | mlx4dv_query_device.3 4 | mlx4dv_set_context_attr.3.md 5 | mlx4dv.7 6 | ) 7 | -------------------------------------------------------------------------------- /providers/mlx4/mlx4.conf: -------------------------------------------------------------------------------- 1 | # This file is intended for users to select the various module options 2 | # they need for the mlx4 driver. On upgrade of the rdma package, 3 | # any user made changes to this file are preserved. Any changes made 4 | # to the libmlx4.conf file in this directory are overwritten on 5 | # pacakge upgrade. 6 | # 7 | # Some sample options and what they would do 8 | # Enable debugging output, device managed flow control, and disable SRIOV 9 | #options mlx4_core debug_level=1 log_num_mgm_entry_size=-1 probe_vf=0 num_vfs=0 10 | # 11 | # Enable debugging output and create SRIOV devices, but don't attach any of 12 | # the child devices to the host, only the parent device 13 | #options mlx4_core debug_level=1 probe_vf=0 num_vfs=7 14 | # 15 | # Enable debugging output, SRIOV, and attach one of the SRIOV child devices 16 | # in addition to the parent device to the host 17 | #options mlx4_core debug_level=1 probe_vf=1 num_vfs=7 18 | # 19 | # Enable per priority flow control for send and receive, setting both priority 20 | # 1 and 2 as no drop priorities 21 | #options mlx4_en pfctx=3 pfcrx=3 22 | -------------------------------------------------------------------------------- /providers/mlx5/man/mlx5dv_devx_query_eqn.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: mlx5dv_devx_query_eqn 4 | section: 3 5 | tagline: Verbs 6 | --- 7 | 8 | # NAME 9 | 10 | mlx5dv_devx_query_eqn - Query EQN for a given vector id. 11 | 12 | # SYNOPSIS 13 | 14 | ```c 15 | #include 16 | 17 | int mlx5dv_devx_query_eqn(struct ibv_context *context, uint32_t vector, 18 | uint32_t *eqn); 19 | ``` 20 | 21 | # DESCRIPTION 22 | 23 | Query EQN for a given input vector, the EQN is needed for other device commands over the DEVX interface. 24 | 25 | The DEVX API enables direct access from the user space area to the mlx5 device 26 | driver, the EQN information is needed for few commands such as CQ creation. 27 | 28 | 29 | # ARGUMENTS 30 | *context* 31 | : RDMA device context to work on. 32 | 33 | *vector* 34 | : Completion vector number. 35 | 36 | *eqn* 37 | : The device EQ number which relates to the given input vector. 38 | 39 | # RETURN VALUE 40 | 41 | returns 0 on success, or the value of errno on failure (which indicates the failure reason). 42 | 43 | # SEE ALSO 44 | 45 | **mlx5dv_open_device**, **mlx5dv_devx_obj_create** 46 | 47 | #AUTHOR 48 | 49 | Yishai Hadas 50 | -------------------------------------------------------------------------------- /providers/mlx5/man/mlx5dv_dm_map_op_addr.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: mlx5dv_dm_map_op_addr 4 | section: 3 5 | tagline: Verbs 6 | date: 2021-1-21 7 | header: "mlx5 Programmer's Manual" 8 | footer: mlx5 9 | --- 10 | 11 | # NAME 12 | 13 | mlx5dv_dm_map_op_addr - Get operation address of a device memory (DM) 14 | 15 | # SYNOPSIS 16 | 17 | ```c 18 | #include 19 | 20 | void *mlx5dv_dm_map_op_addr(struct ibv_dm *dm, uint8_t op); 21 | ``` 22 | 23 | # DESCRIPTION 24 | 25 | **mlx5dv_dm_map_op_addr()** returns a mmaped address to the device memory for the 26 | requested **op**. 27 | 28 | # ARGUMENTS 29 | 30 | *dm* 31 | : The associated ibv_dm for this operation. 32 | 33 | *op* 34 | : Indicates the DM operation type, based on device specification. 35 | 36 | # RETURN VALUE 37 | 38 | Returns a pointer to the mmaped address, on error NULL will be returned and errno will be set. 39 | 40 | # SEE ALSO 41 | 42 | **ibv_alloc_dm**(3), 43 | **mlx5dv_alloc_dm**(3), 44 | 45 | # AUTHOR 46 | 47 | Maor Gottlieb 48 | -------------------------------------------------------------------------------- /providers/mlx5/man/mlx5dv_is_supported.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: mlx5dv_is_supported 4 | section: 3 5 | tagline: Verbs 6 | --- 7 | 8 | # NAME 9 | 10 | mlx5dv_is_supported - Check whether an RDMA device implemented by the mlx5 provider 11 | 12 | # SYNOPSIS 13 | 14 | ```c 15 | #include 16 | 17 | bool mlx5dv_is_supported(struct ibv_device *device); 18 | ``` 19 | 20 | # DESCRIPTION 21 | 22 | mlx5dv functions may be called only if this function returns true for the RDMA device. 23 | 24 | # ARGUMENTS 25 | 26 | *device* 27 | : RDMA device to check. 28 | 29 | # RETURN VALUE 30 | Returns true if device is implemented by mlx5 provider. 31 | 32 | # SEE ALSO 33 | 34 | *mlx5dv(7)* 35 | 36 | # AUTHOR 37 | 38 | Artemy Kovalyov 39 | -------------------------------------------------------------------------------- /providers/mlx5/man/mlx5dv_modify_qp_lag_port.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: mlx5dv_modify_qp_lag_port 4 | section: 3 5 | tagline: Verbs 6 | --- 7 | 8 | # NAME 9 | 10 | mlx5dv_modify_qp_lag_port - Modify the lag port information of a given QP 11 | 12 | # SYNOPSIS 13 | 14 | ```c 15 | #include 16 | 17 | int mlx5dv_modify_qp_lag_port(struct ibv_qp *qp, uint8_t port_num); 18 | ``` 19 | 20 | # DESCRIPTION 21 | 22 | This API enables modifying the configured port num of a given QP. 23 | 24 | If the QP state is modified later, the port num may be implicitly re-configured. 25 | 26 | Use query mlx5dv_query_qp_lag_port to check the configured and active port num values. 27 | 28 | # ARGUMENTS 29 | 30 | *qp* 31 | : The ibv_qp object to issue the action on. 32 | 33 | *port_num* 34 | : The port_num to set for the QP. 35 | 36 | # RETURN VALUE 37 | 0 on success; EOPNOTSUPP if not in LAG mode, or other errno value on other failures. 38 | 39 | # SEE ALSO 40 | 41 | *mlx5dv_query_qp_lag_port(3)* 42 | 43 | # AUTHOR 44 | 45 | Aharon Landau 46 | -------------------------------------------------------------------------------- /providers/mlx5/man/mlx5dv_modify_qp_sched_elem.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: mlx5dv_modify_qp_sched_elem 4 | section: 3 5 | tagline: Verbs 6 | date: 2020-9-22 7 | header: "mlx5 Programmer's Manual" 8 | footer: mlx5 9 | --- 10 | 11 | # NAME 12 | 13 | mlx5dv_modify_qp_sched_elem - Connect a QP with a requestor and/or a responder scheduling element 14 | 15 | # SYNOPSIS 16 | 17 | ```c 18 | int mlx5dv_modify_qp_sched_elem(struct ibv_qp *qp, 19 | struct mlx5dv_sched_leaf *requestor, 20 | struct mlx5dv_sched_leaf *responder); 21 | 22 | ``` 23 | 24 | # DESCRIPTION 25 | 26 | The QP scheduling element (SE) allows the association of a QP to a SE tree. The SE is described in *mlx5dv_sched_node_create(3)* man page. 27 | 28 | By default, all QPs are not associated to SE. The default setting is ensuring fair bandwidth allocation with no maximum bandwidth limiting. 29 | 30 | A QP can be associate to a requestor and/or a responder SE following the IB spec definition. 31 | 32 | # RETURN VALUE 33 | 34 | upon success 0 is returned or the value of errno on a failure. 35 | 36 | # SEE ALSO 37 | 38 | **mlx5dv_sched_node_create**(3) 39 | 40 | # AUTHOR 41 | 42 | Mark Zhang 43 | Ariel Almog 44 | -------------------------------------------------------------------------------- /providers/mlx5/man/mlx5dv_modify_qp_udp_sport.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: mlx5dv_modify_qp_udp_sport 4 | section: 3 5 | tagline: Verbs 6 | --- 7 | 8 | # NAME 9 | 10 | mlx5dv_modify_qp_udp_sport - Modify the UDP source port of a given QP 11 | 12 | # SYNOPSIS 13 | 14 | ```c 15 | #include 16 | 17 | int mlx5dv_modify_qp_udp_sport(struct ibv_qp *qp, uint16_t udp_sport) 18 | ``` 19 | 20 | # DESCRIPTION 21 | 22 | The UDP source port is used to create entropy for network routers (ECMP), 23 | load balancers and 802.3ad link aggregation switching that are not aware of 24 | RoCE IB headers. 25 | 26 | This API enables modifying the configured UDP source port of a given RC/UC QP 27 | when QP is in RTS state. 28 | 29 | # ARGUMENTS 30 | 31 | *qp* 32 | : The ibv_qp object to issue the action on. 33 | 34 | *udp_sport* 35 | : The UDP source port to set for the QP. 36 | 37 | # RETURN VALUE 38 | 39 | Returns 0 on success, or the value of errno on failure (which indicates the failure reason). 40 | 41 | # AUTHOR 42 | 43 | Maor Gottlieb 44 | -------------------------------------------------------------------------------- /providers/mlx5/man/mlx5dv_ts_to_ns.3: -------------------------------------------------------------------------------- 1 | .\" -*- nroff -*- 2 | .\" Licensed under the OpenIB.org (MIT) - See COPYING.md 3 | .\" 4 | .TH MLX5DV_TS_TO_NS 3 2017-11-08 1.0.0 5 | .SH "NAME" 6 | mlx5dv_ts_to_ns \- Convert device timestamp from HCA core clock units to 7 | the corresponding nanosecond counts 8 | .SH "SYNOPSIS" 9 | .nf 10 | .B #include 11 | .sp 12 | .BI "uint64_t mlx5dv_ts_to_ns(struct mlx5dv_clock_info *clock_info, 13 | .BI " uint64_t device_timestamp); 14 | .fi 15 | .SH "DESCRIPTION" 16 | .B mlx5dv_ts_to_ns(3) 17 | Converts a host byte order 18 | .I device_timestamp 19 | from HCA core clock units into the corresponding nanosecond wallclock time. 20 | .PP 21 | \fBstruct mlx5dv_clock_info\fR can be retrieved using \fBmlx5dv_get_clock_info(3)\fR. 22 | .PP 23 | The greater the difference between the device reporting a timestamp and the last 24 | mlx5dv_clock_info update, the greater the inaccuracy of the clock time conversion. 25 | 26 | .fi 27 | .SH "RETURN VALUE" 28 | Timestamp in nanoseconds 29 | .SH "SEE ALSO" 30 | .BR mlx5dv (7), 31 | .BR mlx5dv_get_clock_info (3), 32 | .BR mlx5dv_query_device (3) 33 | .SH "AUTHORS" 34 | .TP 35 | Feras Daoud 36 | -------------------------------------------------------------------------------- /providers/mlx5/man/mlx5dv_vfio_get_events_fd.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: mlx5dv_vfio_get_events_fd 4 | section: 3 5 | tagline: Verbs 6 | --- 7 | 8 | # NAME 9 | 10 | mlx5dv_vfio_get_events_fd - Get the file descriptor to manage driver events. 11 | 12 | # SYNOPSIS 13 | 14 | ```c 15 | #include 16 | 17 | int mlx5dv_vfio_get_events_fd(struct ibv_context *ctx); 18 | ``` 19 | 20 | # DESCRIPTION 21 | 22 | Returns the file descriptor to be used for managing driver events. 23 | 24 | # ARGUMENTS 25 | 26 | *ctx* 27 | : device context that was opened for VFIO by calling mlx5dv_get_vfio_device_list(). 28 | 29 | # RETURN VALUE 30 | Returns the internal matching file descriptor. 31 | 32 | # NOTES 33 | Client code should poll the returned file descriptor and once there is some data to be managed immediately call *mlx5dv_vfio_process_events()*. 34 | 35 | # SEE ALSO 36 | 37 | *ibv_open_device(3)* *ibv_free_device_list(3)* *mlx5dv_get_vfio_device_list(3)* 38 | 39 | # AUTHOR 40 | 41 | Yishai Hadas 42 | -------------------------------------------------------------------------------- /providers/mlx5/man/mlx5dv_vfio_process_events.3.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: mlx5dv_vfio_process_events 4 | section: 3 5 | tagline: Verbs 6 | --- 7 | 8 | # NAME 9 | 10 | mlx5dv_vfio_process_events - process vfio driver events 11 | 12 | # SYNOPSIS 13 | 14 | ```c 15 | #include 16 | 17 | int mlx5dv_vfio_process_events(struct ibv_context *ctx); 18 | ``` 19 | 20 | # DESCRIPTION 21 | 22 | This API should run from application thread and maintain device events. 23 | The application is responsible to get the events FD by calling *mlx5dv_vfio_get_events_fd()* 24 | and once the FD is pollable call the API to let driver process its internal events. 25 | 26 | # ARGUMENTS 27 | 28 | *ctx* 29 | : device context that was opened for VFIO by calling mlx5dv_get_vfio_device_list(). 30 | 31 | # RETURN VALUE 32 | Returns 0 upon success or errno value in case a failure has occurred. 33 | 34 | # NOTES 35 | Application can use this API also to periodically check the device health state even if no events exist. 36 | 37 | # SEE ALSO 38 | 39 | *ibv_open_device(3)* *ibv_free_device_list(3)* *mlx5dv_get_vfio_device_list(3)* *mlx5dv_vfio_get_events_fd(3)* 40 | 41 | # AUTHOR 42 | 43 | Yishai Hadas 44 | -------------------------------------------------------------------------------- /providers/mlx5/mlx5_trace.c: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ 2 | /* 3 | * Copyright 2023 Bytedance.com, Inc. or its affiliates. All rights reserved. 4 | */ 5 | 6 | #define LTTNG_UST_TRACEPOINT_CREATE_PROBES 7 | #define LTTNG_UST_TRACEPOINT_DEFINE 8 | 9 | #include "mlx5_trace.h" 10 | -------------------------------------------------------------------------------- /providers/mthca/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_provider(mthca 2 | ah.c 3 | buf.c 4 | cq.c 5 | memfree.c 6 | mthca.c 7 | qp.c 8 | srq.c 9 | verbs.c 10 | ) 11 | -------------------------------------------------------------------------------- /providers/mthca/doorbell.h: -------------------------------------------------------------------------------- 1 | /* GPLv2 or OpenIB.org BSD (MIT) See COPYING file */ 2 | #ifndef DOORBELL_H 3 | #define DOORBELL_H 4 | 5 | #include 6 | #include "mthca.h" 7 | 8 | static inline void mthca_write64(uint32_t val[2], void *reg) 9 | { 10 | uint64_t doorbell = (((uint64_t)val[0]) << 32) | val[1]; 11 | mmio_write64_be(reg, htobe64(doorbell)); 12 | } 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /providers/ocrdma/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_provider(ocrdma 2 | ocrdma_main.c 3 | ocrdma_verbs.c 4 | ) 5 | -------------------------------------------------------------------------------- /providers/ocrdma/Changelog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/providers/ocrdma/Changelog -------------------------------------------------------------------------------- /providers/qedr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_provider(qedr 2 | qelr_main.c 3 | qelr_verbs.c 4 | qelr_chain.c 5 | ) 6 | -------------------------------------------------------------------------------- /providers/rxe/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (ENABLE_LTTNG AND LTTNGUST_FOUND) 2 | set(TRACE_FILE rxe_trace.c) 3 | endif() 4 | 5 | rdma_provider(rxe 6 | ${TRACE_FILE} 7 | rxe.c 8 | ) 9 | 10 | if (ENABLE_LTTNG AND LTTNGUST_FOUND) 11 | target_include_directories("rxe-rdmav${IBVERBS_PABI_VERSION}" PUBLIC ".") 12 | target_link_libraries("rxe-rdmav${IBVERBS_PABI_VERSION}" LINK_PRIVATE LTTng::UST) 13 | endif() 14 | -------------------------------------------------------------------------------- /providers/rxe/man/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_man_pages( 2 | rxe.7 3 | ) 4 | -------------------------------------------------------------------------------- /providers/rxe/rxe_trace.c: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ 2 | /* 3 | * Copyright 2023 Bytedance.com, Inc. or its affiliates. All rights reserved. 4 | */ 5 | 6 | #define LTTNG_UST_TRACEPOINT_CREATE_PROBES 7 | #define LTTNG_UST_TRACEPOINT_DEFINE 8 | 9 | #include "rxe_trace.h" 10 | -------------------------------------------------------------------------------- /providers/siw/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_provider(siw 2 | siw.c 3 | ) 4 | -------------------------------------------------------------------------------- /providers/siw/siw_abi.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */ 2 | 3 | /* Authors: Bernard Metzler */ 4 | /* Copyright (c) 2008-2019, IBM Corporation */ 5 | 6 | #ifndef _SIW_ABI_H 7 | #define _SIW_ABI_H 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | DECLARE_DRV_CMD(siw_cmd_alloc_context, IB_USER_VERBS_CMD_GET_CONTEXT, 14 | empty, siw_uresp_alloc_ctx); 15 | DECLARE_DRV_CMD(siw_cmd_create_cq, IB_USER_VERBS_CMD_CREATE_CQ, 16 | empty, siw_uresp_create_cq); 17 | DECLARE_DRV_CMD(siw_cmd_create_srq, IB_USER_VERBS_CMD_CREATE_SRQ, 18 | empty, siw_uresp_create_srq); 19 | DECLARE_DRV_CMD(siw_cmd_create_qp, IB_USER_VERBS_CMD_CREATE_QP, 20 | empty, siw_uresp_create_qp); 21 | DECLARE_DRV_CMD(siw_cmd_reg_mr, IB_USER_VERBS_CMD_REG_MR, 22 | siw_ureq_reg_mr, siw_uresp_reg_mr); 23 | 24 | #endif /* _SIW_ABI_H */ 25 | -------------------------------------------------------------------------------- /providers/vmw_pvrdma/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_provider(vmw_pvrdma 2 | cq.c 3 | pvrdma_main.c 4 | qp.c 5 | verbs.c 6 | ) 7 | -------------------------------------------------------------------------------- /pyverbs/__init__.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/__init__.pxd -------------------------------------------------------------------------------- /pyverbs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/__init__.py -------------------------------------------------------------------------------- /pyverbs/addr.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2018, Mellanox Technologies. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | from .base cimport PyverbsObject, PyverbsCM 7 | from pyverbs cimport libibverbs as v 8 | from .cmid cimport UDParam 9 | 10 | 11 | cdef class GID(PyverbsObject): 12 | cdef v.ibv_gid gid 13 | 14 | cdef class GRH(PyverbsObject): 15 | cdef v.ibv_grh grh 16 | 17 | cdef class GlobalRoute(PyverbsObject): 18 | cdef v.ibv_global_route gr 19 | 20 | cdef class AHAttr(PyverbsObject): 21 | cdef v.ibv_ah_attr ah_attr 22 | cdef init_from_ud_param(self, UDParam udparam) 23 | 24 | cdef class AH(PyverbsCM): 25 | cdef v.ibv_ah *ah 26 | cdef object pd 27 | cpdef close(self) 28 | -------------------------------------------------------------------------------- /pyverbs/base.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2019, Mellanox Technologies. All rights reserved. 3 | 4 | #cython: language_level=3 5 | 6 | cdef class PyverbsObject(object): 7 | cdef object __weakref__ 8 | cdef object logger 9 | 10 | cdef class PyverbsCM(PyverbsObject): 11 | cpdef close(self) 12 | 13 | cdef close_weakrefs(iterables) 14 | -------------------------------------------------------------------------------- /pyverbs/cm_enums.pyx: -------------------------------------------------------------------------------- 1 | librdmacm_enums.pxd -------------------------------------------------------------------------------- /pyverbs/cmid.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2019, Mellanox Technologies. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.base cimport PyverbsObject, PyverbsCM 7 | cimport pyverbs.librdmacm as cm 8 | 9 | 10 | cdef class CMID(PyverbsCM): 11 | cdef cm.rdma_cm_id *id 12 | cdef object event_channel 13 | cdef object ctx 14 | cdef object pd 15 | cdef object mrs 16 | cdef add_ref(self, obj) 17 | cpdef close(self) 18 | 19 | 20 | cdef class CMEventChannel(PyverbsObject): 21 | cdef cm.rdma_event_channel *event_channel 22 | cpdef close(self) 23 | 24 | 25 | cdef class CMEvent(PyverbsObject): 26 | cdef cm.rdma_cm_event *event 27 | cpdef close(self) 28 | 29 | 30 | cdef class AddrInfo(PyverbsObject): 31 | cdef cm.rdma_addrinfo *addr_info 32 | cpdef close(self) 33 | 34 | 35 | cdef class ConnParam(PyverbsObject): 36 | cdef cm.rdma_conn_param conn_param 37 | cdef object data 38 | 39 | 40 | cdef class UDParam(PyverbsObject): 41 | cdef cm.rdma_ud_param ud_param 42 | 43 | cdef class JoinMCAttrEx(PyverbsObject): 44 | cdef cm.rdma_cm_join_mc_attr_ex join_mc_attr_ex 45 | -------------------------------------------------------------------------------- /pyverbs/dma_util.pyx: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2021 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | from libc.stdint cimport uintptr_t, uint64_t, uint32_t 7 | 8 | cdef extern from 'util/udma_barrier.h': 9 | cdef void udma_to_device_barrier() 10 | cdef void udma_from_device_barrier() 11 | 12 | cdef extern from 'util/mmio.h': 13 | cdef void mmio_write64_be(void *addr, uint64_t val) 14 | cdef void mmio_write32_be(void *addr, uint32_t val) 15 | 16 | 17 | def udma_to_dev_barrier(): 18 | udma_to_device_barrier() 19 | 20 | 21 | def udma_from_dev_barrier(): 22 | udma_from_device_barrier() 23 | 24 | 25 | def mmio_write64_as_be(addr, val): 26 | mmio_write64_be( addr, val) 27 | 28 | 29 | def mmio_write32_as_be(addr, val): 30 | mmio_write32_be( addr, val) 31 | -------------------------------------------------------------------------------- /pyverbs/dmabuf.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2020, Intel Corporation. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | cdef class DmaBuf: 7 | cdef int drm_fd 8 | cdef int handle 9 | cdef int fd 10 | cdef unsigned long size 11 | cdef unsigned long map_offset 12 | cdef void *dmabuf 13 | cdef object dmabuf_mrs 14 | cdef add_ref(self, obj) 15 | cpdef close(self) 16 | -------------------------------------------------------------------------------- /pyverbs/dmabuf_alloc.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2 | /* 3 | * Copyright 2020 Intel Corporation. All rights reserved. See COPYING file 4 | */ 5 | 6 | #ifndef _DMABUF_ALLOC_H_ 7 | #define _DMABUF_ALLOC_H_ 8 | 9 | #include 10 | 11 | struct dmabuf; 12 | 13 | struct dmabuf *dmabuf_alloc(uint64_t size, int gpu, int gtt); 14 | void dmabuf_free(struct dmabuf *dmabuf); 15 | int dmabuf_get_drm_fd(struct dmabuf *dmabuf); 16 | int dmabuf_get_fd(struct dmabuf *dmabuf); 17 | uint64_t dmabuf_get_offset(struct dmabuf *dmabuf); 18 | 19 | #endif /* _DMABUF_ALLOC_H_ */ 20 | -------------------------------------------------------------------------------- /pyverbs/dmabuf_alloc_stub.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 2 | /* 3 | * Copyright 2021 Intel Corporation. All rights reserved. See COPYING file 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include "dmabuf_alloc.h" 10 | 11 | struct dmabuf *dmabuf_alloc(uint64_t size, int gpu, int gtt) 12 | { 13 | errno = EOPNOTSUPP; 14 | return NULL; 15 | } 16 | 17 | void dmabuf_free(struct dmabuf *dmabuf) 18 | { 19 | errno = EOPNOTSUPP; 20 | } 21 | 22 | int dmabuf_get_drm_fd(struct dmabuf *dmabuf) 23 | { 24 | errno = EOPNOTSUPP; 25 | return -1; 26 | } 27 | 28 | int dmabuf_get_fd(struct dmabuf *dmabuf) 29 | { 30 | errno = EOPNOTSUPP; 31 | return -1; 32 | } 33 | 34 | uint64_t dmabuf_get_offset(struct dmabuf *dmabuf) 35 | { 36 | errno = EOPNOTSUPP; 37 | return -1; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /pyverbs/enums.pyx: -------------------------------------------------------------------------------- 1 | libibverbs_enums.pxd -------------------------------------------------------------------------------- /pyverbs/examples/ib_devices.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 3 | # Copyright (c) 2018, Mellanox Technologies. All rights reserved. See COPYING file 4 | 5 | from pyverbs import device as d 6 | import sys 7 | 8 | 9 | lst = d.get_device_list() 10 | dev = 'Device' 11 | node = 'Node Type' 12 | trans = 'Transport Type' 13 | guid = 'Node GUID' 14 | print_format = '{:^20}{:^20}{:^20}{:^20}' 15 | print (print_format.format(dev, node, trans, guid)) 16 | print (print_format.format('-'*len(dev), '-'*len(node), '-'*len(trans), 17 | '-'*len(guid))) 18 | for i in lst: 19 | print (print_format.format(i.name.decode(), d.translate_node_type(i.node_type), 20 | d.translate_transport_type(i.transport_type), 21 | d.guid_to_hex(i.guid))) 22 | -------------------------------------------------------------------------------- /pyverbs/flow.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2020 Nvidia All rights reserved. 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.base cimport PyverbsObject, PyverbsCM 7 | cimport pyverbs.libibverbs as v 8 | 9 | cdef class FlowAttr(PyverbsObject): 10 | cdef v.ibv_flow_attr attr 11 | cdef object specs 12 | 13 | cdef class Flow(PyverbsCM): 14 | cdef v.ibv_flow *flow 15 | cdef object qp 16 | cpdef close(self) 17 | 18 | cdef class FlowAction(PyverbsObject): 19 | cdef v.ibv_flow_action *action 20 | -------------------------------------------------------------------------------- /pyverbs/fork.pyx: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright 2021 Amazon.com, Inc. or its affiliates. All rights reserved. 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.base import PyverbsRDMAError 7 | cimport pyverbs.libibverbs as v 8 | 9 | 10 | def fork_init(): 11 | ret = v.ibv_fork_init() 12 | if ret: 13 | raise PyverbsRDMAError('Failed to init fork support', ret) 14 | 15 | 16 | def is_fork_initialized(): 17 | return v.ibv_is_fork_initialized() 18 | -------------------------------------------------------------------------------- /pyverbs/libibverbs.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/libibverbs.pyx -------------------------------------------------------------------------------- /pyverbs/libibverbs_enums.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/libibverbs_enums.pyx -------------------------------------------------------------------------------- /pyverbs/librdmacm.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/librdmacm.pyx -------------------------------------------------------------------------------- /pyverbs/librdmacm_enums.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/librdmacm_enums.pyx -------------------------------------------------------------------------------- /pyverbs/mr.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2019, Mellanox Technologies. All rights reserved. See COPYING file 3 | # Copyright (c) 2020, Intel Corporation. All rights reserved. See COPYING file 4 | 5 | #cython: language_level=3 6 | 7 | from pyverbs.base cimport PyverbsCM 8 | cimport pyverbs.librdmacm as cm 9 | from . cimport libibverbs as v 10 | 11 | 12 | cdef class MR(PyverbsCM): 13 | cdef object pd 14 | cdef object cmid 15 | cdef v.ibv_mr *mr 16 | cdef int mmap_length 17 | cdef object is_huge 18 | cdef object is_user_addr 19 | cdef void *buf 20 | cdef object _is_imported 21 | cpdef read(self, length, offset) 22 | 23 | cdef class MWBindInfo(PyverbsCM): 24 | cdef v.ibv_mw_bind_info info 25 | cdef object mr 26 | 27 | cdef class MWBind(PyverbsCM): 28 | cdef v.ibv_mw_bind mw_bind 29 | cdef object mr 30 | 31 | cdef class MW(PyverbsCM): 32 | cdef object pd 33 | cdef v.ibv_mw *mw 34 | 35 | cdef class DMMR(MR): 36 | cdef object dm 37 | 38 | cdef class DmaBufMR(MR): 39 | cdef object dmabuf 40 | cdef unsigned long offset 41 | cdef object is_dmabuf_internal 42 | -------------------------------------------------------------------------------- /pyverbs/pd.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2019, Mellanox Technologies. All rights reserved. 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.base cimport PyverbsObject 7 | from pyverbs.device cimport Context 8 | cimport pyverbs.libibverbs as v 9 | from .base cimport PyverbsCM 10 | 11 | 12 | cdef class PD(PyverbsCM): 13 | cdef v.ibv_pd *pd 14 | cdef Context ctx 15 | cdef add_ref(self, obj) 16 | cdef remove_ref(self, obj) 17 | cdef object srqs 18 | cdef object mrs 19 | cdef object mws 20 | cdef object ahs 21 | cdef object qps 22 | cdef object parent_domains 23 | cdef object wqs 24 | cdef object mkeys 25 | cdef object deks 26 | cdef object _is_imported 27 | 28 | cdef class ParentDomainInitAttr(PyverbsObject): 29 | cdef v.ibv_parent_domain_init_attr init_attr 30 | cdef object pd 31 | cdef object alloc 32 | cdef object dealloc 33 | 34 | cdef class ParentDomain(PD): 35 | cdef add_ref(self, obj) 36 | cdef object protection_domain 37 | cdef object cqs 38 | 39 | cdef class ParentDomainContext(PyverbsObject): 40 | cdef object p_alloc 41 | cdef object p_free 42 | cdef object pd 43 | cdef object user_data 44 | -------------------------------------------------------------------------------- /pyverbs/providers/__init__.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/providers/__init__.pxd -------------------------------------------------------------------------------- /pyverbs/providers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/providers/__init__.py -------------------------------------------------------------------------------- /pyverbs/providers/efa/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright 2020 Amazon.com, Inc. or its affiliates. All rights reserved. 3 | 4 | rdma_cython_module(pyverbs/providers/efa efa 5 | efa_enums.pyx 6 | efadv.pyx 7 | libefa.pyx 8 | ) 9 | -------------------------------------------------------------------------------- /pyverbs/providers/efa/__init__.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/providers/efa/__init__.pxd -------------------------------------------------------------------------------- /pyverbs/providers/efa/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/providers/efa/__init__.py -------------------------------------------------------------------------------- /pyverbs/providers/efa/efa_enums.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | 3 | #cython: language_level=3 4 | 5 | 6 | cdef extern from 'infiniband/efadv.h': 7 | 8 | cpdef enum: 9 | EFADV_DEVICE_ATTR_CAPS_RDMA_READ 10 | EFADV_DEVICE_ATTR_CAPS_RNR_RETRY 11 | EFADV_DEVICE_ATTR_CAPS_CQ_WITH_SGID 12 | EFADV_DEVICE_ATTR_CAPS_RDMA_WRITE 13 | EFADV_DEVICE_ATTR_CAPS_UNSOLICITED_WRITE_RECV 14 | 15 | cpdef enum: 16 | EFADV_QP_DRIVER_TYPE_SRD 17 | 18 | cpdef enum: 19 | EFADV_QP_FLAGS_UNSOLICITED_WRITE_RECV 20 | 21 | cpdef enum: 22 | EFADV_WC_EX_WITH_SGID 23 | EFADV_WC_EX_WITH_IS_UNSOLICITED 24 | 25 | cpdef enum: 26 | EFADV_MR_ATTR_VALIDITY_RECV_IC_ID 27 | EFADV_MR_ATTR_VALIDITY_RDMA_READ_IC_ID 28 | EFADV_MR_ATTR_VALIDITY_RDMA_RECV_IC_ID 29 | -------------------------------------------------------------------------------- /pyverbs/providers/efa/efa_enums.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/providers/efa/efa_enums.pyx -------------------------------------------------------------------------------- /pyverbs/providers/efa/efadv.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright 2020-2024 Amazon.com, Inc. or its affiliates. All rights reserved. 3 | 4 | #cython: language_level=3 5 | 6 | cimport pyverbs.providers.efa.libefa as dv 7 | 8 | from pyverbs.addr cimport AH 9 | from pyverbs.base cimport PyverbsObject 10 | from pyverbs.cq cimport CQEX 11 | from pyverbs.device cimport Context 12 | from pyverbs.qp cimport QP, QPEx 13 | 14 | 15 | cdef class EfaContext(Context): 16 | pass 17 | 18 | 19 | cdef class EfaDVDeviceAttr(PyverbsObject): 20 | cdef dv.efadv_device_attr device_attr 21 | 22 | 23 | cdef class EfaAH(AH): 24 | pass 25 | 26 | 27 | cdef class EfaDVAHAttr(PyverbsObject): 28 | cdef dv.efadv_ah_attr ah_attr 29 | 30 | 31 | cdef class SRDQP(QP): 32 | pass 33 | 34 | 35 | cdef class SRDQPEx(QPEx): 36 | pass 37 | 38 | 39 | cdef class EfaQPInitAttr(PyverbsObject): 40 | cdef dv.efadv_qp_init_attr qp_init_attr 41 | 42 | 43 | cdef class EfaCQ(CQEX): 44 | cdef dv.efadv_cq *dv_cq 45 | 46 | 47 | cdef class EfaDVCQInitAttr(PyverbsObject): 48 | cdef dv.efadv_cq_init_attr cq_init_attr 49 | 50 | 51 | cdef class EfaDVMRAttr(PyverbsObject): 52 | cdef dv.efadv_mr_attr mr_attr 53 | -------------------------------------------------------------------------------- /pyverbs/providers/efa/libefa.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/providers/efa/libefa.pyx -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2019, Mellanox Technologies. All rights reserved. See COPYING file 3 | 4 | rdma_cython_module(pyverbs/providers/mlx5 mlx5 5 | dr_action.pyx 6 | dr_domain.pyx 7 | dr_matcher.pyx 8 | dr_rule.pyx 9 | dr_table.pyx 10 | libmlx5.pyx 11 | mlx5_enums.pyx 12 | mlx5_vfio.pyx 13 | mlx5dv.pyx 14 | mlx5dv_crypto.pyx 15 | mlx5dv_dmabuf.pyx 16 | mlx5dv_flow.pyx 17 | mlx5dv_mkey.pyx 18 | mlx5dv_objects.pyx 19 | mlx5dv_sched.pyx 20 | ) 21 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/__init__.pxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/providers/mlx5/__init__.pxd -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/providers/mlx5/__init__.py -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/dr_domain.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2020 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | cimport pyverbs.providers.mlx5.libmlx5 as dv 7 | from pyverbs.base cimport PyverbsCM 8 | 9 | cdef class DrDomain(PyverbsCM): 10 | cdef dv.mlx5dv_dr_domain *domain 11 | cdef object dr_tables 12 | cdef object context 13 | cdef object dr_actions 14 | cdef add_ref(self, obj) 15 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/dr_matcher.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2020 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | cimport pyverbs.providers.mlx5.libmlx5 as dv 7 | from pyverbs.base cimport PyverbsCM 8 | 9 | cdef class DrMatcher(PyverbsCM): 10 | cdef dv.mlx5dv_dr_matcher *matcher 11 | cdef object dr_table 12 | cdef object dr_rules 13 | cdef add_ref(self, obj) 14 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/dr_rule.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2020 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | cimport pyverbs.providers.mlx5.libmlx5 as dv 7 | from pyverbs.base cimport PyverbsCM 8 | 9 | cdef class DrRule(PyverbsCM): 10 | cdef dv.mlx5dv_dr_rule *rule 11 | cdef object dr_matcher 12 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/dr_table.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2020 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | cimport pyverbs.providers.mlx5.libmlx5 as dv 7 | from pyverbs.base cimport PyverbsCM 8 | 9 | cdef class DrTable(PyverbsCM): 10 | cdef dv.mlx5dv_dr_table *table 11 | cdef object dr_domain 12 | cdef object dr_matchers 13 | cdef object dr_actions 14 | cdef add_ref(self, obj) 15 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/libmlx5.pyx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amzn/rdma-core/a0969105b2236d5c049737a4c31fd059c5f90596/pyverbs/providers/mlx5/libmlx5.pyx -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/mlx5_vfio.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2021 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.providers.mlx5.mlx5dv cimport Mlx5Context 7 | cimport pyverbs.providers.mlx5.libmlx5 as dv 8 | from pyverbs.base cimport PyverbsObject 9 | 10 | 11 | cdef class Mlx5VfioContext(Mlx5Context): 12 | pass 13 | 14 | cdef class Mlx5VfioAttr(PyverbsObject): 15 | cdef dv.mlx5dv_vfio_context_attr attr 16 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/mlx5dv_crypto.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2021 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.base cimport PyverbsObject, PyverbsCM 7 | cimport pyverbs.providers.mlx5.libmlx5 as dv 8 | from pyverbs.device cimport Context 9 | from pyverbs.pd cimport PD 10 | 11 | 12 | cdef class Mlx5CryptoLoginAttr(PyverbsObject): 13 | cdef dv.mlx5dv_crypto_login_attr mlx5dv_crypto_login_attr 14 | 15 | cdef class Mlx5CryptoExtLoginAttr(PyverbsObject): 16 | cdef dv.mlx5dv_crypto_login_attr_ex mlx5dv_crypto_login_attr_ex 17 | cdef object credential 18 | 19 | cdef class Mlx5DEKInitAttr(PyverbsObject): 20 | cdef dv.mlx5dv_dek_init_attr mlx5dv_dek_init_attr 21 | cdef PD pd 22 | 23 | cdef class Mlx5DEKAttr(PyverbsObject): 24 | cdef dv.mlx5dv_dek_attr mlx5dv_dek_attr 25 | 26 | cdef class Mlx5CryptoAttr(PyverbsObject): 27 | cdef dv.mlx5dv_crypto_attr mlx5dv_crypto_attr 28 | 29 | cdef class Mlx5DEK(PyverbsCM): 30 | cdef dv.mlx5dv_dek *mlx5dv_dek 31 | cdef PD pd 32 | 33 | cdef class Mlx5CryptoLogin(PyverbsCM): 34 | cdef dv.mlx5dv_crypto_login_obj *crypto_login_obj 35 | cdef Context context 36 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/mlx5dv_dmabuf.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2024 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.mr cimport DmaBufMR 7 | 8 | cdef class Mlx5DmaBufMR(DmaBufMR): 9 | pass 10 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/mlx5dv_flow.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2020 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | cimport pyverbs.providers.mlx5.libmlx5 as dv 7 | from pyverbs.flow cimport Flow, FlowAction 8 | from pyverbs.base cimport PyverbsObject 9 | 10 | 11 | cdef class Mlx5FlowMatchParameters(PyverbsObject): 12 | cdef dv.mlx5dv_flow_match_parameters *params 13 | cpdef close(self) 14 | 15 | cdef class Mlx5FlowMatcherAttr(PyverbsObject): 16 | cdef dv.mlx5dv_flow_matcher_attr attr 17 | 18 | cdef class Mlx5FlowMatcher(PyverbsObject): 19 | cdef dv.mlx5dv_flow_matcher *flow_matcher 20 | cdef object flows 21 | cdef add_ref(self, obj) 22 | cpdef close(self) 23 | 24 | cdef class Mlx5FlowActionAttr(PyverbsObject): 25 | cdef dv.mlx5dv_flow_action_attr attr 26 | cdef object qp 27 | cdef object action 28 | 29 | cdef class Mlx5Flow(Flow): 30 | pass 31 | 32 | cdef class Mlx5PacketReformatFlowAction(FlowAction): 33 | pass 34 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/mlx5dv_objects.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2021 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | cimport pyverbs.providers.mlx5.libmlx5 as dv 7 | from pyverbs.base cimport PyverbsObject 8 | 9 | 10 | cdef class Mlx5DvPD(PyverbsObject): 11 | cdef dv.mlx5dv_pd dv_pd 12 | 13 | cdef class Mlx5DvCQ(PyverbsObject): 14 | cdef dv.mlx5dv_cq dv_cq 15 | 16 | cdef class Mlx5DvQP(PyverbsObject): 17 | cdef dv.mlx5dv_qp dv_qp 18 | 19 | cdef class Mlx5DvSRQ(PyverbsObject): 20 | cdef dv.mlx5dv_srq dv_srq 21 | 22 | cdef class Mlx5DvObj(PyverbsObject): 23 | cdef dv.mlx5dv_obj obj 24 | cdef Mlx5DvCQ dv_cq 25 | cdef Mlx5DvQP dv_qp 26 | cdef Mlx5DvPD dv_pd 27 | cdef Mlx5DvSRQ dv_srq 28 | 29 | -------------------------------------------------------------------------------- /pyverbs/providers/mlx5/mlx5dv_sched.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2020 Nvidia, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | cimport pyverbs.providers.mlx5.libmlx5 as dv 7 | from pyverbs.base cimport PyverbsObject 8 | 9 | 10 | cdef class Mlx5dvSchedAttr(PyverbsObject): 11 | cdef dv.mlx5dv_sched_attr sched_attr 12 | cdef object parent_sched_node 13 | 14 | cdef class Mlx5dvSchedNode(PyverbsObject): 15 | cdef dv.mlx5dv_sched_node *sched_node 16 | cdef object context 17 | cdef object sched_attr 18 | cpdef close(self) 19 | 20 | cdef class Mlx5dvSchedLeaf(PyverbsObject): 21 | cdef dv.mlx5dv_sched_leaf *sched_leaf 22 | cdef object context 23 | cdef object sched_attr 24 | cpdef close(self) 25 | -------------------------------------------------------------------------------- /pyverbs/spec.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2020 Nvidia All rights reserved. 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.base cimport PyverbsObject 7 | cimport pyverbs.libibverbs as v 8 | 9 | cdef class Spec(PyverbsObject): 10 | cdef object spec_type 11 | cdef unsigned short size 12 | cpdef _copy_data(self, unsigned long ptr) 13 | 14 | cdef class EthSpec(Spec): 15 | cdef v.ibv_flow_eth_filter val 16 | cdef v.ibv_flow_eth_filter mask 17 | cdef _mac_to_str(self, unsigned char mac[6]) 18 | 19 | cdef class Ipv4ExtSpec(Spec): 20 | cdef v.ibv_flow_ipv4_ext_filter val 21 | cdef v.ibv_flow_ipv4_ext_filter mask 22 | 23 | cdef class TcpUdpSpec(Spec): 24 | cdef v.ibv_flow_tcp_udp_filter val 25 | cdef v.ibv_flow_tcp_udp_filter mask 26 | 27 | cdef class Ipv6Spec(Spec): 28 | cdef v.ibv_flow_ipv6_filter val 29 | cdef v.ibv_flow_ipv6_filter mask 30 | -------------------------------------------------------------------------------- /pyverbs/srq.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2019 Mellanox Technologies, Inc. All rights reserved. 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.base cimport PyverbsObject, PyverbsCM 7 | from . cimport libibverbs as v 8 | 9 | cdef class SrqAttr(PyverbsObject): 10 | cdef v.ibv_srq_attr attr 11 | 12 | cdef class SrqInitAttr(PyverbsObject): 13 | cdef v.ibv_srq_init_attr attr 14 | 15 | cdef class SrqInitAttrEx(PyverbsObject): 16 | cdef v.ibv_srq_init_attr_ex attr 17 | cdef object _cq 18 | cdef object _pd 19 | cdef object _xrcd 20 | 21 | cdef class OpsWr(PyverbsCM): 22 | cdef v.ibv_ops_wr ops_wr 23 | 24 | cdef class SRQ(PyverbsCM): 25 | cdef v.ibv_srq *srq 26 | cdef object cq 27 | cdef object qps 28 | cdef add_ref(self, obj) 29 | cpdef close(self) 30 | -------------------------------------------------------------------------------- /pyverbs/wq.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2021 Nvidia Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.base cimport PyverbsObject, PyverbsCM 7 | from pyverbs.device cimport Context 8 | cimport pyverbs.libibverbs as v 9 | from pyverbs.cq cimport CQ 10 | from pyverbs.pd cimport PD 11 | 12 | 13 | cdef class WQInitAttr(PyverbsObject): 14 | cdef v.ibv_wq_init_attr attr 15 | cdef PD pd 16 | cdef object cq 17 | 18 | cdef class WQAttr(PyverbsObject): 19 | cdef v.ibv_wq_attr attr 20 | 21 | cdef class WQ(PyverbsCM): 22 | cdef v.ibv_wq *wq 23 | cdef Context context 24 | cdef PD pd 25 | cdef object cq 26 | cdef object rwq_ind_tables 27 | cpdef add_ref(self, obj) 28 | 29 | cdef class RwqIndTableInitAttr(PyverbsObject): 30 | cdef v.ibv_rwq_ind_table_init_attr attr 31 | cdef object wqs_list 32 | 33 | cdef class RwqIndTable(PyverbsCM): 34 | cdef v.ibv_rwq_ind_table *rwq_ind_table 35 | cdef Context context 36 | cdef object wqs 37 | cdef object qps 38 | cpdef add_ref(self, obj) 39 | 40 | cdef class RxHashConf(PyverbsObject): 41 | cdef v.ibv_rx_hash_conf rx_hash_conf 42 | -------------------------------------------------------------------------------- /pyverbs/wr.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2019 Mellanox Technologies, Inc. All rights reserved. See COPYING file 3 | 4 | #cython: language_level=3 5 | 6 | from .base cimport PyverbsCM 7 | from pyverbs cimport libibverbs as v 8 | 9 | 10 | cdef class SGE(PyverbsCM): 11 | cdef v.ibv_sge *sge 12 | cpdef read(self, length, offset) 13 | 14 | cdef class RecvWR(PyverbsCM): 15 | cdef v.ibv_recv_wr recv_wr 16 | 17 | cdef class SendWR(PyverbsCM): 18 | cdef v.ibv_send_wr send_wr 19 | cdef object ah 20 | 21 | cdef copy_sg_array(v.ibv_sge *dst, sg, num_sge) 22 | -------------------------------------------------------------------------------- /pyverbs/xrcd.pxd: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright (c) 2019, Mellanox Technologies. All rights reserved. 3 | 4 | #cython: language_level=3 5 | 6 | from pyverbs.base cimport PyverbsCM, PyverbsObject 7 | from pyverbs.device cimport Context 8 | cimport pyverbs.libibverbs as v 9 | 10 | 11 | cdef class XRCDInitAttr(PyverbsObject): 12 | cdef v.ibv_xrcd_init_attr attr 13 | 14 | 15 | cdef class XRCD(PyverbsCM): 16 | cdef v.ibv_xrcd *xrcd 17 | cdef Context ctx 18 | cdef add_ref(self, obj) 19 | cdef object srqs 20 | cdef object qps 21 | -------------------------------------------------------------------------------- /rdma-ndd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # COPYRIGHT (c) 2016 Intel Corporation. 2 | # Licensed under BSD (MIT variant) or GPLv2. See COPYING. 3 | 4 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") 5 | 6 | rdma_sbin_executable(rdma-ndd 7 | rdma-ndd.c 8 | ) 9 | 10 | target_link_libraries(rdma-ndd LINK_PRIVATE 11 | ${SYSTEMD_LIBRARIES} 12 | ${UDEV_LIBRARIES} 13 | ) 14 | 15 | # FIXME Autogenerate from the .rst 16 | rdma_man_pages( 17 | rdma-ndd.8.in 18 | ) 19 | 20 | install(FILES "rdma-ndd.rules" 21 | RENAME "60-rdma-ndd.rules" 22 | DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}") 23 | 24 | rdma_subst_install(FILES "rdma-ndd.service.in" 25 | DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}" 26 | RENAME "rdma-ndd.service") 27 | 28 | -------------------------------------------------------------------------------- /rdma-ndd/rdma-ndd.rules: -------------------------------------------------------------------------------- 1 | # If an InfiniBand/RDMA device is installed with a writable node_description 2 | # sysfs then start rdma-ndd to keep it up to date 3 | SUBSYSTEM=="infiniband", TAG+="systemd", ATTRS{node_desc}=="*", ENV{SYSTEMD_WANTS}+="rdma-ndd.service" 4 | -------------------------------------------------------------------------------- /rdma-ndd/rdma-ndd.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=RDMA Node Description Daemon 3 | Documentation=man:rdma-ndd 4 | StopWhenUnneeded=yes 5 | # rdma-ndd is a kernel support program and needs to run as early as possible, 6 | # before the network link is brought up, and before an external manager tries 7 | # to read the local node description. 8 | DefaultDependencies=no 9 | Before=sysinit.target 10 | # Do not execute concurrently with an ongoing shutdown (required for DefaultDependencies=no) 11 | Conflicts=shutdown.target 12 | Before=shutdown.target 13 | # Networking, particularly link up, should not happen until ndd is ready 14 | Wants=network-pre.target 15 | Before=network-pre.target 16 | # rdma-hw is not ready until ndd is running 17 | Before=rdma-hw.target 18 | 19 | [Service] 20 | Type=notify 21 | Restart=always 22 | ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/rdma-ndd --systemd 23 | ProtectSystem=full 24 | ProtectHome=true 25 | ProtectKernelLogs=true 26 | 27 | # rdma-ndd is automatically wanted by udev when an RDMA device with a node description is present 28 | -------------------------------------------------------------------------------- /redhat/rdma.conf: -------------------------------------------------------------------------------- 1 | # These modules are loaded by the system if any RDMA devices is installed 2 | # iSCSI over RDMA client support 3 | ib_iser 4 | 5 | # iSCSI over RDMA target support 6 | ib_isert 7 | 8 | # SCSI RDMA Protocol target driver 9 | ib_srpt 10 | 11 | # User access to RDMA verbs (supports libibverbs) 12 | ib_uverbs 13 | 14 | # User access to RDMA connection management (supports librdmacm) 15 | rdma_ucm 16 | 17 | # RDS over RDMA support 18 | # rds_rdma 19 | 20 | # NFS over RDMA client support 21 | xprtrdma 22 | 23 | # NFS over RDMA server support 24 | svcrdma 25 | -------------------------------------------------------------------------------- /redhat/rdma.mlx4.sys.modprobe: -------------------------------------------------------------------------------- 1 | # WARNING! - This file is overwritten any time the rdma rpm package is 2 | # updated. Please do not make any changes to this file. Instead, make 3 | # changes to the mlx4.conf file. It's contents are preserved if they 4 | # have been changed from the default values. 5 | install mlx4_core /sbin/modprobe --ignore-install mlx4_core $CMDLINE_OPTS && (if [ -f /usr/libexec/mlx4-setup.sh -a -f /etc/rdma/mlx4.conf ]; then /usr/libexec/mlx4-setup.sh < /etc/rdma/mlx4.conf; fi; /sbin/modprobe mlx4_en; if /sbin/modinfo mlx4_ib > /dev/null 2>&1; then /sbin/modprobe mlx4_ib; fi) 6 | -------------------------------------------------------------------------------- /srp_daemon/ibsrpdm.8: -------------------------------------------------------------------------------- 1 | .\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md 2 | .TH IBSRPDM 8 "August 30, 2005" "OpenFabrics" "USER COMMANDS" 3 | 4 | .SH NAME 5 | ibsrpdm \- Discover SRP targets on an InfiniBand Fabric 6 | 7 | .SH SYNOPSIS 8 | .B ibsrpdm [\fIOPTIONS\fB] 9 | 10 | .SH DESCRIPTION 11 | .PP 12 | List InfiniBand SCSI RDMA Protocol (SRP) targets on an IB fabric. 13 | 14 | .SH OPTIONS 15 | 16 | .PP 17 | .TP 18 | \fB\-c\fR 19 | Generate output suitable for piping directly to a 20 | /sys/class/infiniband_srp/srp\-\-/add_target file 21 | .TP 22 | \fB\-d\fR \fIDEVICE\fR 23 | Use device file \fIDEVICE\fR (default /dev/infiniband/umad0) 24 | .TP 25 | \fB\-k\fR \fIP_KEY\fR 26 | Use InfiniBand partition key \fIP_KEY\fR (default 0xffff) 27 | .TP 28 | \fB\-v\fR 29 | Print more verbose output 30 | 31 | .SH SEE ALSO 32 | .BR srp_daemon (1) 33 | 34 | .SH AUTHORS 35 | .TP 36 | Roland Dreier 37 | .RI < roland@kernel.org > 38 | 39 | -------------------------------------------------------------------------------- /srp_daemon/modules-srp_daemon.conf: -------------------------------------------------------------------------------- 1 | # These modules are loaded by the system if srp_daemon is to be run 2 | ib_srp 3 | -------------------------------------------------------------------------------- /srp_daemon/srp_daemon.conf: -------------------------------------------------------------------------------- 1 | ## This is an example rules configuration file for srp_daemon. 2 | ## 3 | #This is a comment 4 | ## disallow the following dgid 5 | #d dgid=fe800000000000000002c90200402bd5 6 | ## allow target with the following ioc_guid 7 | #a ioc_guid=00a0b80200402bd7 8 | ## allow target with the following pkey 9 | #a pkey=ffff 10 | ## allow target with the following id_ext and ioc_guid 11 | #a id_ext=200500A0B81146A1,ioc_guid=00a0b80200402bef 12 | ## disallow all the rest 13 | #d 14 | ## 15 | ## Here is another example: 16 | ## 17 | ## Allow all targets and set queue size to 128. 18 | # a queue_size=128,max_cmd_per_lun=128 19 | 20 | -------------------------------------------------------------------------------- /srp_daemon/srp_daemon.rules.in: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="infiniband_mad", KERNEL=="*umad*", PROGRAM=="@SYSTEMCTL_BIN@ show srp_daemon -p ActiveState", RESULT=="ActiveState=active", ENV{SYSTEMD_WANTS}+="srp_daemon_port@$attr{ibdev}:$attr{port}.service" 2 | -------------------------------------------------------------------------------- /srp_daemon/srp_daemon.service.5: -------------------------------------------------------------------------------- 1 | '\" t 2 | .TH "SRP_DAEMON\&.SERVICE" "5" "" "srp_daemon" "srp_daemon.service" 3 | .\" ----------------------------------------------------------------- 4 | .\" * set default formatting 5 | .\" ----------------------------------------------------------------- 6 | .\" disable hyphenation 7 | .nh 8 | .\" disable justification (adjust text to left margin only) 9 | .ad l 10 | .\" ----------------------------------------------------------------- 11 | .\" * MAIN CONTENT STARTS HERE * 12 | .\" ----------------------------------------------------------------- 13 | .SH "NAME" 14 | srp_daemon.service \- srp_daemon systemd service that controls all ports 15 | .SH "SYNOPSIS" 16 | .PP 17 | srp_daemon\&.service 18 | .SH "DESCRIPTION" 19 | .PP 20 | The srp_daemon\&.service controls whether or not any srp_daemon processes are 21 | running. Although no srp_daemon processes are controlled directly by the 22 | srp_daemon\&.service, this service controls whether or not any 23 | srp_daemon_port@\&.service are allowed to be active. Each 24 | srp_daemon_port@\&.service controls one srp_daemon process. 25 | 26 | .SH "SEE ALSO" 27 | .PP 28 | \fBsrp_daemon\fR(1), 29 | \fBsrp_daemon_port@.service\fR(5), 30 | \fBsystemctl\fR(1) 31 | -------------------------------------------------------------------------------- /srp_daemon/srp_daemon.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Daemon that discovers and logs in to SRP target systems 3 | Documentation=man:srp_daemon file:/etc/srp_daemon.conf 4 | DefaultDependencies=false 5 | Conflicts=emergency.target emergency.service 6 | Before=remote-fs-pre.target 7 | 8 | [Service] 9 | Type=oneshot 10 | RemainAfterExit=yes 11 | ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/srp_daemon/start_on_all_ports 12 | MemoryDenyWriteExecute=yes 13 | PrivateTmp=yes 14 | ProtectHome=yes 15 | ProtectKernelModules=yes 16 | RestrictRealtime=yes 17 | 18 | [Install] 19 | WantedBy=multi-user.target 20 | -------------------------------------------------------------------------------- /srp_daemon/start_on_all_ports.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for p in /sys/class/infiniband/*/ports/*; do 4 | [ -e "$p" ] || continue 5 | [ "$(cat ${p}/link_layer)" == "InfiniBand" ] || continue 6 | p=${p#/sys/class/infiniband/} 7 | nohup @SYSTEMCTL_BIN@ start "srp_daemon_port@${p/\/ports\//:}" &/dev/null & 8 | done 9 | -------------------------------------------------------------------------------- /tests/run_tests.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 3 | # Copyright (c) 2018, Mellanox Technologies. All rights reserved. See COPYING file 4 | 5 | from args_parser import parser 6 | import unittest 7 | import os 8 | from importlib.machinery import SourceFileLoader 9 | 10 | 11 | module_path = os.path.join(os.path.dirname(__file__), '__init__.py') 12 | tests = SourceFileLoader('tests', module_path).load_module() 13 | parser.parse_args() 14 | unittest.main(module=tests) 15 | -------------------------------------------------------------------------------- /tests/test_cq_events.py: -------------------------------------------------------------------------------- 1 | import errno 2 | import unittest 3 | 4 | from pyverbs.pyverbs_error import PyverbsRDMAError 5 | from tests.base import RCResources, UDResources 6 | from tests.base import RDMATestCase 7 | from tests.utils import traffic 8 | 9 | from pyverbs.cq import CQ, CompChannel 10 | 11 | 12 | def create_cq_with_comp_channel(agr_obj): 13 | agr_obj.comp_channel = CompChannel(agr_obj.ctx) 14 | agr_obj.cq = CQ(agr_obj.ctx, agr_obj.num_msgs, None, agr_obj.comp_channel) 15 | agr_obj.cq.req_notify() 16 | 17 | 18 | class CqEventsUD(UDResources): 19 | def create_cq(self): 20 | create_cq_with_comp_channel(self) 21 | 22 | 23 | class CqEventsRC(RCResources): 24 | def create_cq(self): 25 | create_cq_with_comp_channel(self) 26 | 27 | 28 | class CqEventsTestCase(RDMATestCase): 29 | def setUp(self): 30 | super().setUp() 31 | self.iters = 100 32 | 33 | def test_cq_events_ud(self): 34 | self.create_players(CqEventsUD) 35 | traffic(**self.traffic_args) 36 | 37 | def test_cq_events_rc(self): 38 | self.create_players(CqEventsRC) 39 | traffic(**self.traffic_args) 40 | -------------------------------------------------------------------------------- /tests/test_fork.py: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB) 2 | # Copyright 2021 Amazon.com, Inc. or its affiliates. All rights reserved. 3 | 4 | import errno 5 | import pyverbs.enums as e 6 | from pyverbs.fork import fork_init, is_fork_initialized 7 | from pyverbs.pyverbs_error import PyverbsRDMAError 8 | 9 | from tests.base import PyverbsAPITestCase 10 | 11 | 12 | class ForkAPITest(PyverbsAPITestCase): 13 | """ 14 | Test the API of the fork functions. 15 | """ 16 | 17 | def test_is_fork_initialized(self): 18 | try: 19 | fork_init() 20 | expected_ret = [e.IBV_FORK_ENABLED, e.IBV_FORK_UNNEEDED] 21 | except PyverbsRDMAError as ex: 22 | # Depends on the order of the tests EINVAL could be returned if 23 | # fork_init() is called after an MR has already been registered. 24 | self.assertEqual(ex.error_code, errno.EINVAL) 25 | expected_ret = [e.IBV_FORK_DISABLED, e.IBV_FORK_UNNEEDED] 26 | 27 | ret = is_fork_initialized() 28 | if self.config['verbosity']: 29 | print(f'is_fork_initialized() = {ret}') 30 | self.assertIn(ret, expected_ret) 31 | -------------------------------------------------------------------------------- /util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | publish_internal_headers(util 2 | bitmap.h 3 | cl_qmap.h 4 | compiler.h 5 | interval_set.h 6 | node_name_map.h 7 | rdma_nl.h 8 | symver.h 9 | util.h 10 | ) 11 | 12 | set(C_FILES 13 | bitmap.c 14 | cl_map.c 15 | interval_set.c 16 | node_name_map.c 17 | open_cdev.c 18 | rdma_nl.c 19 | util.c 20 | ) 21 | 22 | if (HAVE_COHERENT_DMA) 23 | publish_internal_headers(util 24 | mmio.h 25 | s390_mmio_insn.h 26 | udma_barrier.h 27 | ) 28 | 29 | set(C_FILES ${C_FILES} 30 | mmio.c 31 | ) 32 | set_source_files_properties(mmio.c PROPERTIES COMPILE_FLAGS "${SSE_FLAGS}") 33 | endif() 34 | 35 | add_library(rdma_util STATIC ${C_FILES}) 36 | add_library(rdma_util_pic STATIC ${C_FILES}) 37 | set_property(TARGET rdma_util_pic PROPERTY POSITION_INDEPENDENT_CODE TRUE) 38 | -------------------------------------------------------------------------------- /util/node_name_map.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2019 Mellanox Technologies. All rights reserved. 2 | * 3 | * Connect to opensm's cl_nodenamemap.h if it is available. 4 | */ 5 | #ifndef __LIBUTIL_NODE_NAME_MAP_H__ 6 | #define __LIBUTIL_NODE_NAME_MAP_H__ 7 | 8 | #include 9 | 10 | struct nn_map; 11 | typedef struct nn_map nn_map_t; 12 | 13 | nn_map_t *open_node_name_map(const char *node_name_map); 14 | void close_node_name_map(nn_map_t *map); 15 | char *remap_node_name(nn_map_t *map, uint64_t target_guid, const char *nodedesc); 16 | char *clean_nodedesc(char *nodedesc); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /util/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | rdma_test_executable(bitmap_test bitmap_test.c) 2 | target_link_libraries(bitmap_test LINK_PRIVATE rdma_util) 3 | --------------------------------------------------------------------------------