2 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35 #endif /* HAVE_CONFIG_H */
46 struct ibv_context_1_0 *context;
49 struct ibv_pd *real_pd;
53 struct ibv_context_1_0 *context;
54 struct ibv_pd_1_0 *pd;
59 struct ibv_mr *real_mr;
63 struct ibv_context_1_0 *context;
65 struct ibv_pd_1_0 *pd;
68 pthread_mutex_t mutex;
70 uint32_t events_completed;
72 struct ibv_srq *real_srq;
75 struct ibv_qp_init_attr_1_0 {
77 struct ibv_cq_1_0 *send_cq;
78 struct ibv_cq_1_0 *recv_cq;
79 struct ibv_srq_1_0 *srq;
80 struct ibv_qp_cap cap;
81 enum ibv_qp_type qp_type;
85 struct ibv_send_wr_1_0 {
86 struct ibv_send_wr_1_0 *next;
88 struct ibv_sge *sg_list;
90 enum ibv_wr_opcode opcode;
92 uint32_t imm_data; /* in network byte order */
100 uint64_t compare_add;
105 struct ibv_ah_1_0 *ah;
107 uint32_t remote_qkey;
112 struct ibv_recv_wr_1_0 {
113 struct ibv_recv_wr_1_0 *next;
115 struct ibv_sge *sg_list;
120 struct ibv_context_1_0 *context;
122 struct ibv_pd_1_0 *pd;
123 struct ibv_cq_1_0 *send_cq;
124 struct ibv_cq_1_0 *recv_cq;
125 struct ibv_srq_1_0 *srq;
128 enum ibv_qp_state state;
129 enum ibv_qp_type qp_type;
131 pthread_mutex_t mutex;
133 uint32_t events_completed;
135 struct ibv_qp *real_qp;
139 struct ibv_context_1_0 *context;
144 pthread_mutex_t mutex;
146 uint32_t comp_events_completed;
147 uint32_t async_events_completed;
149 struct ibv_cq *real_cq;
153 struct ibv_context_1_0 *context;
154 struct ibv_pd_1_0 *pd;
157 struct ibv_ah *real_ah;
160 struct ibv_device_1_0 {
161 void *obsolete_sysfs_dev;
162 void *obsolete_sysfs_ibdev;
163 struct ibv_device *real_device; /* was obsolete driver member */
164 struct ibv_device_ops ops;
167 struct ibv_context_ops_1_0 {
168 int (*query_device)(struct ibv_context *context,
169 struct ibv_device_attr *device_attr);
170 int (*query_port)(struct ibv_context *context, uint8_t port_num,
171 struct ibv_port_attr *port_attr);
172 struct ibv_pd * (*alloc_pd)(struct ibv_context *context);
173 int (*dealloc_pd)(struct ibv_pd *pd);
174 struct ibv_mr * (*reg_mr)(struct ibv_pd *pd, void *addr, size_t length,
176 int (*dereg_mr)(struct ibv_mr *mr);
177 struct ibv_cq * (*create_cq)(struct ibv_context *context, int cqe,
178 struct ibv_comp_channel *channel,
180 int (*poll_cq)(struct ibv_cq_1_0 *cq, int num_entries,
182 int (*req_notify_cq)(struct ibv_cq_1_0 *cq,
184 void (*cq_event)(struct ibv_cq *cq);
185 int (*resize_cq)(struct ibv_cq *cq, int cqe);
186 int (*destroy_cq)(struct ibv_cq *cq);
187 struct ibv_srq * (*create_srq)(struct ibv_pd *pd,
188 struct ibv_srq_init_attr *srq_init_attr);
189 int (*modify_srq)(struct ibv_srq *srq,
190 struct ibv_srq_attr *srq_attr,
192 int (*query_srq)(struct ibv_srq *srq,
193 struct ibv_srq_attr *srq_attr);
194 int (*destroy_srq)(struct ibv_srq *srq);
195 int (*post_srq_recv)(struct ibv_srq_1_0 *srq,
196 struct ibv_recv_wr_1_0 *recv_wr,
197 struct ibv_recv_wr_1_0 **bad_recv_wr);
198 struct ibv_qp * (*create_qp)(struct ibv_pd *pd, struct ibv_qp_init_attr *attr);
199 int (*query_qp)(struct ibv_qp *qp, struct ibv_qp_attr *attr,
201 struct ibv_qp_init_attr *init_attr);
202 int (*modify_qp)(struct ibv_qp *qp, struct ibv_qp_attr *attr,
204 int (*destroy_qp)(struct ibv_qp *qp);
205 int (*post_send)(struct ibv_qp_1_0 *qp,
206 struct ibv_send_wr_1_0 *wr,
207 struct ibv_send_wr_1_0 **bad_wr);
208 int (*post_recv)(struct ibv_qp_1_0 *qp,
209 struct ibv_recv_wr_1_0 *wr,
210 struct ibv_recv_wr_1_0 **bad_wr);
211 struct ibv_ah * (*create_ah)(struct ibv_pd *pd, struct ibv_ah_attr *attr);
212 int (*destroy_ah)(struct ibv_ah *ah);
213 int (*attach_mcast)(struct ibv_qp *qp, union ibv_gid *gid,
215 int (*detach_mcast)(struct ibv_qp *qp, union ibv_gid *gid,
219 struct ibv_context_1_0 {
220 struct ibv_device_1_0 *device;
221 struct ibv_context_ops_1_0 ops;
224 int num_comp_vectors;
226 struct ibv_context *real_context; /* was abi_compat member */
229 struct ibv_device_1_0 **__ibv_get_device_list_1_0(int *num)
231 struct ibv_device **real_list;
232 struct ibv_device_1_0 **l;
235 real_list = ibv_get_device_list(&n);
239 l = calloc(n + 2, sizeof (struct ibv_device_1_0 *));
243 l[0] = (void *) real_list;
245 for (i = 0; i < n; ++i) {
246 l[i + 1] = calloc(1, sizeof (struct ibv_device_1_0));
249 l[i + 1]->real_device = real_list[i];
258 for (i = 1; i <= n; ++i)
261 ibv_free_device_list(real_list);
264 symver(__ibv_get_device_list_1_0, ibv_get_device_list, IBVERBS_1.0);
266 void __ibv_free_device_list_1_0(struct ibv_device_1_0 **list)
268 struct ibv_device_1_0 **l = list;
275 ibv_free_device_list((void *) list[-1]);
278 symver(__ibv_free_device_list_1_0, ibv_free_device_list, IBVERBS_1.0);
280 const char *__ibv_get_device_name_1_0(struct ibv_device_1_0 *device)
282 return ibv_get_device_name(device->real_device);
284 symver(__ibv_get_device_name_1_0, ibv_get_device_name, IBVERBS_1.0);
286 uint64_t __ibv_get_device_guid_1_0(struct ibv_device_1_0 *device)
288 return ibv_get_device_guid(device->real_device);
290 symver(__ibv_get_device_guid_1_0, ibv_get_device_guid, IBVERBS_1.0);
292 static int poll_cq_wrapper_1_0(struct ibv_cq_1_0 *cq, int num_entries,
295 return cq->context->real_context->ops.poll_cq(cq->real_cq, num_entries, wc);
298 static int req_notify_cq_wrapper_1_0(struct ibv_cq_1_0 *cq, int sol_only)
300 return cq->context->real_context->ops.req_notify_cq(cq->real_cq, sol_only);
303 static int post_srq_recv_wrapper_1_0(struct ibv_srq_1_0 *srq, struct ibv_recv_wr_1_0 *wr,
304 struct ibv_recv_wr_1_0 **bad_wr)
306 struct ibv_recv_wr_1_0 *w;
307 struct ibv_recv_wr *real_wr, *head_wr = NULL, *tail_wr = NULL, *real_bad_wr;
310 for (w = wr; w; w = w->next) {
311 real_wr = alloca(sizeof *real_wr);
312 real_wr->wr_id = w->wr_id;
313 real_wr->sg_list = w->sg_list;
314 real_wr->num_sge = w->num_sge;
315 real_wr->next = NULL;
317 tail_wr->next = real_wr;
324 ret = srq->context->real_context->ops.post_srq_recv(srq->real_srq, head_wr,
328 for (real_wr = head_wr, w = wr;
330 real_wr = real_wr->next, w = w->next)
331 if (real_wr == real_bad_wr) {
340 static int post_send_wrapper_1_0(struct ibv_qp_1_0 *qp, struct ibv_send_wr_1_0 *wr,
341 struct ibv_send_wr_1_0 **bad_wr)
343 struct ibv_send_wr_1_0 *w;
344 struct ibv_send_wr *real_wr, *head_wr = NULL, *tail_wr = NULL, *real_bad_wr;
345 int is_ud = qp->qp_type == IBV_QPT_UD;
348 for (w = wr; w; w = w->next) {
349 real_wr = alloca(sizeof *real_wr);
350 real_wr->wr_id = w->wr_id;
351 real_wr->next = NULL;
353 memcpy(&real_wr->sg_list, &w->sg_list,
354 sizeof *w - offsetof(struct ibv_send_wr, sg_list));
357 real_wr->wr.ud.ah = w->wr.ud.ah->real_ah;
360 tail_wr->next = real_wr;
367 ret = qp->context->real_context->ops.post_send(qp->real_qp, head_wr,
371 for (real_wr = head_wr, w = wr;
373 real_wr = real_wr->next, w = w->next)
374 if (real_wr == real_bad_wr) {
383 static int post_recv_wrapper_1_0(struct ibv_qp_1_0 *qp, struct ibv_recv_wr_1_0 *wr,
384 struct ibv_recv_wr_1_0 **bad_wr)
386 struct ibv_recv_wr_1_0 *w;
387 struct ibv_recv_wr *real_wr, *head_wr = NULL, *tail_wr = NULL, *real_bad_wr;
390 for (w = wr; w; w = w->next) {
391 real_wr = alloca(sizeof *real_wr);
392 real_wr->wr_id = w->wr_id;
393 real_wr->sg_list = w->sg_list;
394 real_wr->num_sge = w->num_sge;
395 real_wr->next = NULL;
397 tail_wr->next = real_wr;
404 ret = qp->context->real_context->ops.post_recv(qp->real_qp, head_wr,
408 for (real_wr = head_wr, w = wr;
410 real_wr = real_wr->next, w = w->next)
411 if (real_wr == real_bad_wr) {
420 struct ibv_context_1_0 *__ibv_open_device_1_0(struct ibv_device_1_0 *device)
422 struct ibv_context *real_ctx;
423 struct ibv_context_1_0 *ctx;
425 ctx = malloc(sizeof *ctx);
429 real_ctx = ibv_open_device(device->real_device);
435 ctx->device = device;
436 ctx->real_context = real_ctx;
438 ctx->ops.poll_cq = poll_cq_wrapper_1_0;
439 ctx->ops.req_notify_cq = req_notify_cq_wrapper_1_0;
440 ctx->ops.post_send = post_send_wrapper_1_0;
441 ctx->ops.post_recv = post_recv_wrapper_1_0;
442 ctx->ops.post_srq_recv = post_srq_recv_wrapper_1_0;
446 symver(__ibv_open_device_1_0, ibv_open_device, IBVERBS_1.0);
448 int __ibv_close_device_1_0(struct ibv_context_1_0 *context)
452 ret = ibv_close_device(context->real_context);
459 symver(__ibv_close_device_1_0, ibv_close_device, IBVERBS_1.0);
461 int __ibv_get_async_event_1_0(struct ibv_context_1_0 *context,
462 struct ibv_async_event *event)
466 ret = ibv_get_async_event(context->real_context, event);
470 switch (event->event_type) {
471 case IBV_EVENT_CQ_ERR:
472 event->element.cq = event->element.cq->cq_context;
475 case IBV_EVENT_QP_FATAL:
476 case IBV_EVENT_QP_REQ_ERR:
477 case IBV_EVENT_QP_ACCESS_ERR:
478 case IBV_EVENT_COMM_EST:
479 case IBV_EVENT_SQ_DRAINED:
480 case IBV_EVENT_PATH_MIG:
481 case IBV_EVENT_PATH_MIG_ERR:
482 case IBV_EVENT_QP_LAST_WQE_REACHED:
483 event->element.qp = event->element.qp->qp_context;
486 case IBV_EVENT_SRQ_ERR:
487 case IBV_EVENT_SRQ_LIMIT_REACHED:
488 event->element.srq = event->element.srq->srq_context;
497 symver(__ibv_get_async_event_1_0, ibv_get_async_event, IBVERBS_1.0);
499 void __ibv_ack_async_event_1_0(struct ibv_async_event *event)
501 struct ibv_async_event real_event = *event;
503 switch (event->event_type) {
504 case IBV_EVENT_CQ_ERR:
505 real_event.element.cq =
506 ((struct ibv_cq_1_0 *) event->element.cq)->real_cq;
509 case IBV_EVENT_QP_FATAL:
510 case IBV_EVENT_QP_REQ_ERR:
511 case IBV_EVENT_QP_ACCESS_ERR:
512 case IBV_EVENT_COMM_EST:
513 case IBV_EVENT_SQ_DRAINED:
514 case IBV_EVENT_PATH_MIG:
515 case IBV_EVENT_PATH_MIG_ERR:
516 case IBV_EVENT_QP_LAST_WQE_REACHED:
517 real_event.element.qp =
518 ((struct ibv_qp_1_0 *) event->element.qp)->real_qp;
521 case IBV_EVENT_SRQ_ERR:
522 case IBV_EVENT_SRQ_LIMIT_REACHED:
523 real_event.element.srq =
524 ((struct ibv_srq_1_0 *) event->element.srq)->real_srq;
531 ibv_ack_async_event(&real_event);
533 symver(__ibv_ack_async_event_1_0, ibv_ack_async_event, IBVERBS_1.0);
535 int __ibv_query_device_1_0(struct ibv_context_1_0 *context,
536 struct ibv_device_attr *device_attr)
538 return ibv_query_device(context->real_context, device_attr);
540 symver(__ibv_query_device_1_0, ibv_query_device, IBVERBS_1.0);
542 int __ibv_query_port_1_0(struct ibv_context_1_0 *context, uint8_t port_num,
543 struct ibv_port_attr *port_attr)
545 return ibv_query_port(context->real_context, port_num, port_attr);
547 symver(__ibv_query_port_1_0, ibv_query_port, IBVERBS_1.0);
549 int __ibv_query_gid_1_0(struct ibv_context_1_0 *context, uint8_t port_num,
550 int index, union ibv_gid *gid)
552 return ibv_query_gid(context->real_context, port_num, index, gid);
554 symver(__ibv_query_gid_1_0, ibv_query_gid, IBVERBS_1.0);
556 int __ibv_query_pkey_1_0(struct ibv_context_1_0 *context, uint8_t port_num,
557 int index, uint16_t *pkey)
559 return ibv_query_pkey(context->real_context, port_num, index, pkey);
561 symver(__ibv_query_pkey_1_0, ibv_query_pkey, IBVERBS_1.0);
563 struct ibv_pd_1_0 *__ibv_alloc_pd_1_0(struct ibv_context_1_0 *context)
565 struct ibv_pd *real_pd;
566 struct ibv_pd_1_0 *pd;
568 pd = malloc(sizeof *pd);
572 real_pd = ibv_alloc_pd(context->real_context);
578 pd->context = context;
579 pd->real_pd = real_pd;
583 symver(__ibv_alloc_pd_1_0, ibv_alloc_pd, IBVERBS_1.0);
585 int __ibv_dealloc_pd_1_0(struct ibv_pd_1_0 *pd)
589 ret = ibv_dealloc_pd(pd->real_pd);
596 symver(__ibv_dealloc_pd_1_0, ibv_dealloc_pd, IBVERBS_1.0);
598 struct ibv_mr_1_0 *__ibv_reg_mr_1_0(struct ibv_pd_1_0 *pd, void *addr,
599 size_t length, int access)
601 struct ibv_mr *real_mr;
602 struct ibv_mr_1_0 *mr;
604 mr = malloc(sizeof *mr);
608 real_mr = ibv_reg_mr(pd->real_pd, addr, length, access);
614 mr->context = pd->context;
616 mr->lkey = real_mr->lkey;
617 mr->rkey = real_mr->rkey;
618 mr->real_mr = real_mr;
622 symver(__ibv_reg_mr_1_0, ibv_reg_mr, IBVERBS_1.0);
624 int __ibv_dereg_mr_1_0(struct ibv_mr_1_0 *mr)
628 ret = ibv_dereg_mr(mr->real_mr);
635 symver(__ibv_dereg_mr_1_0, ibv_dereg_mr, IBVERBS_1.0);
637 struct ibv_cq_1_0 *__ibv_create_cq_1_0(struct ibv_context_1_0 *context, int cqe,
639 struct ibv_comp_channel *channel,
642 struct ibv_cq *real_cq;
643 struct ibv_cq_1_0 *cq;
645 cq = malloc(sizeof *cq);
649 real_cq = ibv_create_cq(context->real_context, cqe, cq_context,
650 channel, comp_vector);
656 cq->context = context;
657 cq->cq_context = cq_context;
659 cq->real_cq = real_cq;
661 real_cq->cq_context = cq;
665 symver(__ibv_create_cq_1_0, ibv_create_cq, IBVERBS_1.0);
667 int __ibv_resize_cq_1_0(struct ibv_cq_1_0 *cq, int cqe)
669 return ibv_resize_cq(cq->real_cq, cqe);
671 symver(__ibv_resize_cq_1_0, ibv_resize_cq, IBVERBS_1.0);
673 int __ibv_destroy_cq_1_0(struct ibv_cq_1_0 *cq)
677 ret = ibv_destroy_cq(cq->real_cq);
684 symver(__ibv_destroy_cq_1_0, ibv_destroy_cq, IBVERBS_1.0);
686 int __ibv_get_cq_event_1_0(struct ibv_comp_channel *channel,
687 struct ibv_cq_1_0 **cq, void **cq_context)
689 struct ibv_cq *real_cq;
693 ret = ibv_get_cq_event(channel, &real_cq, &cq_ptr);
698 *cq_context = (*cq)->cq_context;
702 symver(__ibv_get_cq_event_1_0, ibv_get_cq_event, IBVERBS_1.0);
704 void __ibv_ack_cq_events_1_0(struct ibv_cq_1_0 *cq, unsigned int nevents)
706 ibv_ack_cq_events(cq->real_cq, nevents);
708 symver(__ibv_ack_cq_events_1_0, ibv_ack_cq_events, IBVERBS_1.0);
710 struct ibv_srq_1_0 *__ibv_create_srq_1_0(struct ibv_pd_1_0 *pd,
711 struct ibv_srq_init_attr *srq_init_attr)
713 struct ibv_srq *real_srq;
714 struct ibv_srq_1_0 *srq;
716 srq = malloc(sizeof *srq);
720 real_srq = ibv_create_srq(pd->real_pd, srq_init_attr);
726 srq->context = pd->context;
727 srq->srq_context = srq_init_attr->srq_context;
729 srq->real_srq = real_srq;
731 real_srq->srq_context = srq;
735 symver(__ibv_create_srq_1_0, ibv_create_srq, IBVERBS_1.0);
737 int __ibv_modify_srq_1_0(struct ibv_srq_1_0 *srq,
738 struct ibv_srq_attr *srq_attr,
741 return ibv_modify_srq(srq->real_srq, srq_attr, srq_attr_mask);
743 symver(__ibv_modify_srq_1_0, ibv_modify_srq, IBVERBS_1.0);
745 int __ibv_query_srq_1_0(struct ibv_srq_1_0 *srq, struct ibv_srq_attr *srq_attr)
747 return ibv_query_srq(srq->real_srq, srq_attr);
749 symver(__ibv_query_srq_1_0, ibv_query_srq, IBVERBS_1.0);
751 int __ibv_destroy_srq_1_0(struct ibv_srq_1_0 *srq)
755 ret = ibv_destroy_srq(srq->real_srq);
762 symver(__ibv_destroy_srq_1_0, ibv_destroy_srq, IBVERBS_1.0);
764 struct ibv_qp_1_0 *__ibv_create_qp_1_0(struct ibv_pd_1_0 *pd,
765 struct ibv_qp_init_attr_1_0 *qp_init_attr)
767 struct ibv_qp *real_qp;
768 struct ibv_qp_1_0 *qp;
769 struct ibv_qp_init_attr real_init_attr;
771 qp = malloc(sizeof *qp);
775 real_init_attr.qp_context = qp_init_attr->qp_context;
776 real_init_attr.send_cq = qp_init_attr->send_cq->real_cq;
777 real_init_attr.recv_cq = qp_init_attr->recv_cq->real_cq;
778 real_init_attr.srq = qp_init_attr->srq ?
779 qp_init_attr->srq->real_srq : NULL;
780 real_init_attr.cap = qp_init_attr->cap;
781 real_init_attr.qp_type = qp_init_attr->qp_type;
782 real_init_attr.sq_sig_all = qp_init_attr->sq_sig_all;
784 real_qp = ibv_create_qp(pd->real_pd, &real_init_attr);
790 qp->context = pd->context;
791 qp->qp_context = qp_init_attr->qp_context;
793 qp->send_cq = qp_init_attr->send_cq;
794 qp->recv_cq = qp_init_attr->recv_cq;
795 qp->srq = qp_init_attr->srq;
796 qp->qp_type = qp_init_attr->qp_type;
797 qp->qp_num = real_qp->qp_num;
798 qp->real_qp = real_qp;
800 qp_init_attr->cap = real_init_attr.cap;
802 real_qp->qp_context = qp;
806 symver(__ibv_create_qp_1_0, ibv_create_qp, IBVERBS_1.0);
808 int __ibv_query_qp_1_0(struct ibv_qp_1_0 *qp, struct ibv_qp_attr *attr,
810 struct ibv_qp_init_attr_1_0 *init_attr)
812 struct ibv_qp_init_attr real_init_attr;
815 ret = ibv_query_qp(qp->real_qp, attr, attr_mask, &real_init_attr);
819 init_attr->qp_context = qp->qp_context;
820 init_attr->send_cq = real_init_attr.send_cq->cq_context;
821 init_attr->recv_cq = real_init_attr.recv_cq->cq_context;
822 init_attr->srq = real_init_attr.srq->srq_context;
823 init_attr->qp_type = real_init_attr.qp_type;
824 init_attr->cap = real_init_attr.cap;
825 init_attr->sq_sig_all = real_init_attr.sq_sig_all;
829 symver(__ibv_query_qp_1_0, ibv_query_qp, IBVERBS_1.0);
831 int __ibv_modify_qp_1_0(struct ibv_qp_1_0 *qp, struct ibv_qp_attr *attr,
834 return ibv_modify_qp(qp->real_qp, attr, attr_mask);
836 symver(__ibv_modify_qp_1_0, ibv_modify_qp, IBVERBS_1.0);
838 int __ibv_destroy_qp_1_0(struct ibv_qp_1_0 *qp)
842 ret = ibv_destroy_qp(qp->real_qp);
849 symver(__ibv_destroy_qp_1_0, ibv_destroy_qp, IBVERBS_1.0);
851 struct ibv_ah_1_0 *__ibv_create_ah_1_0(struct ibv_pd_1_0 *pd,
852 struct ibv_ah_attr *attr)
854 struct ibv_ah *real_ah;
855 struct ibv_ah_1_0 *ah;
857 ah = malloc(sizeof *ah);
861 real_ah = ibv_create_ah(pd->real_pd, attr);
867 ah->context = pd->context;
869 ah->real_ah = real_ah;
873 symver(__ibv_create_ah_1_0, ibv_create_ah, IBVERBS_1.0);
875 int __ibv_destroy_ah_1_0(struct ibv_ah_1_0 *ah)
879 ret = ibv_destroy_ah(ah->real_ah);
886 symver(__ibv_destroy_ah_1_0, ibv_destroy_ah, IBVERBS_1.0);
888 int __ibv_attach_mcast_1_0(struct ibv_qp_1_0 *qp, union ibv_gid *gid, uint16_t lid)
890 return ibv_attach_mcast(qp->real_qp, gid, lid);
892 symver(__ibv_attach_mcast_1_0, ibv_attach_mcast, IBVERBS_1.0);
894 int __ibv_detach_mcast_1_0(struct ibv_qp_1_0 *qp, union ibv_gid *gid, uint16_t lid)
896 return ibv_detach_mcast(qp->real_qp, gid, lid);
898 symver(__ibv_detach_mcast_1_0, ibv_detach_mcast, IBVERBS_1.0);