| 1 |
.\" -*- nroff -*- |
| 2 |
.\" Licensed under the OpenIB.org BSD license (FreeBSD Variant) - See COPYING.md |
| 3 |
.\" |
| 4 |
.TH IBV_CREATE_AH_FROM_WC 3 2006-10-31 libibverbs "Libibverbs Programmer's Manual" |
| 5 |
.SH "NAME" |
| 6 |
ibv_init_ah_from_wc, ibv_create_ah_from_wc \- initialize or create an |
| 7 |
address handle (AH) from a work completion |
| 8 |
.SH "SYNOPSIS" |
| 9 |
.nf |
| 10 |
.B #include <infiniband/verbs.h> |
| 11 |
.sp |
| 12 |
.BI "int ibv_init_ah_from_wc(struct ibv_context " "*context" ", uint8_t " "port_num" , |
| 13 |
.BI " struct ibv_wc " "*wc" ", struct ibv_grh " "*grh" , |
| 14 |
.BI " struct ibv_ah_attr " "*ah_attr" ); |
| 15 |
.sp |
| 16 |
.BI "struct ibv_ah *ibv_create_ah_from_wc(struct ibv_pd " "*pd" , |
| 17 |
.BI " struct ibv_wc " "*wc" , |
| 18 |
.BI " struct ibv_grh " "*grh" , |
| 19 |
.BI " uint8_t " "port_num" ); |
| 20 |
.fi |
| 21 |
.SH "DESCRIPTION" |
| 22 |
.B ibv_init_ah_from_wc() |
| 23 |
initializes the address handle (AH) attribute structure |
| 24 |
.I ah_attr |
| 25 |
for the RDMA device context |
| 26 |
.I context |
| 27 |
using the port number |
| 28 |
.I port_num\fR, |
| 29 |
using attributes from the work completion |
| 30 |
.I wc |
| 31 |
and the Global Routing Header (GRH) structure |
| 32 |
.I grh\fR. |
| 33 |
.PP |
| 34 |
.B ibv_create_ah_from_wc() |
| 35 |
creates an AH associated with the protection domain |
| 36 |
.I pd |
| 37 |
using the port number |
| 38 |
.I port_num\fR, |
| 39 |
using attributes from the work completion |
| 40 |
.I wc |
| 41 |
and the Global Routing Header (GRH) structure |
| 42 |
.I grh\fR. |
| 43 |
.SH "RETURN VALUE" |
| 44 |
.B ibv_init_ah_from_wc() |
| 45 |
returns 0 on success, and \-1 on error. |
| 46 |
.PP |
| 47 |
.B ibv_create_ah_from_wc() |
| 48 |
returns a pointer to the created AH, or NULL if the request fails. |
| 49 |
.SH "NOTES" |
| 50 |
The filled structure |
| 51 |
.I ah_attr |
| 52 |
returned from |
| 53 |
.B ibv_init_ah_from_wc() |
| 54 |
can be used to create a new AH using |
| 55 |
.B ibv_create_ah()\fR. |
| 56 |
.SH "SEE ALSO" |
| 57 |
.BR ibv_open_device (3), |
| 58 |
.BR ibv_alloc_pd (3), |
| 59 |
.BR ibv_create_ah (3), |
| 60 |
.BR ibv_destroy_ah (3), |
| 61 |
.BR ibv_poll_cq (3) |
| 62 |
.SH "AUTHORS" |
| 63 |
.TP |
| 64 |
Dotan Barak <[email protected]> |