Lines Matching +full:convert +full:- +full:rate

3  * Copyright (c) 2004, 2011-2012 Intel Corporation.  All rights reserved.
17 * - Redistributions of source code must retain the above
21 * - Redistributions in binary form must reproduce the above
72 * container_of - cast a member of a structure out to the containing structure
79 ((type *) ((uint8_t *)(ptr) - offsetof(type, member)))
84 static void *__VERBS_ABI_IS_EXTENDED = ((uint8_t *) NULL) - 1;
87 IBV_NODE_UNKNOWN = -1,
97 IBV_TRANSPORT_UNKNOWN = -1,
532 IBV_REREG_MR_FLAGS_SUPPORTED = ((IBV_REREG_MR_KEEP_VALID << 1) - 1)
603 * ibv_rate_to_mult - Convert the IB rate enum to a multiple of the
604 * base rate of 2.5 Gbit/sec. For example, IBV_RATE_5_GBPS will be
606 * @rate: rate to convert.
608 int __attribute_const ibv_rate_to_mult(enum ibv_rate rate);
611 * mult_to_ibv_rate - Convert a multiple of 2.5 Gbit/sec to an IB rate enum.
612 * @mult: multiple to convert.
617 * ibv_rate_to_mbps - Convert the IB rate enum to Mbit/sec.
619 * @rate: rate to convert.
621 int __attribute_const ibv_rate_to_mbps(enum ibv_rate rate);
624 * mbps_to_ibv_rate - Convert a Mbit/sec value to an IB rate enum.
625 * @mbps: value to convert.
1018 * - Contains receive WQEs, in this case its PD serves as scatter as well.
1019 * - Exposes post receive function to be used to post a list of work
1122 return cq->start_poll(cq, attr); in ibv_start_poll()
1127 return cq->next_poll(cq); in ibv_next_poll()
1132 cq->end_poll(cq); in ibv_end_poll()
1137 return cq->read_opcode(cq); in ibv_wc_read_opcode()
1142 return cq->read_vendor_err(cq); in ibv_wc_read_vendor_err()
1147 return cq->read_byte_len(cq); in ibv_wc_read_byte_len()
1152 return cq->read_imm_data(cq); in ibv_wc_read_imm_data()
1157 return cq->read_qp_num(cq); in ibv_wc_read_qp_num()
1162 return cq->read_src_qp(cq); in ibv_wc_read_src_qp()
1167 return cq->read_wc_flags(cq); in ibv_wc_read_wc_flags()
1172 return cq->read_slid(cq); in ibv_wc_read_slid()
1177 return cq->read_sl(cq); in ibv_wc_read_sl()
1182 return cq->read_dlid_path_bits(cq); in ibv_wc_read_dlid_path_bits()
1187 return cq->read_completion_ts(cq); in ibv_wc_read_completion_ts()
1192 return cq->read_cvlan(cq); in ibv_wc_read_cvlan()
1197 return cq->read_flow_tag(cq); in ibv_wc_read_flow_tag()
1204 return wq->post_recv(wq, recv_wr, bad_recv_wr); in ibv_post_wq_recv()
1221 /* default unicast and multicast rule -
1225 /* default multicast rule -
1229 /* sniffer rule - receive all port traffic */
1487 /* Consumer-supplied context returned for completion events */
1494 * Must be < context->num_comp_vectors.
1503 /* create cq attr flags - one or more flags from
1529 /* "grows up" - new fields go here */
1568 return (ctx->abi_compat != __VERBS_ABI_IS_EXTENDED) ? in verbs_get_ctx()
1574 (!__vctx || (__vctx->sz < sizeof(*__vctx) - offsetof(struct verbs_context, op)) || \
1575 !__vctx->op) ? NULL : __vctx; })
1579 if (vctx && (vctx->sz >= sizeof(*vctx) - offsetof(struct verbs_context, op))) \
1580 vctx->op = ptr; })
1583 * ibv_get_device_list - Get list of IB devices currently available
1584 * @num_devices: optional. if non-NULL, set to the number of devices
1587 * Return a NULL-terminated array of IB devices. The array can be
1593 * ibv_free_device_list - Free list from ibv_get_device_list()
1603 * ibv_get_device_name - Return kernel device name
1608 * ibv_get_device_guid - Return device's node GUID
1613 * ibv_open_device - Initialize device for use
1618 * ibv_close_device - Release device
1623 * ibv_get_async_event - Get next async event
1633 * ibv_ack_async_event - Acknowledge an async event
1639 * there should be a one-to-one correspondence between acks and
1645 * ibv_query_device - Get device properties
1651 * ibv_query_port - Get port properties
1661 port_attr->link_layer = IBV_LINK_LAYER_UNSPECIFIED; in ___ibv_query_port()
1662 port_attr->reserved = 0; in ___ibv_query_port()
1671 * ibv_query_gid - Get a GID table entry
1677 * ibv_query_pkey - Get a P_Key table entry
1683 * ibv_alloc_pd - Allocate a protection domain
1688 * ibv_dealloc_pd - Free a protection domain
1695 struct verbs_context *vctx = verbs_get_ctx_op(qp->context, in ibv_create_flow()
1697 if (!vctx || !vctx->ibv_create_flow) { in ibv_create_flow()
1702 return vctx->ibv_create_flow(qp, flow); in ibv_create_flow()
1707 struct verbs_context *vctx = verbs_get_ctx_op(flow_id->context, in ibv_destroy_flow()
1709 if (!vctx || !vctx->ibv_destroy_flow) in ibv_destroy_flow()
1710 return -ENOSYS; in ibv_destroy_flow()
1711 return vctx->ibv_destroy_flow(flow_id); in ibv_destroy_flow()
1715 * ibv_open_xrcd - Open an extended connection domain
1725 return vctx->open_xrcd(context, xrcd_init_attr); in ibv_open_xrcd()
1729 * ibv_close_xrcd - Close an extended connection domain
1733 struct verbs_context *vctx = verbs_get_ctx(xrcd->context); in ibv_close_xrcd()
1734 return vctx->close_xrcd(xrcd); in ibv_close_xrcd()
1738 * ibv_reg_mr - Register a memory region
1746 IBV_REREG_MR_ERR_INPUT = -1,
1748 IBV_REREG_MR_ERR_DONT_FORK_NEW = -2,
1750 IBV_REREG_MR_ERR_DO_FORK_OLD = -3,
1752 IBV_REREG_MR_ERR_CMD = -4,
1754 IBV_REREG_MR_ERR_CMD_AND_DO_FORK_NEW = -5,
1758 * ibv_rereg_mr - Re-Register a memory region
1764 * ibv_dereg_mr - Deregister a memory region
1769 * ibv_alloc_mw - Allocate a memory window
1776 if (!pd->context->ops.alloc_mw) { in ibv_alloc_mw()
1781 mw = pd->context->ops.alloc_mw(pd, type); in ibv_alloc_mw()
1786 * ibv_dealloc_mw - Free a memory window
1790 return mw->context->ops.dealloc_mw(mw); in ibv_dealloc_mw()
1794 * ibv_inc_rkey - Increase the 8 lsb in the given rkey
1805 * ibv_bind_mw - Bind a memory window to a region
1810 if (mw->type != IBV_MW_TYPE_1) in ibv_bind_mw()
1813 return mw->context->ops.bind_mw(qp, mw, mw_bind); in ibv_bind_mw()
1817 * ibv_create_comp_channel - Create a completion event channel
1822 * ibv_destroy_comp_channel - Destroy a completion event channel
1827 * ibv_create_cq - Create a completion queue
1828 * @context - Context CQ will be attached to
1829 * @cqe - Minimum number of entries required for CQ
1830 * @cq_context - Consumer-supplied context returned for completion events
1831 * @channel - Completion channel where completion events will be queued.
1833 * @comp_vector - Completion vector used to signal completion events.
1834 * Must be >= 0 and < context->num_comp_vectors.
1842 * ibv_create_cq_ex - Create a completion queue
1843 * @context - Context CQ will be attached to
1844 * @cq_attr - Attributes to create the CQ with
1857 if (cq_attr->comp_mask & ~(IBV_CQ_INIT_ATTR_MASK_RESERVED - 1)) { in ibv_create_cq_ex()
1862 return vctx->create_cq_ex(context, cq_attr); in ibv_create_cq_ex()
1866 * ibv_resize_cq - Modifies the capacity of the CQ.
1875 * ibv_destroy_cq - Destroy a completion queue
1880 * ibv_get_cq_event - Read next CQ event
1883 * @cq_context: Used to return consumer-supplied CQ context.
1892 * ibv_ack_cq_events - Acknowledge CQ completion events
1899 * one-to-one correspondence between acks and successful gets. An
1907 * ibv_poll_cq - Poll a CQ for work completions
1916 * non-negative and strictly less than num_entries, then the CQ was
1921 return cq->context->ops.poll_cq(cq, num_entries, wc); in ibv_poll_cq()
1925 * ibv_req_notify_cq - Request completion notification on a CQ. An
1929 * @solicited_only: If non-zero, an event will be generated only for
1935 return cq->context->ops.req_notify_cq(cq, solicited_only); in ibv_req_notify_cq()
1939 * ibv_create_srq - Creates a SRQ associated with the specified protection
1944 * srq_attr->max_wr and srq_attr->max_sge are read the determine the
1957 uint32_t mask = srq_init_attr_ex->comp_mask; in ibv_create_srq_ex()
1962 (srq_init_attr_ex->srq_type == IBV_SRQT_BASIC))) in ibv_create_srq_ex()
1963 return ibv_create_srq(srq_init_attr_ex->pd, in ibv_create_srq_ex()
1971 return vctx->create_srq_ex(context, srq_init_attr_ex); in ibv_create_srq_ex()
1975 * ibv_modify_srq - Modifies the attributes for the specified SRQ.
1979 * @srq_attr_mask: A bit-mask used to specify which attributes of the SRQ
1991 * ibv_query_srq - Returns the attribute list and current values for the
2000 struct verbs_context *vctx = verbs_get_ctx_op(srq->context, get_srq_num); in ibv_get_srq_num()
2005 return vctx->get_srq_num(srq, srq_num); in ibv_get_srq_num()
2009 * ibv_destroy_srq - Destroys the specified SRQ.
2015 * ibv_post_srq_recv - Posts a list of work requests to the specified SRQ.
2025 return srq->context->ops.post_srq_recv(srq, recv_wr, bad_recv_wr); in ibv_post_srq_recv()
2029 * ibv_create_qp - Create a queue pair.
2038 uint32_t mask = qp_init_attr_ex->comp_mask; in ibv_create_qp_ex()
2041 return ibv_create_qp(qp_init_attr_ex->pd, in ibv_create_qp_ex()
2049 return vctx->create_qp_ex(context, qp_init_attr_ex); in ibv_create_qp_ex()
2053 * ibv_query_rt_values_ex - Get current real time @values of a device.
2054 * @values - in/out - defines the attributes we need to query/queried.
2055 * (Or's bits of enum ibv_values_mask on values->comp_mask field)
2067 if (values->comp_mask & ~(IBV_VALUES_MASK_RESERVED - 1)) in ibv_query_rt_values_ex()
2070 return vctx->query_rt_values(context, values); in ibv_query_rt_values_ex()
2074 * ibv_query_device_ex - Get extended device properties
2088 ret = vctx->query_device_ex(context, input, attr, sizeof(*attr)); in ibv_query_device_ex()
2096 ret = ibv_query_device(context, &attr->orig_attr); in ibv_query_device_ex()
2102 * ibv_open_qp - Open a shareable queue pair.
2112 return vctx->open_qp(context, qp_open_attr); in ibv_open_qp()
2116 * ibv_modify_qp - Modify a queue pair.
2122 * ibv_query_qp - Returns the attribute list and current values for the
2126 * @attr_mask: A bit-mask used to select specific attributes to query.
2137 * ibv_destroy_qp - Destroy a queue pair.
2142 * ibv_create_wq - Creates a WQ associated with the specified protection
2149 * wq_init_attr->max_wr and wq_init_attr->max_sge determine
2170 wq = vctx->create_wq(context, wq_init_attr); in ibv_create_wq()
2172 wq->events_completed = 0; in ibv_create_wq()
2178 * ibv_modify_wq - Modifies the attributes for the specified WQ.
2181 * wq_attr->attr_mask: A bit-mask used to specify which attributes of the WQ
2192 struct verbs_context *vctx = verbs_get_ctx_op(wq->context, modify_wq); in ibv_modify_wq()
2197 return vctx->modify_wq(wq, wq_attr); in ibv_modify_wq()
2201 * ibv_destroy_wq - Destroys the specified WQ.
2211 vctx = verbs_get_ctx_op(wq->context, destroy_wq); in ibv_destroy_wq()
2215 return vctx->destroy_wq(wq); in ibv_destroy_wq()
2219 * ibv_create_rwq_ind_table - Creates a receive work queue Indirection Table
2237 return vctx->create_rwq_ind_table(context, init_attr); in ibv_create_rwq_ind_table()
2241 * ibv_destroy_rwq_ind_table - Destroys the specified Indirection Table.
2251 vctx = verbs_get_ctx_op(rwq_ind_table->context, destroy_rwq_ind_table); in ibv_destroy_rwq_ind_table()
2255 return vctx->destroy_rwq_ind_table(rwq_ind_table); in ibv_destroy_rwq_ind_table()
2259 * ibv_post_send - Post a list of work requests to a send queue.
2267 return qp->context->ops.post_send(qp, wr, bad_wr); in ibv_post_send()
2271 * ibv_post_recv - Post a list of work requests to a receive queue.
2276 return qp->context->ops.post_recv(qp, wr, bad_wr); in ibv_post_recv()
2280 * ibv_create_ah - Create an address handle.
2285 * ibv_init_ah_from_wc - Initializes address handle attributes from a
2300 * ibv_create_ah_from_wc - Creates an address handle associated with the
2315 * ibv_destroy_ah - Destroy an address handle.
2320 * ibv_attach_mcast - Attaches the specified QP to a multicast group.
2333 * ibv_detach_mcast - Detaches the specified QP from a multicast group.
2341 * ibv_fork_init - Prepare data structures so that fork() may be used
2342 * safely. If this function is not called or returns a non-zero
2343 * status, then libibverbs data structures are not fork()-safe and the
2349 * ibv_node_type_str - Return string describing node_type enum value
2354 * ibv_port_state_str - Return string describing port_state enum value
2359 * ibv_event_type_str - Return string describing event_type enum value