Home
last modified time | relevance | path

Searched refs:ib_dev (Results 1 – 25 of 98) sorted by relevance

1234

/kernel/linux/linux-5.10/drivers/infiniband/core/
Droce_gid_mgmt.c82 unsigned long roce_gid_type_mask_support(struct ib_device *ib_dev, u8 port) in roce_gid_type_mask_support() argument
87 if (!rdma_protocol_roce(ib_dev, port)) in roce_gid_type_mask_support()
91 if (PORT_CAP_TO_GID_TYPE[i].is_supported(ib_dev, port)) in roce_gid_type_mask_support()
98 static void update_gid(enum gid_op_type gid_op, struct ib_device *ib_dev, in update_gid() argument
103 unsigned long gid_type_mask = roce_gid_type_mask_support(ib_dev, port); in update_gid()
110 ib_cache_gid_add(ib_dev, port, in update_gid()
114 ib_cache_gid_del(ib_dev, port, in update_gid()
147 is_eth_port_of_netdev_filter(struct ib_device *ib_dev, u8 port, in is_eth_port_of_netdev_filter() argument
171 is_eth_port_inactive_slave_filter(struct ib_device *ib_dev, u8 port, in is_eth_port_inactive_slave_filter() argument
200 is_ndev_for_default_gid_filter(struct ib_device *ib_dev, u8 port, in is_ndev_for_default_gid_filter() argument
[all …]
Dcache.c124 static void dispatch_gid_change_event(struct ib_device *ib_dev, u8 port) in dispatch_gid_change_event() argument
128 event.device = ib_dev; in dispatch_gid_change_event()
382 static void del_gid(struct ib_device *ib_dev, u8 port, in del_gid() argument
390 dev_dbg(&ib_dev->dev, "%s port=%d index=%d gid %pI6\n", __func__, port, in del_gid()
399 if (!rdma_protocol_roce(ib_dev, port)) in del_gid()
410 if (rdma_cap_roce_gid_table(ib_dev, port)) in del_gid()
411 ib_dev->ops.del_gid(&entry->attr, &entry->context); in del_gid()
546 static int __ib_cache_gid_add(struct ib_device *ib_dev, u8 port, in __ib_cache_gid_add() argument
562 table = rdma_gid_table(ib_dev, port); in __ib_cache_gid_add()
574 attr->device = ib_dev; in __ib_cache_gid_add()
[all …]
Duverbs_std_types_device.c141 struct ib_device *ib_dev, u8 port_num) in copy_port_attr_to_resp() argument
153 if (rdma_is_grh_required(ib_dev, port_num)) in copy_port_attr_to_resp()
156 if (rdma_cap_opa_ah(ib_dev, port_num)) { in copy_port_attr_to_resp()
173 resp->link_layer = rdma_port_get_link_layer(ib_dev, port_num); in copy_port_attr_to_resp()
179 struct ib_device *ib_dev; in UVERBS_HANDLER() local
189 ib_dev = ucontext->device; in UVERBS_HANDLER()
192 if (!ib_dev->ops.query_port) in UVERBS_HANDLER()
200 ret = ib_query_port(ib_dev, port_num, &attr); in UVERBS_HANDLER()
204 copy_port_attr_to_resp(&attr, &resp.legacy_resp, ib_dev, port_num); in UVERBS_HANDLER()
245 struct ib_device *ib_dev; in UVERBS_HANDLER() local
[all …]
Ddevice.c185 static void free_netdevs(struct ib_device *ib_dev);
787 pdata->ib_dev = device; in alloc_port_data()
1305 static void prevent_dealloc_device(struct ib_device *ib_dev) in prevent_dealloc_device() argument
1416 static void __ib_unregister_device(struct ib_device *ib_dev) in __ib_unregister_device() argument
1425 mutex_lock(&ib_dev->unregistration_lock); in __ib_unregister_device()
1426 if (!refcount_read(&ib_dev->refcount)) in __ib_unregister_device()
1429 disable_device(ib_dev); in __ib_unregister_device()
1432 free_netdevs(ib_dev); in __ib_unregister_device()
1434 ib_device_unregister_sysfs(ib_dev); in __ib_unregister_device()
1435 device_del(&ib_dev->dev); in __ib_unregister_device()
[all …]
Duverbs_std_types_dm.c58 struct ib_device *ib_dev = attrs->context->device; in UVERBS_HANDLER() local
62 if (!ib_dev->ops.alloc_dm) in UVERBS_HANDLER()
75 dm = ib_dev->ops.alloc_dm(ib_dev, attrs->context, &attr, attrs); in UVERBS_HANDLER()
79 dm->device = ib_dev; in UVERBS_HANDLER()
Duverbs_main.c94 if (!srcu_dereference(ufile->device->ib_dev, in ib_uverbs_get_ucontext_file()
188 struct ib_device *ib_dev; in ib_uverbs_release_file() local
194 ib_dev = srcu_dereference(file->device->ib_dev, in ib_uverbs_release_file()
196 if (ib_dev && !ib_dev->ops.disassociate_ucontext) in ib_uverbs_release_file()
197 module_put(ib_dev->ops.owner); in ib_uverbs_release_file()
482 struct ib_device *ib_dev = async_file->uobj.context->device; in ib_uverbs_init_async_event_file() local
495 INIT_IB_EVENT_HANDLER(&async_file->event_handler, ib_dev, in ib_uverbs_init_async_event_file()
886 struct ib_device *ib_dev; in ib_uverbs_open() local
898 ib_dev = srcu_dereference(dev->ib_dev, in ib_uverbs_open()
900 if (!ib_dev) { in ib_uverbs_open()
[all …]
Duverbs_std_types_counters.c61 struct ib_device *ib_dev = attrs->context->device; in UVERBS_HANDLER() local
70 if (!ib_dev->ops.create_counters) in UVERBS_HANDLER()
73 counters = rdma_zalloc_drv_obj(ib_dev, ib_counters); in UVERBS_HANDLER()
77 counters->device = ib_dev; in UVERBS_HANDLER()
82 ret = ib_dev->ops.create_counters(counters, attrs); in UVERBS_HANDLER()
Duverbs_std_types_cq.c67 struct ib_device *ib_dev = attrs->context->device; in UVERBS_HANDLER() local
75 if (!ib_dev->ops.create_cq || !ib_dev->ops.destroy_cq) in UVERBS_HANDLER()
115 cq = rdma_zalloc_drv_obj(ib_dev, ib_cq); in UVERBS_HANDLER()
121 cq->device = ib_dev; in UVERBS_HANDLER()
131 ret = ib_dev->ops.create_cq(cq, &attr, &attrs->driver_udata); in UVERBS_HANDLER()
Duverbs_std_types_flow_action.c227 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->ops.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->ops.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()
Dcore_priv.h92 struct net_device *ib_device_get_netdev(struct ib_device *ib_dev,
95 void ib_enum_roce_netdev(struct ib_device *ib_dev,
131 void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u8 port,
136 int ib_cache_gid_add(struct ib_device *ib_dev, u8 port,
139 int ib_cache_gid_del(struct ib_device *ib_dev, u8 port,
142 int ib_cache_gid_del_all_netdev_gids(struct ib_device *ib_dev, u8 port,
148 unsigned long roce_gid_type_mask_support(struct ib_device *ib_dev, u8 port);
Duverbs_std_types_mr.c52 struct ib_device *ib_dev = pd->device; in UVERBS_HANDLER() local
59 if (!ib_dev->ops.advise_mr) in UVERBS_HANDLER()
78 return ib_dev->ops.advise_mr(pd, advice, flags, sg_list, num_sge, in UVERBS_HANDLER()
92 struct ib_device *ib_dev = pd->device; in UVERBS_HANDLER() local
97 if (!ib_dev->ops.reg_dm_mr) in UVERBS_HANDLER()
Duverbs_cmd.c210 struct ib_device *ib_dev; in ib_alloc_ucontext() local
212 ib_dev = srcu_dereference(ufile->device->ib_dev, in ib_alloc_ucontext()
214 if (!ib_dev) in ib_alloc_ucontext()
217 ucontext = rdma_zalloc_drv_obj(ib_dev, ib_ucontext); in ib_alloc_ucontext()
221 ucontext->device = ib_dev; in ib_alloc_ucontext()
280 struct ib_device *ib_dev; in ib_uverbs_get_context() local
292 uobj = uobj_alloc(UVERBS_OBJECT_ASYNC_EVENT, attrs, &ib_dev); in ib_uverbs_get_context()
328 struct ib_device *ib_dev = ucontext->device; in copy_query_dev_fields() local
331 resp->node_guid = ib_dev->node_guid; in copy_query_dev_fields()
367 resp->phys_port_cnt = ib_dev->phys_port_cnt; in copy_query_dev_fields()
[all …]
/kernel/linux/linux-5.10/drivers/target/
Dtarget_core_iblock.c56 struct iblock_dev *ib_dev = NULL; in iblock_alloc_device() local
58 ib_dev = kzalloc(sizeof(struct iblock_dev), GFP_KERNEL); in iblock_alloc_device()
59 if (!ib_dev) { in iblock_alloc_device()
66 return &ib_dev->dev; in iblock_alloc_device()
71 struct iblock_dev *ib_dev = IBLOCK_DEV(dev); in iblock_configure_device() local
79 if (!(ib_dev->ibd_flags & IBDF_HAS_UDEV_PATH)) { in iblock_configure_device()
84 ret = bioset_init(&ib_dev->ibd_bio_set, IBLOCK_BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS); in iblock_configure_device()
91 ib_dev->ibd_udev_path); in iblock_configure_device()
94 if (!ib_dev->ibd_readonly) in iblock_configure_device()
99 bd = blkdev_get_by_path(ib_dev->ibd_udev_path, mode, ib_dev); in iblock_configure_device()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/usnic/
Dusnic_ib_main.c79 return scnprintf(buf, buf_sz, "PF: %s ", dev_name(&vf->pf->ib_dev.dev)); in usnic_ib_dump_vf_hdr()
147 usnic_info("PF Reset on %s\n", dev_name(&us_ibdev->ib_dev.dev)); in usnic_ib_handle_usdev_event()
150 ib_event.device = &us_ibdev->ib_dev; in usnic_ib_handle_usdev_event()
161 dev_name(&us_ibdev->ib_dev.dev)); in usnic_ib_handle_usdev_event()
163 ib_event.device = &us_ibdev->ib_dev; in usnic_ib_handle_usdev_event()
170 dev_name(&us_ibdev->ib_dev.dev)); in usnic_ib_handle_usdev_event()
173 ib_event.device = &us_ibdev->ib_dev; in usnic_ib_handle_usdev_event()
179 dev_name(&us_ibdev->ib_dev.dev)); in usnic_ib_handle_usdev_event()
186 dev_name(&us_ibdev->ib_dev.dev)); in usnic_ib_handle_usdev_event()
189 dev_name(&us_ibdev->ib_dev.dev), in usnic_ib_handle_usdev_event()
[all …]
Dusnic_ib_sysfs.c53 rdma_device_to_drv_device(device, struct usnic_ib_dev, ib_dev); in board_id_show()
71 rdma_device_to_drv_device(device, struct usnic_ib_dev, ib_dev); in config_show()
95 dev_name(&us_ibdev->ib_dev.dev), in config_show()
120 dev_name(&us_ibdev->ib_dev.dev)); in config_show()
133 rdma_device_to_drv_device(device, struct usnic_ib_dev, ib_dev); in iface_show()
144 rdma_device_to_drv_device(device, struct usnic_ib_dev, ib_dev); in max_vf_show()
155 rdma_device_to_drv_device(device, struct usnic_ib_dev, ib_dev); in qp_per_vf_show()
170 rdma_device_to_drv_device(device, struct usnic_ib_dev, ib_dev); in cq_per_vf_show()
276 kobject_get(&us_ibdev->ib_dev.dev.kobj); in usnic_ib_sysfs_register_usdev()
278 &us_ibdev->ib_dev.dev.kobj); in usnic_ib_sysfs_register_usdev()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/hns/
Dhns_roce_main.c180 static int hns_roce_query_device(struct ib_device *ib_dev, in hns_roce_query_device() argument
184 struct hns_roce_dev *hr_dev = to_hr_dev(ib_dev); in hns_roce_query_device()
226 static int hns_roce_query_port(struct ib_device *ib_dev, u8 port_num, in hns_roce_query_port() argument
229 struct hns_roce_dev *hr_dev = to_hr_dev(ib_dev); in hns_roce_query_port()
279 static int hns_roce_query_pkey(struct ib_device *ib_dev, u8 port, u16 index, in hns_roce_query_pkey() argument
290 static int hns_roce_modify_device(struct ib_device *ib_dev, int mask, in hns_roce_modify_device() argument
299 spin_lock_irqsave(&to_hr_dev(ib_dev)->sm_lock, flags); in hns_roce_modify_device()
300 memcpy(ib_dev->node_desc, props->node_desc, NODE_DESC_SIZE); in hns_roce_modify_device()
301 spin_unlock_irqrestore(&to_hr_dev(ib_dev)->sm_lock, flags); in hns_roce_modify_device()
384 static int hns_roce_port_immutable(struct ib_device *ib_dev, u8 port_num, in hns_roce_port_immutable() argument
[all …]
Dhns_roce_pd.c62 struct ib_device *ib_dev = ibpd->device; in hns_roce_alloc_pd() local
66 ret = hns_roce_pd_alloc(to_hr_dev(ib_dev), &pd->pdn); in hns_roce_alloc_pd()
68 ibdev_err(ib_dev, "failed to alloc pd, ret = %d.\n", ret); in hns_roce_alloc_pd()
78 hns_roce_pd_free(to_hr_dev(ib_dev), pd->pdn); in hns_roce_alloc_pd()
79 ibdev_err(ib_dev, "failed to copy to udata, ret = %d\n", ret); in hns_roce_alloc_pd()
Dhns_roce_qp.c175 ibdev_err(&hr_dev->ib_dev, "Failed to alloc bitmap\n"); in alloc_qpn()
375 ibdev_err(&hr_dev->ib_dev, "RQ config error, depth=%u, sge=%d\n", in set_rq_size()
382 ibdev_err(&hr_dev->ib_dev, "rq depth %u too large\n", in set_rq_size()
452 ibdev_err(&hr_dev->ib_dev, "failed to check SQ stride size.\n"); in check_sq_size_with_integrity()
457 ibdev_err(&hr_dev->ib_dev, "failed to check SQ SGE size %u.\n", in check_sq_size_with_integrity()
469 struct ib_device *ibdev = &hr_dev->ib_dev; in set_user_sq_size()
549 struct ib_device *ibdev = &hr_dev->ib_dev; in set_kernel_sq_size()
648 struct ib_device *ibdev = &hr_dev->ib_dev; in alloc_qp_buf()
727 struct ib_device *ibdev = &hr_dev->ib_dev; in alloc_qp_db()
802 struct ib_device *ibdev = &hr_dev->ib_dev; in alloc_kernel_wrid()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/sw/rxe/
Drxe_sysfs.c62 ib_device_put(&exists->ib_dev); in rxe_param_set_add()
83 struct ib_device *ib_dev; in rxe_param_set_remove() local
97 ib_dev = ib_device_get_by_name(intf, RDMA_DRIVER_RXE); in rxe_param_set_remove()
98 if (!ib_dev) { in rxe_param_set_remove()
103 ib_unregister_device_and_put(ib_dev); in rxe_param_set_remove()
Drxe_net.c170 ib_device_put(&rxe->ib_dev); in rxe_udp_encap_recv()
187 ib_device_put(&rxe->ib_dev); in rxe_udp_encap_recv()
432 attr = rdma_get_gid_attr(&rxe->ib_dev, port_num, av->grh.sgid_index); in rxe_init_packet()
492 rxe = ib_alloc_device(rxe_dev, ib_dev); in rxe_net_add()
500 ib_dealloc_device(&rxe->ib_dev); in rxe_net_add()
512 ev.device = &rxe->ib_dev; in rxe_port_event()
528 dev_info(&rxe->ib_dev.dev, "set active\n"); in rxe_port_up()
541 dev_info(&rxe->ib_dev.dev, "set down\n"); in rxe_port_down()
564 ib_unregister_device_queued(&rxe->ib_dev); in rxe_notify()
590 ib_device_put(&rxe->ib_dev); in rxe_notify()
/kernel/linux/linux-5.10/drivers/infiniband/ulp/isert/
Dib_isert.c109 struct ib_device *ib_dev = device->ib_device; in isert_create_qp() local
113 isert_conn->cq = ib_cq_pool_get(ib_dev, cq_size, -1, IB_POLL_WORKQUEUE); in isert_create_qp()
153 struct ib_device *ib_dev = device->ib_device; in isert_alloc_rx_descriptors() local
168 dma_addr = ib_dma_map_single(ib_dev, rx_desc->buf, in isert_alloc_rx_descriptors()
170 if (ib_dma_mapping_error(ib_dev, dma_addr)) in isert_alloc_rx_descriptors()
187 ib_dma_unmap_single(ib_dev, rx_desc->dma_addr, in isert_alloc_rx_descriptors()
199 struct ib_device *ib_dev = isert_conn->device->ib_device; in isert_free_rx_descriptors() local
208 ib_dma_unmap_single(ib_dev, rx_desc->dma_addr, in isert_free_rx_descriptors()
219 struct ib_device *ib_dev = device->ib_device; in isert_create_device_ib_res() local
223 ib_dev->attrs.max_send_sge, ib_dev->attrs.max_recv_sge); in isert_create_device_ib_res()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/mlx4/
Dmad.c199 ah_attr.type = rdma_ah_find_type(&dev->ib_dev, port_num); in update_sm_ah()
453 return ib_find_cached_pkey(&dev->ib_dev, port, pkey, ix); in find_slave_port_pkey_ix()
463 ret = ib_get_cached_pkey(&dev->ib_dev, port, pkey_ix, &slot_pkey); in find_slave_port_pkey_ix()
549 ret = ib_get_cached_pkey(&dev->ib_dev, port, wc->pkey_index, &cached_pkey); in mlx4_ib_send_to_slave()
576 attr.type = rdma_ah_find_type(&dev->ib_dev, port); in mlx4_ib_send_to_slave()
606 ib_dma_sync_single_for_cpu(&dev->ib_dev, in mlx4_ib_send_to_slave()
648 ib_dma_sync_single_for_device(&dev->ib_dev, in mlx4_ib_send_to_slave()
1029 ll = rdma_port_get_link_layer(&dev->ib_dev, p + 1); in mlx4_ib_mad_init()
1032 agent = ib_register_mad_agent(&dev->ib_dev, p + 1, in mlx4_ib_mad_init()
1157 mlx4_ib_warn(&dev->ib_dev, "Failed in get GUID INFO MAD_IFC\n"); in handle_slaves_guid_change()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/vmw_pvrdma/
Dpvrdma_main.c103 container_of(device, struct pvrdma_dev, ib_dev); in pvrdma_get_fw_ver_str()
203 dev->ib_dev.node_guid = dev->dsr->caps.node_guid; in pvrdma_register_device()
206 dev->ib_dev.num_comp_vectors = 1; in pvrdma_register_device()
207 dev->ib_dev.dev.parent = &dev->pdev->dev; in pvrdma_register_device()
208 dev->ib_dev.uverbs_cmd_mask = in pvrdma_register_device()
230 dev->ib_dev.node_type = RDMA_NODE_IB_CA; in pvrdma_register_device()
231 dev->ib_dev.phys_port_cnt = dev->dsr->caps.phys_port_cnt; in pvrdma_register_device()
233 ib_set_device_ops(&dev->ib_dev, &pvrdma_dev_ops); in pvrdma_register_device()
252 dev->ib_dev.uverbs_cmd_mask |= in pvrdma_register_device()
259 ib_set_device_ops(&dev->ib_dev, &pvrdma_dev_srq_ops); in pvrdma_register_device()
[all …]
/kernel/linux/linux-5.10/include/rdma/
Duverbs_std_types.h102 struct uverbs_attr_bundle *attrs, struct ib_device **ib_dev) in __uobj_alloc() argument
107 *ib_dev = attrs->context->device; in __uobj_alloc()
116 struct ib_device *ib_dev, in uverbs_flow_action_fill_action() argument
120 action->device = ib_dev; in uverbs_flow_action_fill_action()
/kernel/linux/linux-5.10/drivers/infiniband/hw/mthca/
Dmthca_provider.c962 rdma_device_to_drv_device(device, struct mthca_dev, ib_dev); in hw_rev_show()
972 rdma_device_to_drv_device(device, struct mthca_dev, ib_dev); in hca_type_show()
994 rdma_device_to_drv_device(device, struct mthca_dev, ib_dev); in board_id_show()
1030 memcpy(dev->ib_dev.node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in mthca_init_node_data()
1041 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); in mthca_init_node_data()
1071 container_of(device, struct mthca_dev, ib_dev); in get_dev_fw_str()
1161 dev->ib_dev.uverbs_cmd_mask = in mthca_register_device()
1179 dev->ib_dev.node_type = RDMA_NODE_IB_CA; in mthca_register_device()
1180 dev->ib_dev.phys_port_cnt = dev->limits.num_ports; in mthca_register_device()
1181 dev->ib_dev.num_comp_vectors = 1; in mthca_register_device()
[all …]

1234