/freebsd/sys/ofed/drivers/infiniband/core/ |
H A D | ib_cache.c | 120 static void dispatch_gid_change_event(struct ib_device *ib_dev, u8 port) in dispatch_gid_change_event() argument 122 if (rdma_cap_roce_gid_table(ib_dev, port)) { in dispatch_gid_change_event() 125 event.device = ib_dev; in dispatch_gid_change_event() 175 static int write_gid(struct ib_device *ib_dev, u8 port, in write_gid() argument 191 if (rdma_cap_roce_gid_table(ib_dev, port)) { in write_gid() 198 ret = ib_dev->add_gid(ib_dev, port, ix, gid, attr, in write_gid() 201 ret = ib_dev->del_gid(ib_dev, port, ix, in write_gid() 233 static int add_gid(struct ib_device *ib_dev, u8 port, in add_gid() argument 238 return write_gid(ib_dev, port, table, ix, gid, attr, in add_gid() 242 static int modify_gid(struct ib_device *ib_dev, u8 port, in modify_gid() argument [all …]
|
H A D | ib_roce_gid_mgmt.c | 62 struct ib_device *ib_dev; member 75 unsigned long roce_gid_type_mask_support(struct ib_device *ib_dev, u8 port) in roce_gid_type_mask_support() argument 80 if (!rdma_protocol_roce(ib_dev, port)) in roce_gid_type_mask_support() 84 if (PORT_CAP_TO_GID_TYPE[i].is_supported(ib_dev, port)) in roce_gid_type_mask_support() 91 static void update_gid(enum gid_op_type gid_op, struct ib_device *ib_dev, in update_gid() argument 95 unsigned long gid_type_mask = roce_gid_type_mask_support(ib_dev, port); in update_gid() 106 ib_cache_gid_add(ib_dev, port, in update_gid() 110 ib_cache_gid_del(ib_dev, port, in update_gid() 119 roce_gid_match_netdev(struct ib_device *ib_dev, u8 port, in roce_gid_match_netdev() argument 129 roce_gid_match_all(struct ib_device *ib_dev, u8 port, in roce_gid_match_all() argument [all …]
|
H A D | ib_uverbs_main.c | 95 if (!srcu_dereference(ufile->device->ib_dev, in ib_uverbs_get_ucontext_file() 186 struct ib_device *ib_dev; in ib_uverbs_release_file() local 192 ib_dev = srcu_dereference(file->device->ib_dev, in ib_uverbs_release_file() 194 if (ib_dev && !ib_dev->disassociate_ucontext) in ib_uverbs_release_file() 195 module_put(ib_dev->owner); in ib_uverbs_release_file() 479 struct ib_device *ib_dev = async_file->uobj.context->device; in ib_uverbs_init_async_event_file() local 492 INIT_IB_EVENT_HANDLER(&async_file->event_handler, ib_dev, in ib_uverbs_init_async_event_file() 831 struct ib_device *ib_dev; in ib_uverbs_open() local 843 ib_dev = srcu_dereference(dev->ib_dev, in ib_uverbs_open() 845 if (!ib_dev) { in ib_uverbs_open() [all …]
|
H A D | core_priv.h | 88 void ib_enum_roce_netdev(struct ib_device *ib_dev, 107 void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u8 port, 112 int ib_cache_gid_add(struct ib_device *ib_dev, u8 port, 115 int ib_cache_gid_del(struct ib_device *ib_dev, u8 port, 118 int ib_cache_gid_del_all_netdev_gids(struct ib_device *ib_dev, u8 port, 125 int roce_rescan_device(struct ib_device *ib_dev); 126 unsigned long roce_gid_type_mask_support(struct ib_device *ib_dev, u8 port);
|
H A D | ib_uverbs_std_types_dm.c | 58 struct ib_device *ib_dev = attrs->context->device; in UVERBS_HANDLER() local 62 if (!ib_dev->alloc_dm) in UVERBS_HANDLER() 75 dm = ib_dev->alloc_dm(ib_dev, attrs->context, &attr, attrs); in UVERBS_HANDLER() 79 dm->device = ib_dev; in UVERBS_HANDLER()
|
H A D | ib_uverbs_std_types_counters.c | 59 struct ib_device *ib_dev = attrs->context->device; in UVERBS_HANDLER() local 68 if (!ib_dev->create_counters) in UVERBS_HANDLER() 71 counters = ib_dev->create_counters(ib_dev, attrs); in UVERBS_HANDLER() 77 counters->device = ib_dev; in UVERBS_HANDLER()
|
H A D | ib_uverbs_std_types_cq.c | 66 struct ib_device *ib_dev = attrs->context->device; in UVERBS_HANDLER() local 74 if (!ib_dev->create_cq || !ib_dev->destroy_cq) in UVERBS_HANDLER() 111 cq = rdma_zalloc_drv_obj(ib_dev, ib_cq); in UVERBS_HANDLER() 117 cq->device = ib_dev; in UVERBS_HANDLER() 124 ret = ib_dev->create_cq(cq, &attr, &attrs->driver_udata); in UVERBS_HANDLER()
|
H A D | ib_device.c | 722 void ib_enum_roce_netdev(struct ib_device *ib_dev, in ib_enum_roce_netdev() argument 730 for (port = rdma_start_port(ib_dev); port <= rdma_end_port(ib_dev); in ib_enum_roce_netdev() 732 if (rdma_protocol_roce(ib_dev, port)) { in ib_enum_roce_netdev() 735 if (ib_dev->get_netdev) in ib_enum_roce_netdev() 736 idev = ib_dev->get_netdev(ib_dev, port); in ib_enum_roce_netdev() 743 if (filter(ib_dev, port, idev, filter_cookie)) in ib_enum_roce_netdev() 744 cb(ib_dev, port, idev, cookie); in ib_enum_roce_netdev() 782 struct ib_device *ib_dev; in ib_cache_gid_del_all_by_netdev() local 786 list_for_each_entry(ib_dev, &device_list, core_list) { in ib_cache_gid_del_all_by_netdev() 787 for (port = rdma_start_port(ib_dev); in ib_cache_gid_del_all_by_netdev() [all …]
|
H A D | ib_uverbs_std_types_device.c | 133 struct ib_device *ib_dev, u8 port_num) in copy_port_attr_to_resp() argument 158 resp->link_layer = rdma_port_get_link_layer(ib_dev, port_num); in copy_port_attr_to_resp() 164 struct ib_device *ib_dev; in UVERBS_HANDLER() local 174 ib_dev = ucontext->device; in UVERBS_HANDLER() 177 if (!ib_dev->query_port) in UVERBS_HANDLER() 185 ret = ib_query_port(ib_dev, port_num, &attr); in UVERBS_HANDLER() 189 copy_port_attr_to_resp(&attr, &resp.legacy_resp, ib_dev, port_num); in UVERBS_HANDLER()
|
H A D | ib_uverbs_std_types_mr.c | 51 struct ib_device *ib_dev = pd->device; in UVERBS_HANDLER() local 58 if (!ib_dev->advise_mr) in UVERBS_HANDLER() 77 return ib_dev->advise_mr(pd, advice, flags, sg_list, num_sge, in UVERBS_HANDLER() 91 struct ib_device *ib_dev = pd->device; in UVERBS_HANDLER() local 96 if (!ib_dev->reg_dm_mr) in UVERBS_HANDLER()
|
H A D | ib_uverbs_std_types_flow_action.c | 227 static int parse_flow_action_esp(struct ib_device *ib_dev, in parse_flow_action_esp() argument 313 struct ib_device *ib_dev = attrs->context->device; in UVERBS_HANDLER() local 318 if (!ib_dev->create_flow_action_esp) in UVERBS_HANDLER() 321 ret = parse_flow_action_esp(ib_dev, attrs, &esp_attr, false); in UVERBS_HANDLER() 326 action = ib_dev->create_flow_action_esp(ib_dev, &esp_attr.hdr, in UVERBS_HANDLER() 331 uverbs_flow_action_fill_action(action, uobj, ib_dev, in UVERBS_HANDLER()
|
H A D | ib_uverbs_cmd.c | 219 struct ib_device *ib_dev; in ib_alloc_ucontext() local 221 ib_dev = srcu_dereference(ufile->device->ib_dev, in ib_alloc_ucontext() 223 if (!ib_dev) in ib_alloc_ucontext() 226 ucontext = rdma_zalloc_drv_obj(ib_dev, ib_ucontext); in ib_alloc_ucontext() 230 ucontext->device = ib_dev; in ib_alloc_ucontext() 277 struct ib_device *ib_dev; in ib_uverbs_get_context() local 289 uobj = uobj_alloc(UVERBS_OBJECT_ASYNC_EVENT, attrs, &ib_dev); in ib_uverbs_get_context() 324 struct ib_device *ib_dev = ucontext->device; in copy_query_dev_fields() local 327 resp->node_guid = ib_dev->node_guid; in copy_query_dev_fields() 365 resp->phys_port_cnt = ib_dev->phys_port_cnt; in copy_query_dev_fields() [all …]
|
H A D | ib_user_mad.c | 97 struct ib_device *ib_dev; member 639 if (!file->port->ib_dev) { in ib_umad_reg_agent() 688 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num, in ib_umad_reg_agent() 741 if (!file->port->ib_dev) { in ib_umad_reg_agent2() 805 agent = ib_register_mad_agent(file->port->ib_dev, file->port->port_num, in ib_umad_reg_agent2() 944 if (!port->ib_dev) in ib_umad_open() 1050 ret = ib_modify_port(port->ib_dev, port->port_num, 0, &props); in ib_umad_sm_open() 1066 ib_modify_port(port->ib_dev, port->port_num, 0, &props); in ib_umad_sm_open() 1084 if (port->ib_dev) in ib_umad_sm_close() 1085 ret = ib_modify_port(port->ib_dev, port->port_num, 0, &props); in ib_umad_sm_close() [all …]
|
/freebsd/sys/dev/mthca/ |
H A D | mthca_provider.c | 1027 container_of(device, struct mthca_dev, ib_dev.dev); in show_rev() 1035 container_of(device, struct mthca_dev, ib_dev.dev); in show_hca() 1055 container_of(device, struct mthca_dev, ib_dev.dev); in show_board() 1088 memcpy(dev->ib_dev.node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in mthca_init_node_data() 1099 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); in mthca_init_node_data() 1129 container_of(device, struct mthca_dev, ib_dev); in get_dev_fw_str() 1151 INIT_IB_DEVICE_OPS(&dev->ib_dev.ops, mthca, MTHCA); in mthca_register_device() 1152 strlcpy(dev->ib_dev.name, "mthca%d", IB_DEVICE_NAME_MAX); in mthca_register_device() 1153 dev->ib_dev.owner = THIS_MODULE; in mthca_register_device() 1155 dev->ib_dev.uverbs_abi_ver = MTHCA_UVERBS_ABI_VERSION; in mthca_register_device() [all …]
|
/freebsd/sys/dev/mlx5/mlx5_ib/ |
H A D | mlx5_ib_main.c | 125 ibev.device = &ibdev->ib_dev; in mlx5_netdev_event() 439 if (ib_get_cached_gid(&dev->ib_dev, port_num, index, &gid, &attr)) in mlx5_get_roce_udp_sport() 460 ret = ib_get_cached_gid(&dev->ib_dev, port_num, index, &gid, &attr); in mlx5_get_roce_gid_type() 598 switch (mlx5_get_vport_access_method(&dev->ib_dev)) { in mlx5_query_node_guid() 2523 err = mlx5_query_node_desc(dev, dev->ib_dev.node_desc); in init_node_data() 2527 return mlx5_query_node_guid(dev, &dev->ib_dev.node_guid); in init_node_data() 2534 container_of(device, struct mlx5_ib_dev, ib_dev.dev); in show_fw_pages() 2543 container_of(device, struct mlx5_ib_dev, ib_dev.dev); in show_reg_pages() 2552 container_of(device, struct mlx5_ib_dev, ib_dev.dev); in show_hca() 2560 container_of(device, struct mlx5_ib_dev, ib_dev in show_rev() [all...] |
H A D | mlx5_ib_ah.c | 69 ll = dev->ib_dev.get_link_layer(&dev->ib_dev, ah_attr->port_num); in mlx5_ib_create_ah() 85 err = ib_resolve_eth_dmac(&dev->ib_dev, ah_attr); in mlx5_ib_create_ah()
|
/freebsd/sys/dev/mlx4/mlx4_ib/ |
H A D | mlx4_ib_main.c | 410 if (!rdma_cap_roce_gid_table(&ibdev->ib_dev, port_num)) in mlx4_ib_gid_index_to_real_index() 413 ret = ib_get_cached_gid(&ibdev->ib_dev, port_num, index, &gid, &attr); in mlx4_ib_gid_index_to_real_index() 898 err = mlx4_ib_query_sl2vl(&mdev->ib_dev, i, &sl2vl); in mlx4_init_sl2vl_tbl() 1949 memcpy(dev->ib_dev.node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in init_node_data() 1958 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); in init_node_data() 1970 container_of(device, struct mlx4_ib_dev, ib_dev.dev); in show_hca() 1978 container_of(device, struct mlx4_ib_dev, ib_dev.dev); in show_rev() 1986 container_of(device, struct mlx4_ib_dev, ib_dev.dev); in show_board() 2169 ibdev->ib_dev.get_hw_stats = mlx4_ib_get_hw_stats; in mlx4_ib_alloc_diag_counters() 2170 ibdev->ib_dev.alloc_hw_stats = mlx4_ib_alloc_hw_stats; in mlx4_ib_alloc_diag_counters() [all …]
|
H A D | mlx4_ib_mad.c | 449 return ib_find_cached_pkey(&dev->ib_dev, port, pkey, ix); in find_slave_port_pkey_ix() 459 ret = ib_get_cached_pkey(&dev->ib_dev, port, pkey_ix, &slot_pkey); in find_slave_port_pkey_ix() 519 ret = ib_get_cached_pkey(&dev->ib_dev, port, wc->pkey_index, &cached_pkey); in mlx4_ib_send_to_slave() 562 ib_dma_sync_single_for_cpu(&dev->ib_dev, in mlx4_ib_send_to_slave() 606 ib_dma_sync_single_for_device(&dev->ib_dev, in mlx4_ib_send_to_slave() 1001 ll = rdma_port_get_link_layer(&dev->ib_dev, p + 1); in mlx4_ib_mad_init() 1004 agent = ib_register_mad_agent(&dev->ib_dev, p + 1, in mlx4_ib_mad_init() 1109 mlx4_ib_warn(&dev->ib_dev, "failed to allocate memory for guid info mads\n"); in handle_slaves_guid_change() 1131 mlx4_ib_warn(&dev->ib_dev, "Failed in get GUID INFO MAD_IFC\n"); in handle_slaves_guid_change() 1152 struct mlx4_ib_dev *dev = ew->ib_dev; in handle_port_mgmt_change_event() [all …]
|
H A D | mlx4_ib_sysfs.c | 122 ret = __mlx4_ib_query_gid(&mdev->ib_dev, port->num, in show_port_gid() 149 ret = __mlx4_ib_query_pkey(&mdev->ib_dev, port->num, in show_phys_port_pkey() 230 ret = __mlx4_ib_query_port(&device->ib_dev, port_num, &attr, 1); in add_port_entries() 593 int is_eth = rdma_port_get_link_layer(&p->dev->ib_dev, p->port_num) == in add_vf_smi_entries() 628 int is_eth = rdma_port_get_link_layer(&p->dev->ib_dev, p->port_num) == in remove_vf_smi_entries() 643 int is_eth = rdma_port_get_link_layer(&dev->ib_dev, port_num) == in add_port() 822 kobject_get(dev->ib_dev.ports_parent->parent)); in mlx4_ib_device_register_sysfs() 835 for (i = 1; i <= dev->ib_dev.phys_port_cnt; ++i) { in mlx4_ib_device_register_sysfs() 852 kobject_put(dev->ib_dev.ports_parent->parent); in mlx4_ib_device_register_sysfs() 888 kobject_put(device->ib_dev.ports_parent->parent); in mlx4_ib_device_unregister_sysfs()
|
/freebsd/sys/ofed/include/rdma/ |
H A D | uverbs_std_types.h | 117 struct uverbs_attr_bundle *attrs, struct ib_device **ib_dev) in __uobj_alloc() argument 122 *ib_dev = attrs->context->device; in __uobj_alloc() 131 struct ib_device *ib_dev, in uverbs_flow_action_fill_action() argument 135 action->device = ib_dev; in uverbs_flow_action_fill_action()
|
/freebsd/contrib/ofed/libibverbs/examples/ |
H A D | uc_pingpong.c | 302 static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev, int size, in pp_init_ctx() argument 325 ctx->context = ibv_open_device(ib_dev); in pp_init_ctx() 328 ibv_get_device_name(ib_dev)); in pp_init_ctx() 536 struct ibv_device *ib_dev; in main() local 656 ib_dev = *dev_list; in main() 657 if (!ib_dev) { in main() 666 ib_dev = dev_list[i]; in main() 667 if (!ib_dev) { in main() 673 ctx = pp_init_ctx(ib_dev, size, rx_depth, ib_port, use_event); in main()
|
H A D | ud_pingpong.c | 298 static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev, int size, in pp_init_ctx() argument 321 ctx->context = ibv_open_device(ib_dev); in pp_init_ctx() 324 ibv_get_device_name(ib_dev)); in pp_init_ctx() 559 struct ibv_device *ib_dev; in main() local 669 ib_dev = *dev_list; in main() 670 if (!ib_dev) { in main() 679 ib_dev = dev_list[i]; in main() 680 if (!ib_dev) { in main() 686 ctx = pp_init_ctx(ib_dev, size, rx_depth, ib_port, use_event); in main()
|
H A D | devinfo.c | 417 static int print_hca_cap(struct ibv_device *ib_dev, uint8_t ib_port) in print_hca_cap() argument 426 ctx = ibv_open_device(ib_dev); in print_hca_cap() 444 printf("hca_id:\t%s\n", ibv_get_device_name(ib_dev)); in print_hca_cap() 446 transport_str(ib_dev->transport_type), ib_dev->transport_type); in print_hca_cap() 455 if (ibv_read_sysfs_file(ib_dev->ibdev_path, "board_id", buf, sizeof buf) > 0) in print_hca_cap() 565 if (ib_dev->transport_type == IBV_TRANSPORT_IB) in print_hca_cap()
|
H A D | rc_pingpong.c | 329 static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev, int size, in pp_init_ctx() argument 353 ctx->context = ibv_open_device(ib_dev); in pp_init_ctx() 356 ibv_get_device_name(ib_dev)); in pp_init_ctx() 691 struct ibv_device *ib_dev; in main() local 831 ib_dev = *dev_list; in main() 832 if (!ib_dev) { in main() 841 ib_dev = dev_list[i]; in main() 842 if (!ib_dev) { in main() 848 ctx = pp_init_ctx(ib_dev, size, rx_depth, ib_port, use_event); in main()
|
H A D | srq_pingpong.c | 352 static struct pingpong_context *pp_init_ctx(struct ibv_device *ib_dev, int size, in pp_init_ctx() argument 376 ctx->context = ibv_open_device(ib_dev); in pp_init_ctx() 379 ibv_get_device_name(ib_dev)); in pp_init_ctx() 628 struct ibv_device *ib_dev; in main() local 771 ib_dev = *dev_list; in main() 772 if (!ib_dev) { in main() 780 ib_dev = dev_list[i]; in main() 781 if (!ib_dev) { in main() 787 ctx = pp_init_ctx(ib_dev, size, num_qp, rx_depth, ib_port, use_event); in main()
|