]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ofed/libibverbs/fixes/verbs_man_page.patch
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ofed / libibverbs / fixes / verbs_man_page.patch
1 commit ebc306b0ad2a8a873a195b26ebafe704da001981
2 Author: Dotan Barak <dotanb@dev.mellanox.co.il>
3 Date:   Sun Feb 3 17:58:53 2008 +0200
4
5     libibverbs: Added the man page verbs.7
6     
7     Added the man page verbs.7 which is an introduction to libibverbs man pages.
8     
9     Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
10     Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
11
12 Index: libibverbs/Makefile.am
13 ===================================================================
14 --- libibverbs.orig/Makefile.am 2010-06-07 18:38:19.088451000 +0300
15 +++ libibverbs/Makefile.am      2010-06-08 10:58:10.061113000 +0300
16 @@ -53,7 +53,7 @@ man_MANS = man/ibv_asyncwatch.1 man/ibv_
17      man/ibv_post_srq_recv.3 man/ibv_query_device.3 man/ibv_query_gid.3 \
18      man/ibv_query_pkey.3 man/ibv_query_port.3 man/ibv_query_qp.3       \
19      man/ibv_query_srq.3 man/ibv_rate_to_mult.3 man/ibv_reg_mr.3                \
20 -    man/ibv_req_notify_cq.3 man/ibv_resize_cq.3
21 +    man/ibv_req_notify_cq.3 man/ibv_resize_cq.3 man/verbs.7
22  
23  DEBIAN = debian/changelog debian/compat debian/control debian/copyright \
24      debian/ibverbs-utils.install debian/libibverbs1.install \
25 Index: libibverbs/libibverbs.spec.in
26 ===================================================================
27 --- libibverbs.orig/libibverbs.spec.in  2010-06-08 10:47:13.106792000 +0300
28 +++ libibverbs/libibverbs.spec.in       2010-06-08 10:58:10.160119000 +0300
29 @@ -74,6 +74,7 @@ rm -rf $RPM_BUILD_ROOT
30  %{_libdir}/lib*.so
31  %{_includedir}/*
32  %{_mandir}/man3/*
33 +%{_mandir}/man7/*
34  
35  %files devel-static
36  %defattr(-,root,root,-)
37 Index: libibverbs/man/verbs.7
38 ===================================================================
39 --- /dev/null   1970-01-01 00:00:00.000000000 +0000
40 +++ libibverbs/man/verbs.7      2010-06-08 10:58:10.360115000 +0300
41 @@ -0,0 +1,201 @@
42 +.\" -*- nroff -*-
43 +.\"
44 +.TH VERBS 7 2008-01-17 libibverbs "Libibverbs Programmer's Manual"
45 +.SH "NAME"
46 +verbs \- Infiniband verbs library
47 +.SH "SYNOPSIS"
48 +.nf
49 +.B #include <infiniband/verbs.h>
50 +.fi
51 +.SH "DESCRIPTION"
52 +This library is an implementation of the verbs according to the Infiniband specification volume 1.2. It handles the control path of creating, modifying, querying and destroying resources such as Protection Domains (PD), Completion Queues (CQ), Queue-Pairs (QP), Shared Receive Queues (SRQ), Address Handles (AH), Memory Regions (MR). It also handles sending and receiving data posted to QPs and SRQs, getting completions from CQs using polling and completions events.
53 +
54 +The control path is implemented through system calls to the uverbs kernel module which further calls the low level HW driver. The data path is implemented through calls made to low level HW library which in most cases interacts directly with the HW providing kernel and network stack bypass (saving context/mode switches) along with zero copy and an asynchronous I/O model.
55 +
56 +
57 +Typically, under network and RDMA programming, there are operations which involve interaction with remote peers (such as address resolution and connection establishment) and remote entities (such as route resolution and joining a multicast group under IB), where a resource managed through IB verbs such as QP or AH would be eventually created or effected from this interaction. In such cases, applications whose addressing semantics is based on IP can use librdmacm (see rdma_cm(7)) which works in conjunction with libibverbs.
58 +
59 +This library is thread safe library and verbs can be called from every thread in the process (the same resource can even be handled from different threads, for example: ibv_poll_cq can be called from more than one thread).
60 +
61 +However, it is up to the user to stop working with a resource after it was destroyed (by the same thread or by any other thread), this may result a segmentation fault.
62 +
63 +If fork (or any other system call that perform fork directly or indirectly) is being used, please see ibv_fork_init(3).
64 +
65 +.LP
66 +The following shall be declared as functions and may also be defined
67 +as macros. Function prototypes shall be provided.
68 +.RS
69 +.nf
70 +
71 +\fB
72 +.B Library functions
73 +
74 +int ibv_fork_init(void);
75 +
76 +.B Device functions
77 +
78 +struct ibv_device **ibv_get_device_list(int *num_devices);
79 +void ibv_free_device_list(struct ibv_device **list);
80 +const char *ibv_get_device_name(struct ibv_device *device);
81 +uint64_t ibv_get_device_guid(struct ibv_device *device);
82 +
83 +.B Context functions
84 +
85 +struct ibv_context *ibv_open_device(struct ibv_device *device);
86 +int ibv_close_device(struct ibv_context *context);
87 +
88 +.B Queries
89 +
90 +int ibv_query_device(struct ibv_context *context,
91 +                     struct ibv_device_attr *device_attr);
92 +int ibv_query_port(struct ibv_context *context, uint8_t port_num,
93 +                   struct ibv_port_attr *port_attr);
94 +int ibv_query_pkey(struct ibv_context *context, uint8_t port_num,
95 +                   int index, uint16_t *pkey);
96 +int ibv_query_gid(struct ibv_context *context, uint8_t port_num,
97 +                  int index, union ibv_gid *gid);
98 +
99 +.B Asynchronous events
100 +
101 +int ibv_get_async_event(struct ibv_context *context,
102 +                        struct ibv_async_event *event);
103 +void ibv_ack_async_event(struct ibv_async_event *event);
104 +
105 +.B Protection Domains
106 +
107 +struct ibv_pd *ibv_alloc_pd(struct ibv_context *context);
108 +int ibv_dealloc_pd(struct ibv_pd *pd);
109 +
110 +.B Memory Regions
111 +
112 +struct ibv_mr *ibv_reg_mr(struct ibv_pd *pd, void *addr,
113 +                          size_t length, enum ibv_access_flags access);
114 +int ibv_dereg_mr(struct ibv_mr *mr);
115 +
116 +.B Address Handles
117 +
118 +struct ibv_ah *ibv_create_ah(struct ibv_pd *pd, struct ibv_ah_attr *attr);
119 +int ibv_init_ah_from_wc(struct ibv_context *context, uint8_t port_num,
120 +                        struct ibv_wc *wc, struct ibv_grh *grh,
121 +                        struct ibv_ah_attr *ah_attr);
122 +struct ibv_ah *ibv_create_ah_from_wc(struct ibv_pd *pd, struct ibv_wc *wc,
123 +                                     struct ibv_grh *grh, uint8_t port_num);
124 +int ibv_destroy_ah(struct ibv_ah *ah);
125 +
126 +.B Completion event channels
127 +
128 +struct ibv_comp_channel *ibv_create_comp_channel(struct ibv_context *context);
129 +int ibv_destroy_comp_channel(struct ibv_comp_channel *channel);
130 +
131 +.B Completion Queues Control
132 +
133 +struct ibv_cq *ibv_create_cq(struct ibv_context *context, int cqe,
134 +                             void *cq_context,
135 +                             struct ibv_comp_channel *channel,
136 +                             int comp_vector);
137 +int ibv_destroy_cq(struct ibv_cq *cq);
138 +int ibv_resize_cq(struct ibv_cq *cq, int cqe);
139 +
140 +.B Reading Completions from CQ
141 +
142 +int ibv_poll_cq(struct ibv_cq *cq, int num_entries, struct ibv_wc *wc);
143 +
144 +.B Requesting / Managing CQ events
145 +
146 +int ibv_req_notify_cq(struct ibv_cq *cq, int solicited_only);
147 +int ibv_get_cq_event(struct ibv_comp_channel *channel,
148 +                     struct ibv_cq **cq, void **cq_context);
149 +void ibv_ack_cq_events(struct ibv_cq *cq, unsigned int nevents);
150 +
151 +.B Shared Receive Queue control
152 +
153 +struct ibv_srq *ibv_create_srq(struct ibv_pd *pd,
154 +                               struct ibv_srq_init_attr *srq_init_attr);
155 +int ibv_destroy_srq(struct ibv_srq *srq);
156 +int ibv_modify_srq(struct ibv_srq *srq,
157 +                   struct ibv_srq_attr *srq_attr,
158 +                   enum ibv_srq_attr_mask srq_attr_mask);
159 +int ibv_query_srq(struct ibv_srq *srq, struct ibv_srq_attr *srq_attr);
160 +
161 +.B Queue Pair control
162 +
163 +struct ibv_qp *ibv_create_qp(struct ibv_pd *pd,
164 +                             struct ibv_qp_init_attr *qp_init_attr);
165 +int ibv_destroy_qp(struct ibv_qp *qp);
166 +int ibv_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
167 +                  enum ibv_qp_attr_mask attr_mask);
168 +int ibv_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
169 +                 enum ibv_qp_attr_mask attr_mask,
170 +                 struct ibv_qp_init_attr *init_attr);
171 +
172 +.B posting Work Requests to QPs/SRQs
173 +int ibv_post_send(struct ibv_qp *qp, struct ibv_send_wr *wr,
174 +                  struct ibv_send_wr **bad_wr);
175 +int ibv_post_recv(struct ibv_qp *qp, struct ibv_recv_wr *wr,
176 +                  struct ibv_recv_wr **bad_wr);
177 +int ibv_post_srq_recv(struct ibv_srq *srq,
178 +                      struct ibv_recv_wr *recv_wr,
179 +                      struct ibv_recv_wr **bad_recv_wr);
180 +
181 +.B Multicast group
182 +
183 +int ibv_attach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid);
184 +int ibv_detach_mcast(struct ibv_qp *qp, union ibv_gid *gid, uint16_t lid);
185 +
186 +.B General functions
187 +
188 +int ibv_rate_to_mult(enum ibv_rate rate);
189 +enum ibv_rate mult_to_ibv_rate(int mult);
190 +\fP
191 +.SH "SEE ALSO"
192 +.LP
193 +\fIibv_fork_init\fP(),
194 +\fIibv_get_device_list\fP(),
195 +\fIibv_free_device_list\fP(),
196 +\fIibv_get_device_name\fP(),
197 +\fIibv_get_device_guid\fP(),
198 +\fIibv_open_device\fP(),
199 +\fIibv_close_device\fP(),
200 +\fIibv_query_device\fP(),
201 +\fIibv_query_port\fP(),
202 +\fIibv_query_pkey\fP(),
203 +\fIibv_query_gid\fP(),
204 +\fIibv_get_async_event\fP(),
205 +\fIibv_ack_async_event\fP(),
206 +\fIibv_alloc_pd\fP(),
207 +\fIibv_dealloc_pd\fP(),
208 +\fIibv_reg_mr\fP(),
209 +\fIibv_dereg_mr\fP(),
210 +\fIibv_create_ah\fP(),
211 +\fIibv_init_ah_from_wc\fP(),
212 +\fIibv_create_ah_from_wc\fP(),
213 +\fIibv_destroy_ah\fP(),
214 +\fIibv_create_comp_channel\fP(),
215 +\fIibv_destroy_comp_channel\fP(),
216 +\fIibv_create_cq\fP(),
217 +\fIibv_destroy_cq\fP(),
218 +\fIibv_resize_cq\fP(),
219 +\fIibv_poll_cq\fP(),
220 +\fIibv_req_notify_cq\fP(),
221 +\fIibv_get_cq_event\fP(),
222 +\fIibv_ack_cq_events\fP(),
223 +\fIibv_create_srq\fP(),
224 +\fIibv_destroy_srq\fP(),
225 +\fIibv_modify_srq\fP(),
226 +\fIibv_query_srq\fP(),
227 +\fIibv_post_srq_recv\fP(),
228 +\fIibv_create_qp\fP(),
229 +\fIibv_destroy_qp\fP(),
230 +\fIibv_modify_qp\fP(),
231 +\fIibv_query_qp\fP(),
232 +\fIibv_post_send\fP(),
233 +\fIibv_post_recv\fP(),
234 +\fIibv_attach_mcast\fP(),
235 +\fIibv_detach_mcast\fP(),
236 +\fIibv_rate_to_mult\fP(),
237 +\fImult_to_ibv_rate\fP()
238 +.SH "AUTHORS"
239 +.TP
240 +Dotan Barak <dotanb@mellanox.co.il>
241 +.TP
242 +Or Gerlitz <ogerlitz@voltaire.com>