ib_verbs.h (b56511c15713ba6c7572e77a41f7ddba9c1053ec) | ib_verbs.h (f6a8a19bb11b46d60250ddc4e3e1ba6aa166f488) |
---|---|
1/* 2 * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved. 3 * Copyright (c) 2004 Infinicon Corporation. All rights reserved. 4 * Copyright (c) 2004 Intel Corporation. All rights reserved. 5 * Copyright (c) 2004 Topspin Corporation. All rights reserved. 6 * Copyright (c) 2004 Voltaire Corporation. All rights reserved. 7 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. 8 * Copyright (c) 2005, 2006, 2007 Cisco Systems. All rights reserved. --- 55 unchanged lines hidden (view full) --- 64#include <linux/cgroup_rdma.h> 65#include <uapi/rdma/ib_user_verbs.h> 66#include <rdma/restrack.h> 67#include <uapi/rdma/rdma_user_ioctl.h> 68#include <uapi/rdma/ib_user_ioctl_verbs.h> 69 70#define IB_FW_VERSION_NAME_MAX ETHTOOL_FWVERS_LEN 71 | 1/* 2 * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved. 3 * Copyright (c) 2004 Infinicon Corporation. All rights reserved. 4 * Copyright (c) 2004 Intel Corporation. All rights reserved. 5 * Copyright (c) 2004 Topspin Corporation. All rights reserved. 6 * Copyright (c) 2004 Voltaire Corporation. All rights reserved. 7 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. 8 * Copyright (c) 2005, 2006, 2007 Cisco Systems. All rights reserved. --- 55 unchanged lines hidden (view full) --- 64#include <linux/cgroup_rdma.h> 65#include <uapi/rdma/ib_user_verbs.h> 66#include <rdma/restrack.h> 67#include <uapi/rdma/rdma_user_ioctl.h> 68#include <uapi/rdma/ib_user_ioctl_verbs.h> 69 70#define IB_FW_VERSION_NAME_MAX ETHTOOL_FWVERS_LEN 71 |
72struct ib_umem_odp; 73 | |
74extern struct workqueue_struct *ib_wq; 75extern struct workqueue_struct *ib_comp_wq; | 72extern struct workqueue_struct *ib_wq; 73extern struct workqueue_struct *ib_comp_wq; |
76extern struct workqueue_struct *ib_comp_unbound_wq; | |
77 78union ib_gid { 79 u8 raw[16]; 80 struct { 81 __be64 subnet_prefix; 82 __be64 interface_id; 83 } global; 84}; --- 1050 unchanged lines hidden (view full) --- 1135}; 1136 1137/* 1138 * Note: users may not call ib_close_qp or ib_destroy_qp from the event_handler 1139 * callback to destroy the passed in QP. 1140 */ 1141 1142struct ib_qp_init_attr { | 74 75union ib_gid { 76 u8 raw[16]; 77 struct { 78 __be64 subnet_prefix; 79 __be64 interface_id; 80 } global; 81}; --- 1050 unchanged lines hidden (view full) --- 1132}; 1133 1134/* 1135 * Note: users may not call ib_close_qp or ib_destroy_qp from the event_handler 1136 * callback to destroy the passed in QP. 1137 */ 1138 1139struct ib_qp_init_attr { |
1143 /* Consumer's event_handler callback must not block */ | |
1144 void (*event_handler)(struct ib_event *, void *); | 1140 void (*event_handler)(struct ib_event *, void *); |
1145 | |
1146 void *qp_context; 1147 struct ib_cq *send_cq; 1148 struct ib_cq *recv_cq; 1149 struct ib_srq *srq; 1150 struct ib_xrcd *xrcd; /* XRC TGT QPs only */ 1151 struct ib_qp_cap cap; 1152 enum ib_sig_type sq_sig_type; 1153 enum ib_qp_type qp_type; | 1141 void *qp_context; 1142 struct ib_cq *send_cq; 1143 struct ib_cq *recv_cq; 1144 struct ib_srq *srq; 1145 struct ib_xrcd *xrcd; /* XRC TGT QPs only */ 1146 struct ib_qp_cap cap; 1147 enum ib_sig_type sq_sig_type; 1148 enum ib_qp_type qp_type; |
1154 u32 create_flags; | 1149 enum ib_qp_create_flags create_flags; |
1155 1156 /* 1157 * Only needed for special QP types, or when using the RW API. 1158 */ 1159 u8 port_num; 1160 struct ib_rwq_ind_table *rwq_ind_tbl; 1161 u32 source_qpn; 1162}; --- 115 unchanged lines hidden (view full) --- 1278 u8 retry_cnt; 1279 u8 rnr_retry; 1280 u8 alt_port_num; 1281 u8 alt_timeout; 1282 u32 rate_limit; 1283}; 1284 1285enum ib_wr_opcode { | 1150 1151 /* 1152 * Only needed for special QP types, or when using the RW API. 1153 */ 1154 u8 port_num; 1155 struct ib_rwq_ind_table *rwq_ind_tbl; 1156 u32 source_qpn; 1157}; --- 115 unchanged lines hidden (view full) --- 1273 u8 retry_cnt; 1274 u8 rnr_retry; 1275 u8 alt_port_num; 1276 u8 alt_timeout; 1277 u32 rate_limit; 1278}; 1279 1280enum ib_wr_opcode { |
1286 /* These are shared with userspace */ 1287 IB_WR_RDMA_WRITE = IB_UVERBS_WR_RDMA_WRITE, 1288 IB_WR_RDMA_WRITE_WITH_IMM = IB_UVERBS_WR_RDMA_WRITE_WITH_IMM, 1289 IB_WR_SEND = IB_UVERBS_WR_SEND, 1290 IB_WR_SEND_WITH_IMM = IB_UVERBS_WR_SEND_WITH_IMM, 1291 IB_WR_RDMA_READ = IB_UVERBS_WR_RDMA_READ, 1292 IB_WR_ATOMIC_CMP_AND_SWP = IB_UVERBS_WR_ATOMIC_CMP_AND_SWP, 1293 IB_WR_ATOMIC_FETCH_AND_ADD = IB_UVERBS_WR_ATOMIC_FETCH_AND_ADD, 1294 IB_WR_LSO = IB_UVERBS_WR_TSO, 1295 IB_WR_SEND_WITH_INV = IB_UVERBS_WR_SEND_WITH_INV, 1296 IB_WR_RDMA_READ_WITH_INV = IB_UVERBS_WR_RDMA_READ_WITH_INV, 1297 IB_WR_LOCAL_INV = IB_UVERBS_WR_LOCAL_INV, 1298 IB_WR_MASKED_ATOMIC_CMP_AND_SWP = 1299 IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP, 1300 IB_WR_MASKED_ATOMIC_FETCH_AND_ADD = 1301 IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD, 1302 1303 /* These are kernel only and can not be issued by userspace */ 1304 IB_WR_REG_MR = 0x20, | 1281 IB_WR_RDMA_WRITE, 1282 IB_WR_RDMA_WRITE_WITH_IMM, 1283 IB_WR_SEND, 1284 IB_WR_SEND_WITH_IMM, 1285 IB_WR_RDMA_READ, 1286 IB_WR_ATOMIC_CMP_AND_SWP, 1287 IB_WR_ATOMIC_FETCH_AND_ADD, 1288 IB_WR_LSO, 1289 IB_WR_SEND_WITH_INV, 1290 IB_WR_RDMA_READ_WITH_INV, 1291 IB_WR_LOCAL_INV, 1292 IB_WR_REG_MR, 1293 IB_WR_MASKED_ATOMIC_CMP_AND_SWP, 1294 IB_WR_MASKED_ATOMIC_FETCH_AND_ADD, |
1305 IB_WR_REG_SIG_MR, | 1295 IB_WR_REG_SIG_MR, |
1306 | |
1307 /* reserve values for low level drivers' internal use. 1308 * These values will not be used at all in the ib core layer. 1309 */ 1310 IB_WR_RESERVED1 = 0xf0, 1311 IB_WR_RESERVED2, 1312 IB_WR_RESERVED3, 1313 IB_WR_RESERVED4, 1314 IB_WR_RESERVED5, --- 176 unchanged lines hidden (view full) --- 1491struct ib_ucontext { 1492 struct ib_device *device; 1493 struct ib_uverbs_file *ufile; 1494 /* 1495 * 'closing' can be read by the driver only during a destroy callback, 1496 * it is set when we are closing the file descriptor and indicates 1497 * that mm_sem may be locked. 1498 */ | 1296 /* reserve values for low level drivers' internal use. 1297 * These values will not be used at all in the ib core layer. 1298 */ 1299 IB_WR_RESERVED1 = 0xf0, 1300 IB_WR_RESERVED2, 1301 IB_WR_RESERVED3, 1302 IB_WR_RESERVED4, 1303 IB_WR_RESERVED5, --- 176 unchanged lines hidden (view full) --- 1480struct ib_ucontext { 1481 struct ib_device *device; 1482 struct ib_uverbs_file *ufile; 1483 /* 1484 * 'closing' can be read by the driver only during a destroy callback, 1485 * it is set when we are closing the file descriptor and indicates 1486 * that mm_sem may be locked. 1487 */ |
1499 bool closing; | 1488 int closing; |
1500 1501 bool cleanup_retryable; 1502 | 1489 1490 bool cleanup_retryable; 1491 |
1492 struct pid *tgid; |
|
1503#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING | 1493#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING |
1504 void (*invalidate_range)(struct ib_umem_odp *umem_odp, | 1494 struct rb_root_cached umem_tree; 1495 /* 1496 * Protects .umem_rbroot and tree, as well as odp_mrs_count and 1497 * mmu notifiers registration. 1498 */ 1499 struct rw_semaphore umem_rwsem; 1500 void (*invalidate_range)(struct ib_umem *umem, |
1505 unsigned long start, unsigned long end); | 1501 unsigned long start, unsigned long end); |
1506 struct mutex per_mm_list_lock; 1507 struct list_head per_mm_list; | 1502 1503 struct mmu_notifier mn; 1504 atomic_t notifier_count; 1505 /* A list of umems that don't have private mmu notifier counters yet. */ 1506 struct list_head no_private_counters; 1507 int odp_mrs_count; |
1508#endif 1509 1510 struct ib_rdmacg_object cg_obj; 1511}; 1512 1513struct ib_uobject { 1514 u64 user_handle; /* handle given to us by userspace */ 1515 /* ufile & ucontext owning this object */ --- 49 unchanged lines hidden (view full) --- 1565 struct ib_uobject *uobject; 1566 const struct ib_gid_attr *sgid_attr; 1567 enum rdma_ah_attr_type type; 1568}; 1569 1570typedef void (*ib_comp_handler)(struct ib_cq *cq, void *cq_context); 1571 1572enum ib_poll_context { | 1508#endif 1509 1510 struct ib_rdmacg_object cg_obj; 1511}; 1512 1513struct ib_uobject { 1514 u64 user_handle; /* handle given to us by userspace */ 1515 /* ufile & ucontext owning this object */ --- 49 unchanged lines hidden (view full) --- 1565 struct ib_uobject *uobject; 1566 const struct ib_gid_attr *sgid_attr; 1567 enum rdma_ah_attr_type type; 1568}; 1569 1570typedef void (*ib_comp_handler)(struct ib_cq *cq, void *cq_context); 1571 1572enum ib_poll_context { |
1573 IB_POLL_DIRECT, /* caller context, no hw completions */ 1574 IB_POLL_SOFTIRQ, /* poll from softirq context */ 1575 IB_POLL_WORKQUEUE, /* poll from workqueue */ 1576 IB_POLL_UNBOUND_WORKQUEUE, /* poll from unbound workqueue */ | 1573 IB_POLL_DIRECT, /* caller context, no hw completions */ 1574 IB_POLL_SOFTIRQ, /* poll from softirq context */ 1575 IB_POLL_WORKQUEUE, /* poll from workqueue */ |
1577}; 1578 1579struct ib_cq { 1580 struct ib_device *device; 1581 struct ib_uobject *uobject; 1582 ib_comp_handler comp_handler; 1583 void (*event_handler)(struct ib_event *, void *); 1584 void *cq_context; 1585 int cqe; 1586 atomic_t usecnt; /* count number of work queues */ 1587 enum ib_poll_context poll_ctx; 1588 struct ib_wc *wc; 1589 union { 1590 struct irq_poll iop; 1591 struct work_struct work; 1592 }; | 1576}; 1577 1578struct ib_cq { 1579 struct ib_device *device; 1580 struct ib_uobject *uobject; 1581 ib_comp_handler comp_handler; 1582 void (*event_handler)(struct ib_event *, void *); 1583 void *cq_context; 1584 int cqe; 1585 atomic_t usecnt; /* count number of work queues */ 1586 enum ib_poll_context poll_ctx; 1587 struct ib_wc *wc; 1588 union { 1589 struct irq_poll iop; 1590 struct work_struct work; 1591 }; |
1593 struct workqueue_struct *comp_wq; | |
1594 /* 1595 * Implementation details of the RDMA core, don't use in drivers: 1596 */ 1597 struct rdma_restrack_entry res; 1598}; 1599 1600struct ib_srq { 1601 struct ib_device *device; --- 618 unchanged lines hidden (view full) --- 2220 /* multicast */ 2221 int (*attach_mcast)(struct net_device *dev, struct ib_device *hca, 2222 union ib_gid *gid, u16 mlid, 2223 int set_qkey, u32 qkey); 2224 int (*detach_mcast)(struct net_device *dev, struct ib_device *hca, 2225 union ib_gid *gid, u16 mlid); 2226}; 2227 | 1592 /* 1593 * Implementation details of the RDMA core, don't use in drivers: 1594 */ 1595 struct rdma_restrack_entry res; 1596}; 1597 1598struct ib_srq { 1599 struct ib_device *device; --- 618 unchanged lines hidden (view full) --- 2218 /* multicast */ 2219 int (*attach_mcast)(struct net_device *dev, struct ib_device *hca, 2220 union ib_gid *gid, u16 mlid, 2221 int set_qkey, u32 qkey); 2222 int (*detach_mcast)(struct net_device *dev, struct ib_device *hca, 2223 union ib_gid *gid, u16 mlid); 2224}; 2225 |
2226struct rdma_netdev_alloc_params { 2227 size_t sizeof_priv; 2228 unsigned int txqs; 2229 unsigned int rxqs; 2230 void *param; 2231 2232 int (*initialize_rdma_netdev)(struct ib_device *device, u8 port_num, 2233 struct net_device *netdev, void *param); 2234}; 2235 |
|
2228struct ib_port_pkey_list { 2229 /* Lock to hold while modifying the list. */ 2230 spinlock_t list_lock; 2231 struct list_head pkey_list; 2232}; 2233 2234struct ib_counters { 2235 struct ib_device *device; --- 14 unchanged lines hidden (view full) --- 2250 /* Do not access @dma_device directly from ULP nor from HW drivers. */ 2251 struct device *dma_device; 2252 2253 char name[IB_DEVICE_NAME_MAX]; 2254 2255 struct list_head event_handler_list; 2256 spinlock_t event_handler_lock; 2257 | 2236struct ib_port_pkey_list { 2237 /* Lock to hold while modifying the list. */ 2238 spinlock_t list_lock; 2239 struct list_head pkey_list; 2240}; 2241 2242struct ib_counters { 2243 struct ib_device *device; --- 14 unchanged lines hidden (view full) --- 2258 /* Do not access @dma_device directly from ULP nor from HW drivers. */ 2259 struct device *dma_device; 2260 2261 char name[IB_DEVICE_NAME_MAX]; 2262 2263 struct list_head event_handler_list; 2264 spinlock_t event_handler_lock; 2265 |
2258 rwlock_t client_data_lock; | 2266 spinlock_t client_data_lock; |
2259 struct list_head core_list; 2260 /* Access to the client_data_list is protected by the client_data_lock | 2267 struct list_head core_list; 2268 /* Access to the client_data_list is protected by the client_data_lock |
2261 * rwlock and the lists_rwsem read-write semaphore 2262 */ | 2269 * spinlock and the lists_rwsem read-write semaphore */ |
2263 struct list_head client_data_list; 2264 2265 struct ib_cache cache; 2266 /** 2267 * port_immutable is indexed by port number 2268 */ 2269 struct ib_port_immutable *port_immutable; 2270 --- 250 unchanged lines hidden (view full) --- 2521 int (*destroy_counters)(struct ib_counters *counters); 2522 int (*read_counters)(struct ib_counters *counters, 2523 struct ib_counters_read_attr *counters_read_attr, 2524 struct uverbs_attr_bundle *attrs); 2525 2526 /** 2527 * rdma netdev operation 2528 * | 2270 struct list_head client_data_list; 2271 2272 struct ib_cache cache; 2273 /** 2274 * port_immutable is indexed by port number 2275 */ 2276 struct ib_port_immutable *port_immutable; 2277 --- 250 unchanged lines hidden (view full) --- 2528 int (*destroy_counters)(struct ib_counters *counters); 2529 int (*read_counters)(struct ib_counters *counters, 2530 struct ib_counters_read_attr *counters_read_attr, 2531 struct uverbs_attr_bundle *attrs); 2532 2533 /** 2534 * rdma netdev operation 2535 * |
2529 * Driver implementing alloc_rdma_netdev must return -EOPNOTSUPP if it 2530 * doesn't support the specified rdma netdev type. | 2536 * Driver implementing alloc_rdma_netdev or rdma_netdev_get_params 2537 * must return -EOPNOTSUPP if it doesn't support the specified type. |
2531 */ 2532 struct net_device *(*alloc_rdma_netdev)( 2533 struct ib_device *device, 2534 u8 port_num, 2535 enum rdma_netdev_t type, 2536 const char *name, 2537 unsigned char name_assign_type, 2538 void (*setup)(struct net_device *)); 2539 | 2538 */ 2539 struct net_device *(*alloc_rdma_netdev)( 2540 struct ib_device *device, 2541 u8 port_num, 2542 enum rdma_netdev_t type, 2543 const char *name, 2544 unsigned char name_assign_type, 2545 void (*setup)(struct net_device *)); 2546 |
2547 int (*rdma_netdev_get_params)(struct ib_device *device, u8 port_num, 2548 enum rdma_netdev_t type, 2549 struct rdma_netdev_alloc_params *params); 2550 |
|
2540 struct module *owner; 2541 struct device dev; | 2551 struct module *owner; 2552 struct device dev; |
2542 /* First group for device attributes, NULL terminated array */ 2543 const struct attribute_group *groups[2]; 2544 | |
2545 struct kobject *ports_parent; 2546 struct list_head port_list; 2547 2548 enum { 2549 IB_DEV_UNINITIALIZED, 2550 IB_DEV_REGISTERED, 2551 IB_DEV_UNREGISTERED 2552 } reg_state; --- 67 unchanged lines hidden (view full) --- 2620 struct list_head list; 2621}; 2622 2623struct ib_device *ib_alloc_device(size_t size); 2624void ib_dealloc_device(struct ib_device *device); 2625 2626void ib_get_device_fw_str(struct ib_device *device, char *str); 2627 | 2553 struct kobject *ports_parent; 2554 struct list_head port_list; 2555 2556 enum { 2557 IB_DEV_UNINITIALIZED, 2558 IB_DEV_REGISTERED, 2559 IB_DEV_UNREGISTERED 2560 } reg_state; --- 67 unchanged lines hidden (view full) --- 2628 struct list_head list; 2629}; 2630 2631struct ib_device *ib_alloc_device(size_t size); 2632void ib_dealloc_device(struct ib_device *device); 2633 2634void ib_get_device_fw_str(struct ib_device *device, char *str); 2635 |
2628int ib_register_device(struct ib_device *device, const char *name, 2629 int (*port_callback)(struct ib_device *, u8, 2630 struct kobject *)); | 2636int ib_register_device(struct ib_device *device, 2637 int (*port_callback)(struct ib_device *, 2638 u8, struct kobject *)); |
2631void ib_unregister_device(struct ib_device *device); 2632 2633int ib_register_client (struct ib_client *client); 2634void ib_unregister_client(struct ib_client *client); 2635 2636void *ib_get_client_data(struct ib_device *device, struct ib_client *client); 2637void ib_set_client_data(struct ib_device *device, struct ib_client *client, 2638 void *data); 2639 | 2639void ib_unregister_device(struct ib_device *device); 2640 2641int ib_register_client (struct ib_client *client); 2642void ib_unregister_client(struct ib_client *client); 2643 2644void *ib_get_client_data(struct ib_device *device, struct ib_client *client); 2645void ib_set_client_data(struct ib_device *device, struct ib_client *client, 2646 void *data); 2647 |
2640#if IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS) 2641int rdma_user_mmap_io(struct ib_ucontext *ucontext, struct vm_area_struct *vma, 2642 unsigned long pfn, unsigned long size, pgprot_t prot); 2643int rdma_user_mmap_page(struct ib_ucontext *ucontext, 2644 struct vm_area_struct *vma, struct page *page, 2645 unsigned long size); 2646#else 2647static inline int rdma_user_mmap_io(struct ib_ucontext *ucontext, 2648 struct vm_area_struct *vma, 2649 unsigned long pfn, unsigned long size, 2650 pgprot_t prot) 2651{ 2652 return -EINVAL; 2653} 2654static inline int rdma_user_mmap_page(struct ib_ucontext *ucontext, 2655 struct vm_area_struct *vma, struct page *page, 2656 unsigned long size) 2657{ 2658 return -EINVAL; 2659} 2660#endif 2661 | |
2662static inline int ib_copy_from_udata(void *dest, struct ib_udata *udata, size_t len) 2663{ 2664 return copy_from_user(dest, udata->inbuf, len) ? -EFAULT : 0; 2665} 2666 2667static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len) 2668{ 2669 return copy_to_user(udata->outbuf, src, len) ? -EFAULT : 0; --- 67 unchanged lines hidden (view full) --- 2737/** 2738 * ib_modify_qp_is_ok - Check that the supplied attribute mask 2739 * contains all required attributes and no attributes not allowed for 2740 * the given QP state transition. 2741 * @cur_state: Current QP state 2742 * @next_state: Next QP state 2743 * @type: QP type 2744 * @mask: Mask of supplied QP attributes | 2648static inline int ib_copy_from_udata(void *dest, struct ib_udata *udata, size_t len) 2649{ 2650 return copy_from_user(dest, udata->inbuf, len) ? -EFAULT : 0; 2651} 2652 2653static inline int ib_copy_to_udata(struct ib_udata *udata, void *src, size_t len) 2654{ 2655 return copy_to_user(udata->outbuf, src, len) ? -EFAULT : 0; --- 67 unchanged lines hidden (view full) --- 2723/** 2724 * ib_modify_qp_is_ok - Check that the supplied attribute mask 2725 * contains all required attributes and no attributes not allowed for 2726 * the given QP state transition. 2727 * @cur_state: Current QP state 2728 * @next_state: Next QP state 2729 * @type: QP type 2730 * @mask: Mask of supplied QP attributes |
2731 * @ll : link layer of port |
|
2745 * 2746 * This function is a helper function that a low-level driver's 2747 * modify_qp method can use to validate the consumer's input. It 2748 * checks that cur_state and next_state are valid QP states, that a 2749 * transition from cur_state to next_state is allowed by the IB spec, 2750 * and that the attribute mask supplied is allowed for the transition. 2751 */ 2752bool ib_modify_qp_is_ok(enum ib_qp_state cur_state, enum ib_qp_state next_state, | 2732 * 2733 * This function is a helper function that a low-level driver's 2734 * modify_qp method can use to validate the consumer's input. It 2735 * checks that cur_state and next_state are valid QP states, that a 2736 * transition from cur_state to next_state is allowed by the IB spec, 2737 * and that the attribute mask supplied is allowed for the transition. 2738 */ 2739bool ib_modify_qp_is_ok(enum ib_qp_state cur_state, enum ib_qp_state next_state, |
2753 enum ib_qp_type type, enum ib_qp_attr_mask mask); | 2740 enum ib_qp_type type, enum ib_qp_attr_mask mask, 2741 enum rdma_link_layer ll); |
2754 2755void ib_register_event_handler(struct ib_event_handler *event_handler); 2756void ib_unregister_event_handler(struct ib_event_handler *event_handler); 2757void ib_dispatch_event(struct ib_event *event); 2758 2759int ib_query_port(struct ib_device *device, 2760 u8 port_num, struct ib_port_attr *port_attr); 2761 --- 1412 unchanged lines hidden (view full) --- 4174 if (comp_vector < 0 || comp_vector >= device->num_comp_vectors || 4175 !device->get_vector_affinity) 4176 return NULL; 4177 4178 return device->get_vector_affinity(device, comp_vector); 4179 4180} 4181 | 2742 2743void ib_register_event_handler(struct ib_event_handler *event_handler); 2744void ib_unregister_event_handler(struct ib_event_handler *event_handler); 2745void ib_dispatch_event(struct ib_event *event); 2746 2747int ib_query_port(struct ib_device *device, 2748 u8 port_num, struct ib_port_attr *port_attr); 2749 --- 1412 unchanged lines hidden (view full) --- 4162 if (comp_vector < 0 || comp_vector >= device->num_comp_vectors || 4163 !device->get_vector_affinity) 4164 return NULL; 4165 4166 return device->get_vector_affinity(device, comp_vector); 4167 4168} 4169 |
4170static inline void ib_set_flow(struct ib_uobject *uobj, struct ib_flow *ibflow, 4171 struct ib_qp *qp, struct ib_device *device) 4172{ 4173 uobj->object = ibflow; 4174 ibflow->uobject = uobj; 4175 4176 if (qp) { 4177 atomic_inc(&qp->usecnt); 4178 ibflow->qp = qp; 4179 } 4180 4181 ibflow->device = device; 4182} 4183 |
|
4182/** 4183 * rdma_roce_rescan_device - Rescan all of the network devices in the system 4184 * and add their gids, as needed, to the relevant RoCE devices. 4185 * 4186 * @device: the rdma device 4187 */ 4188void rdma_roce_rescan_device(struct ib_device *ibdev); 4189 4190struct ib_ucontext *ib_uverbs_get_ucontext(struct ib_uverbs_file *ufile); 4191 4192int uverbs_destroy_def_handler(struct ib_uverbs_file *file, 4193 struct uverbs_attr_bundle *attrs); | 4184/** 4185 * rdma_roce_rescan_device - Rescan all of the network devices in the system 4186 * and add their gids, as needed, to the relevant RoCE devices. 4187 * 4188 * @device: the rdma device 4189 */ 4190void rdma_roce_rescan_device(struct ib_device *ibdev); 4191 4192struct ib_ucontext *ib_uverbs_get_ucontext(struct ib_uverbs_file *ufile); 4193 4194int uverbs_destroy_def_handler(struct ib_uverbs_file *file, 4195 struct uverbs_attr_bundle *attrs); |
4196 4197struct net_device *rdma_alloc_netdev(struct ib_device *device, u8 port_num, 4198 enum rdma_netdev_t type, const char *name, 4199 unsigned char name_assign_type, 4200 void (*setup)(struct net_device *)); |
|
4194#endif /* IB_VERBS_H */ | 4201#endif /* IB_VERBS_H */ |