Linux Audio

Check our new training course

Loading...
v6.8
  1/*
  2 * Copyright (c) 2005 Topspin Communications.  All rights reserved.
  3 * Copyright (c) 2005, 2006 Cisco Systems.  All rights reserved.
  4 * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  5 * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
  6 * Copyright (c) 2005 PathScale, Inc. All rights reserved.
  7 *
  8 * This software is available to you under a choice of one of two
  9 * licenses.  You may choose to be licensed under the terms of the GNU
 10 * General Public License (GPL) Version 2, available from the file
 11 * COPYING in the main directory of this source tree, or the
 12 * OpenIB.org BSD license below:
 13 *
 14 *     Redistribution and use in source and binary forms, with or
 15 *     without modification, are permitted provided that the following
 16 *     conditions are met:
 17 *
 18 *      - Redistributions of source code must retain the above
 19 *        copyright notice, this list of conditions and the following
 20 *        disclaimer.
 21 *
 22 *      - Redistributions in binary form must reproduce the above
 23 *        copyright notice, this list of conditions and the following
 24 *        disclaimer in the documentation and/or other materials
 25 *        provided with the distribution.
 26 *
 27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 28 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 29 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 30 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 31 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 32 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 33 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 34 * SOFTWARE.
 35 */
 36
 37#ifndef UVERBS_H
 38#define UVERBS_H
 39
 40#include <linux/kref.h>
 41#include <linux/idr.h>
 42#include <linux/mutex.h>
 43#include <linux/completion.h>
 44#include <linux/cdev.h>
 45
 46#include <rdma/ib_verbs.h>
 47#include <rdma/ib_umem.h>
 48#include <rdma/ib_user_verbs.h>
 49#include <rdma/uverbs_std_types.h>
 50
 51#define UVERBS_MODULE_NAME ib_uverbs
 52#include <rdma/uverbs_named_ioctl.h>
 53
 54static inline void
 55ib_uverbs_init_udata(struct ib_udata *udata,
 56		     const void __user *ibuf,
 57		     void __user *obuf,
 58		     size_t ilen, size_t olen)
 59{
 60	udata->inbuf  = ibuf;
 61	udata->outbuf = obuf;
 62	udata->inlen  = ilen;
 63	udata->outlen = olen;
 64}
 65
 66static inline void
 67ib_uverbs_init_udata_buf_or_null(struct ib_udata *udata,
 68				 const void __user *ibuf,
 69				 void __user *obuf,
 70				 size_t ilen, size_t olen)
 71{
 72	ib_uverbs_init_udata(udata,
 73			     ilen ? ibuf : NULL, olen ? obuf : NULL,
 74			     ilen, olen);
 75}
 76
 77/*
 78 * Our lifetime rules for these structs are the following:
 79 *
 80 * struct ib_uverbs_device: One reference is held by the module and
 81 * released in ib_uverbs_remove_one().  Another reference is taken by
 82 * ib_uverbs_open() each time the character special file is opened,
 83 * and released in ib_uverbs_release_file() when the file is released.
 84 *
 85 * struct ib_uverbs_file: One reference is held by the VFS and
 86 * released when the file is closed.  Another reference is taken when
 87 * an asynchronous event queue file is created and released when the
 88 * event file is closed.
 89 *
 90 * struct ib_uverbs_event_queue: Base structure for
 91 * struct ib_uverbs_async_event_file and struct ib_uverbs_completion_event_file.
 92 * One reference is held by the VFS and released when the file is closed.
 93 * For asynchronous event files, another reference is held by the corresponding
 94 * main context file and released when that file is closed.  For completion
 95 * event files, a reference is taken when a CQ is created that uses the file,
 96 * and released when the CQ is destroyed.
 97 */
 98
 99struct ib_uverbs_device {
100	refcount_t				refcount;
101	u32					num_comp_vectors;
102	struct completion			comp;
103	struct device				dev;
104	/* First group for device attributes, NULL terminated array */
105	const struct attribute_group		*groups[2];
106	struct ib_device	__rcu	       *ib_dev;
107	int					devnum;
108	struct cdev			        cdev;
109	struct rb_root				xrcd_tree;
110	struct mutex				xrcd_tree_mutex;
 
111	struct srcu_struct			disassociate_srcu;
112	struct mutex				lists_mutex; /* protect lists */
113	struct list_head			uverbs_file_list;
114	struct uverbs_api			*uapi;
115};
116
117struct ib_uverbs_event_queue {
 
 
 
118	spinlock_t				lock;
119	int					is_closed;
120	wait_queue_head_t			poll_wait;
121	struct fasync_struct		       *async_queue;
122	struct list_head			event_list;
123};
124
125struct ib_uverbs_async_event_file {
126	struct ib_uobject			uobj;
127	struct ib_uverbs_event_queue		ev_queue;
128	struct ib_event_handler			event_handler;
129};
130
131struct ib_uverbs_completion_event_file {
132	struct ib_uobject			uobj;
133	struct ib_uverbs_event_queue		ev_queue;
134};
135
136struct ib_uverbs_file {
137	struct kref				ref;
 
 
138	struct ib_uverbs_device		       *device;
139	struct mutex				ucontext_lock;
140	/*
141	 * ucontext must be accessed via ib_uverbs_get_ucontext() or with
142	 * ucontext_lock held
143	 */
144	struct ib_ucontext		       *ucontext;
145	struct ib_uverbs_async_event_file      *default_async_file;
 
146	struct list_head			list;
147
148	/*
149	 * To access the uobjects list hw_destroy_rwsem must be held for write
150	 * OR hw_destroy_rwsem held for read AND uobjects_lock held.
151	 * hw_destroy_rwsem should be called across any destruction of the HW
152	 * object of an associated uobject.
153	 */
154	struct rw_semaphore	hw_destroy_rwsem;
155	spinlock_t		uobjects_lock;
156	struct list_head	uobjects;
157
158	struct mutex umap_lock;
159	struct list_head umaps;
160	struct page *disassociate_page;
161
162	struct xarray		idr;
163};
164
165struct ib_uverbs_event {
166	union {
167		struct ib_uverbs_async_event_desc	async;
168		struct ib_uverbs_comp_event_desc	comp;
169	}					desc;
170	struct list_head			list;
171	struct list_head			obj_list;
172	u32				       *counter;
173};
174
175struct ib_uverbs_mcast_entry {
176	struct list_head	list;
177	union ib_gid 		gid;
178	u16 			lid;
179};
180
181struct ib_uevent_object {
182	struct ib_uobject	uobject;
183	struct ib_uverbs_async_event_file *event_file;
184	/* List member for ib_uverbs_async_event_file list */
185	struct list_head	event_list;
186	u32			events_reported;
187};
188
189struct ib_uxrcd_object {
190	struct ib_uobject	uobject;
191	atomic_t		refcnt;
192};
193
194struct ib_usrq_object {
195	struct ib_uevent_object	uevent;
196	struct ib_uxrcd_object *uxrcd;
197};
198
199struct ib_uqp_object {
200	struct ib_uevent_object	uevent;
201	/* lock for mcast list */
202	struct mutex		mcast_lock;
203	struct list_head 	mcast_list;
204	struct ib_uxrcd_object *uxrcd;
205};
206
207struct ib_uwq_object {
208	struct ib_uevent_object	uevent;
209};
210
211struct ib_ucq_object {
212	struct ib_uevent_object uevent;
 
213	struct list_head	comp_list;
 
214	u32			comp_events_reported;
 
215};
216
217extern const struct file_operations uverbs_event_fops;
218extern const struct file_operations uverbs_async_event_fops;
219void ib_uverbs_init_event_queue(struct ib_uverbs_event_queue *ev_queue);
220void ib_uverbs_init_async_event_file(struct ib_uverbs_async_event_file *ev_file);
221void ib_uverbs_free_event_queue(struct ib_uverbs_event_queue *event_queue);
222void ib_uverbs_flow_resources_free(struct ib_uflow_resources *uflow_res);
223int uverbs_async_event_release(struct inode *inode, struct file *filp);
 
 
 
 
 
 
 
 
 
 
 
 
 
224
225int ib_alloc_ucontext(struct uverbs_attr_bundle *attrs);
226int ib_init_ucontext(struct uverbs_attr_bundle *attrs);
227
228void ib_uverbs_release_ucq(struct ib_uverbs_completion_event_file *ev_file,
229			   struct ib_ucq_object *uobj);
230void ib_uverbs_release_uevent(struct ib_uevent_object *uobj);
231void ib_uverbs_release_file(struct kref *ref);
232void ib_uverbs_async_handler(struct ib_uverbs_async_event_file *async_file,
233			     __u64 element, __u64 event,
234			     struct list_head *obj_list, u32 *counter);
235
236void ib_uverbs_comp_handler(struct ib_cq *cq, void *cq_context);
237void ib_uverbs_cq_event_handler(struct ib_event *event, void *context_ptr);
238void ib_uverbs_qp_event_handler(struct ib_event *event, void *context_ptr);
239void ib_uverbs_wq_event_handler(struct ib_event *event, void *context_ptr);
240void ib_uverbs_srq_event_handler(struct ib_event *event, void *context_ptr);
241int ib_uverbs_dealloc_xrcd(struct ib_uobject *uobject, struct ib_xrcd *xrcd,
242			   enum rdma_remove_reason why,
243			   struct uverbs_attr_bundle *attrs);
244
245int uverbs_dealloc_mw(struct ib_mw *mw);
246void ib_uverbs_detach_umcast(struct ib_qp *qp,
247			     struct ib_uqp_object *uobj);
248
249long ib_uverbs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
250
251struct ib_uverbs_flow_spec {
252	union {
253		union {
254			struct ib_uverbs_flow_spec_hdr hdr;
255			struct {
256				__u32 type;
257				__u16 size;
258				__u16 reserved;
259			};
260		};
261		struct ib_uverbs_flow_spec_eth     eth;
262		struct ib_uverbs_flow_spec_ipv4    ipv4;
263		struct ib_uverbs_flow_spec_esp     esp;
264		struct ib_uverbs_flow_spec_tcp_udp tcp_udp;
265		struct ib_uverbs_flow_spec_ipv6    ipv6;
266		struct ib_uverbs_flow_spec_action_tag	flow_tag;
267		struct ib_uverbs_flow_spec_action_drop	drop;
268		struct ib_uverbs_flow_spec_action_handle action;
269		struct ib_uverbs_flow_spec_action_count flow_count;
270	};
271};
272
273int ib_uverbs_kern_spec_to_ib_spec_filter(enum ib_flow_spec_type type,
274					  const void *kern_spec_mask,
275					  const void *kern_spec_val,
276					  size_t kern_filter_sz,
277					  union ib_flow_spec *ib_spec);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
279/*
280 * ib_uverbs_query_port_resp.port_cap_flags started out as just a copy of the
281 * PortInfo CapabilityMask, but was extended with unique bits.
282 */
283static inline u32 make_port_cap_flags(const struct ib_port_attr *attr)
284{
285	u32 res;
286
287	/* All IBA CapabilityMask bits are passed through here, except bit 26,
288	 * which is overridden with IP_BASED_GIDS. This is due to a historical
289	 * mistake in the implementation of IP_BASED_GIDS. Otherwise all other
290	 * bits match the IBA definition across all kernel versions.
291	 */
292	res = attr->port_cap_flags & ~(u32)IB_UVERBS_PCF_IP_BASED_GIDS;
293
294	if (attr->ip_gids)
295		res |= IB_UVERBS_PCF_IP_BASED_GIDS;
296
297	return res;
298}
299
300static inline struct ib_uverbs_async_event_file *
301ib_uverbs_get_async_event(struct uverbs_attr_bundle *attrs,
302			  u16 id)
303{
304	struct ib_uobject *async_ev_file_uobj;
305	struct ib_uverbs_async_event_file *async_ev_file;
306
307	async_ev_file_uobj = uverbs_attr_get_uobject(attrs, id);
308	if (IS_ERR(async_ev_file_uobj))
309		async_ev_file = READ_ONCE(attrs->ufile->default_async_file);
310	else
311		async_ev_file = container_of(async_ev_file_uobj,
312				       struct ib_uverbs_async_event_file,
313				       uobj);
314	if (async_ev_file)
315		uverbs_uobject_get(&async_ev_file->uobj);
316	return async_ev_file;
317}
318
319void copy_port_attr_to_resp(struct ib_port_attr *attr,
320			    struct ib_uverbs_query_port_resp *resp,
321			    struct ib_device *ib_dev, u8 port_num);
322#endif /* UVERBS_H */
v4.10.11
  1/*
  2 * Copyright (c) 2005 Topspin Communications.  All rights reserved.
  3 * Copyright (c) 2005, 2006 Cisco Systems.  All rights reserved.
  4 * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  5 * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
  6 * Copyright (c) 2005 PathScale, Inc. All rights reserved.
  7 *
  8 * This software is available to you under a choice of one of two
  9 * licenses.  You may choose to be licensed under the terms of the GNU
 10 * General Public License (GPL) Version 2, available from the file
 11 * COPYING in the main directory of this source tree, or the
 12 * OpenIB.org BSD license below:
 13 *
 14 *     Redistribution and use in source and binary forms, with or
 15 *     without modification, are permitted provided that the following
 16 *     conditions are met:
 17 *
 18 *      - Redistributions of source code must retain the above
 19 *        copyright notice, this list of conditions and the following
 20 *        disclaimer.
 21 *
 22 *      - Redistributions in binary form must reproduce the above
 23 *        copyright notice, this list of conditions and the following
 24 *        disclaimer in the documentation and/or other materials
 25 *        provided with the distribution.
 26 *
 27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 28 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 29 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 30 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 31 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 32 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 33 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 34 * SOFTWARE.
 35 */
 36
 37#ifndef UVERBS_H
 38#define UVERBS_H
 39
 40#include <linux/kref.h>
 41#include <linux/idr.h>
 42#include <linux/mutex.h>
 43#include <linux/completion.h>
 44#include <linux/cdev.h>
 45
 46#include <rdma/ib_verbs.h>
 47#include <rdma/ib_umem.h>
 48#include <rdma/ib_user_verbs.h>
 
 49
 50#define INIT_UDATA(udata, ibuf, obuf, ilen, olen)			\
 51	do {								\
 52		(udata)->inbuf  = (const void __user *) (ibuf);		\
 53		(udata)->outbuf = (void __user *) (obuf);		\
 54		(udata)->inlen  = (ilen);				\
 55		(udata)->outlen = (olen);				\
 56	} while (0)
 57
 58#define INIT_UDATA_BUF_OR_NULL(udata, ibuf, obuf, ilen, olen)			\
 59	do {									\
 60		(udata)->inbuf  = (ilen) ? (const void __user *) (ibuf) : NULL;	\
 61		(udata)->outbuf = (olen) ? (void __user *) (obuf) : NULL;	\
 62		(udata)->inlen  = (ilen);					\
 63		(udata)->outlen = (olen);					\
 64	} while (0)
 
 
 
 
 
 
 
 
 
 
 65
 66/*
 67 * Our lifetime rules for these structs are the following:
 68 *
 69 * struct ib_uverbs_device: One reference is held by the module and
 70 * released in ib_uverbs_remove_one().  Another reference is taken by
 71 * ib_uverbs_open() each time the character special file is opened,
 72 * and released in ib_uverbs_release_file() when the file is released.
 73 *
 74 * struct ib_uverbs_file: One reference is held by the VFS and
 75 * released when the file is closed.  Another reference is taken when
 76 * an asynchronous event queue file is created and released when the
 77 * event file is closed.
 78 *
 79 * struct ib_uverbs_event_file: One reference is held by the VFS and
 80 * released when the file is closed.  For asynchronous event files,
 81 * another reference is held by the corresponding main context file
 82 * and released when that file is closed.  For completion event files,
 83 * a reference is taken when a CQ is created that uses the file, and
 84 * released when the CQ is destroyed.
 
 85 */
 86
 87struct ib_uverbs_device {
 88	atomic_t				refcount;
 89	int					num_comp_vectors;
 90	struct completion			comp;
 91	struct device			       *dev;
 
 
 92	struct ib_device	__rcu	       *ib_dev;
 93	int					devnum;
 94	struct cdev			        cdev;
 95	struct rb_root				xrcd_tree;
 96	struct mutex				xrcd_tree_mutex;
 97	struct kobject				kobj;
 98	struct srcu_struct			disassociate_srcu;
 99	struct mutex				lists_mutex; /* protect lists */
100	struct list_head			uverbs_file_list;
101	struct list_head			uverbs_events_file_list;
102};
103
104struct ib_uverbs_event_file {
105	struct kref				ref;
106	int					is_async;
107	struct ib_uverbs_file		       *uverbs_file;
108	spinlock_t				lock;
109	int					is_closed;
110	wait_queue_head_t			poll_wait;
111	struct fasync_struct		       *async_queue;
112	struct list_head			event_list;
113	struct list_head			list;
 
 
 
 
 
 
 
 
 
 
114};
115
116struct ib_uverbs_file {
117	struct kref				ref;
118	struct mutex				mutex;
119	struct mutex                            cleanup_mutex; /* protect cleanup */
120	struct ib_uverbs_device		       *device;
 
 
 
 
 
121	struct ib_ucontext		       *ucontext;
122	struct ib_event_handler			event_handler;
123	struct ib_uverbs_event_file	       *async_file;
124	struct list_head			list;
125	int					is_closed;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126};
127
128struct ib_uverbs_event {
129	union {
130		struct ib_uverbs_async_event_desc	async;
131		struct ib_uverbs_comp_event_desc	comp;
132	}					desc;
133	struct list_head			list;
134	struct list_head			obj_list;
135	u32				       *counter;
136};
137
138struct ib_uverbs_mcast_entry {
139	struct list_head	list;
140	union ib_gid 		gid;
141	u16 			lid;
142};
143
144struct ib_uevent_object {
145	struct ib_uobject	uobject;
 
 
146	struct list_head	event_list;
147	u32			events_reported;
148};
149
150struct ib_uxrcd_object {
151	struct ib_uobject	uobject;
152	atomic_t		refcnt;
153};
154
155struct ib_usrq_object {
156	struct ib_uevent_object	uevent;
157	struct ib_uxrcd_object *uxrcd;
158};
159
160struct ib_uqp_object {
161	struct ib_uevent_object	uevent;
 
 
162	struct list_head 	mcast_list;
163	struct ib_uxrcd_object *uxrcd;
164};
165
166struct ib_uwq_object {
167	struct ib_uevent_object	uevent;
168};
169
170struct ib_ucq_object {
171	struct ib_uobject	uobject;
172	struct ib_uverbs_file  *uverbs_file;
173	struct list_head	comp_list;
174	struct list_head	async_list;
175	u32			comp_events_reported;
176	u32			async_events_reported;
177};
178
179extern spinlock_t ib_uverbs_idr_lock;
180extern struct idr ib_uverbs_pd_idr;
181extern struct idr ib_uverbs_mr_idr;
182extern struct idr ib_uverbs_mw_idr;
183extern struct idr ib_uverbs_ah_idr;
184extern struct idr ib_uverbs_cq_idr;
185extern struct idr ib_uverbs_qp_idr;
186extern struct idr ib_uverbs_srq_idr;
187extern struct idr ib_uverbs_xrcd_idr;
188extern struct idr ib_uverbs_rule_idr;
189extern struct idr ib_uverbs_wq_idr;
190extern struct idr ib_uverbs_rwq_ind_tbl_idr;
191
192void idr_remove_uobj(struct idr *idp, struct ib_uobject *uobj);
193
194struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
195					struct ib_device *ib_dev,
196					int is_async);
197void ib_uverbs_free_async_event_file(struct ib_uverbs_file *uverbs_file);
198struct ib_uverbs_event_file *ib_uverbs_lookup_comp_file(int fd);
199
200void ib_uverbs_release_ucq(struct ib_uverbs_file *file,
201			   struct ib_uverbs_event_file *ev_file,
 
 
202			   struct ib_ucq_object *uobj);
203void ib_uverbs_release_uevent(struct ib_uverbs_file *file,
204			      struct ib_uevent_object *uobj);
 
 
 
205
206void ib_uverbs_comp_handler(struct ib_cq *cq, void *cq_context);
207void ib_uverbs_cq_event_handler(struct ib_event *event, void *context_ptr);
208void ib_uverbs_qp_event_handler(struct ib_event *event, void *context_ptr);
209void ib_uverbs_wq_event_handler(struct ib_event *event, void *context_ptr);
210void ib_uverbs_srq_event_handler(struct ib_event *event, void *context_ptr);
211void ib_uverbs_event_handler(struct ib_event_handler *handler,
212			     struct ib_event *event);
213void ib_uverbs_dealloc_xrcd(struct ib_uverbs_device *dev, struct ib_xrcd *xrcd);
214
215int uverbs_dealloc_mw(struct ib_mw *mw);
 
 
 
 
216
217struct ib_uverbs_flow_spec {
218	union {
219		union {
220			struct ib_uverbs_flow_spec_hdr hdr;
221			struct {
222				__u32 type;
223				__u16 size;
224				__u16 reserved;
225			};
226		};
227		struct ib_uverbs_flow_spec_eth     eth;
228		struct ib_uverbs_flow_spec_ipv4    ipv4;
 
229		struct ib_uverbs_flow_spec_tcp_udp tcp_udp;
230		struct ib_uverbs_flow_spec_ipv6    ipv6;
 
 
 
 
231	};
232};
233
234#define IB_UVERBS_DECLARE_CMD(name)					\
235	ssize_t ib_uverbs_##name(struct ib_uverbs_file *file,		\
236				 struct ib_device *ib_dev,              \
237				 const char __user *buf, int in_len,	\
238				 int out_len)
239
240IB_UVERBS_DECLARE_CMD(get_context);
241IB_UVERBS_DECLARE_CMD(query_device);
242IB_UVERBS_DECLARE_CMD(query_port);
243IB_UVERBS_DECLARE_CMD(alloc_pd);
244IB_UVERBS_DECLARE_CMD(dealloc_pd);
245IB_UVERBS_DECLARE_CMD(reg_mr);
246IB_UVERBS_DECLARE_CMD(rereg_mr);
247IB_UVERBS_DECLARE_CMD(dereg_mr);
248IB_UVERBS_DECLARE_CMD(alloc_mw);
249IB_UVERBS_DECLARE_CMD(dealloc_mw);
250IB_UVERBS_DECLARE_CMD(create_comp_channel);
251IB_UVERBS_DECLARE_CMD(create_cq);
252IB_UVERBS_DECLARE_CMD(resize_cq);
253IB_UVERBS_DECLARE_CMD(poll_cq);
254IB_UVERBS_DECLARE_CMD(req_notify_cq);
255IB_UVERBS_DECLARE_CMD(destroy_cq);
256IB_UVERBS_DECLARE_CMD(create_qp);
257IB_UVERBS_DECLARE_CMD(open_qp);
258IB_UVERBS_DECLARE_CMD(query_qp);
259IB_UVERBS_DECLARE_CMD(modify_qp);
260IB_UVERBS_DECLARE_CMD(destroy_qp);
261IB_UVERBS_DECLARE_CMD(post_send);
262IB_UVERBS_DECLARE_CMD(post_recv);
263IB_UVERBS_DECLARE_CMD(post_srq_recv);
264IB_UVERBS_DECLARE_CMD(create_ah);
265IB_UVERBS_DECLARE_CMD(destroy_ah);
266IB_UVERBS_DECLARE_CMD(attach_mcast);
267IB_UVERBS_DECLARE_CMD(detach_mcast);
268IB_UVERBS_DECLARE_CMD(create_srq);
269IB_UVERBS_DECLARE_CMD(modify_srq);
270IB_UVERBS_DECLARE_CMD(query_srq);
271IB_UVERBS_DECLARE_CMD(destroy_srq);
272IB_UVERBS_DECLARE_CMD(create_xsrq);
273IB_UVERBS_DECLARE_CMD(open_xrcd);
274IB_UVERBS_DECLARE_CMD(close_xrcd);
275
276#define IB_UVERBS_DECLARE_EX_CMD(name)				\
277	int ib_uverbs_ex_##name(struct ib_uverbs_file *file,	\
278				struct ib_device *ib_dev,		\
279				struct ib_udata *ucore,		\
280				struct ib_udata *uhw)
281
282IB_UVERBS_DECLARE_EX_CMD(create_flow);
283IB_UVERBS_DECLARE_EX_CMD(destroy_flow);
284IB_UVERBS_DECLARE_EX_CMD(query_device);
285IB_UVERBS_DECLARE_EX_CMD(create_cq);
286IB_UVERBS_DECLARE_EX_CMD(create_qp);
287IB_UVERBS_DECLARE_EX_CMD(create_wq);
288IB_UVERBS_DECLARE_EX_CMD(modify_wq);
289IB_UVERBS_DECLARE_EX_CMD(destroy_wq);
290IB_UVERBS_DECLARE_EX_CMD(create_rwq_ind_table);
291IB_UVERBS_DECLARE_EX_CMD(destroy_rwq_ind_table);
292IB_UVERBS_DECLARE_EX_CMD(modify_qp);
293
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294#endif /* UVERBS_H */