iPXE
ib_pathrec.h
Go to the documentation of this file.
1#ifndef _IPXE_IB_PATHREC_H
2#define _IPXE_IB_PATHREC_H
3
4/** @file
5 *
6 * Infiniband path records
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
12#include <ipxe/infiniband.h>
13
15struct ib_path;
16
17/** Infiniband path operations */
19 /** Handle path transaction completion
20 *
21 * @v ibdev Infiniband device
22 * @v path Path
23 * @v rc Status code
24 * @v av Address vector, or NULL on error
25 */
26 void ( * complete ) ( struct ib_device *ibdev,
27 struct ib_path *path, int rc,
28 struct ib_address_vector *av );
29};
30
31/** An Infiniband path */
32struct ib_path {
33 /** Infiniband device */
35 /** Address vector */
37 /** Management transaction */
39 /** Path operations */
41 /** Owner private data */
43};
44
45/**
46 * Set Infiniband path owner-private data
47 *
48 * @v path Path
49 * @v priv Private data
50 */
51static inline __always_inline void
52ib_path_set_ownerdata ( struct ib_path *path, void *priv ) {
53 path->owner_priv = priv;
54}
55
56/**
57 * Get Infiniband path owner-private data
58 *
59 * @v path Path
60 * @ret priv Private data
61 */
62static inline __always_inline void *
64 return path->owner_priv;
65}
66
67extern struct ib_path *
69 struct ib_path_operations *op );
70extern void ib_destroy_path ( struct ib_device *ibdev,
71 struct ib_path *path );
72
73extern int ib_resolve_path ( struct ib_device *ibdev,
74 struct ib_address_vector *av );
75
76#endif /* _IPXE_IB_PATHREC_H */
struct arbelprm_rc_send_wqe rc
Definition arbel.h:3
#define __always_inline
Declare a function to be always inline.
Definition compiler.h:611
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
void ib_destroy_path(struct ib_device *ibdev, struct ib_path *path)
Destroy path.
Definition ib_pathrec.c:156
int ib_resolve_path(struct ib_device *ibdev, struct ib_address_vector *av)
Resolve path.
Definition ib_pathrec.c:249
struct ib_path * ib_create_path(struct ib_device *ibdev, struct ib_address_vector *av, struct ib_path_operations *op)
Create path.
Definition ib_pathrec.c:107
static __always_inline void * ib_path_get_ownerdata(struct ib_path *path)
Get Infiniband path owner-private data.
Definition ib_pathrec.h:63
static __always_inline void ib_path_set_ownerdata(struct ib_path *path, void *priv)
Set Infiniband path owner-private data.
Definition ib_pathrec.h:52
Infiniband protocol.
static uint16_t struct vmbus_xfer_pages_operations * op
Definition netvsc.h:327
An Infiniband Address Vector.
Definition infiniband.h:73
An Infiniband device.
Definition infiniband.h:399
An Infiniband management transaction.
Definition ib_mi.h:70
Infiniband path operations.
Definition ib_pathrec.h:18
void(* complete)(struct ib_device *ibdev, struct ib_path *path, int rc, struct ib_address_vector *av)
Handle path transaction completion.
Definition ib_pathrec.h:26
An Infiniband path.
Definition ib_pathrec.h:32
struct ib_address_vector av
Address vector.
Definition ib_pathrec.h:36
struct ib_mad_transaction * madx
Management transaction.
Definition ib_pathrec.h:38
struct ib_device * ibdev
Infiniband device.
Definition ib_pathrec.h:34
struct ib_path_operations * op
Path operations.
Definition ib_pathrec.h:40
void * owner_priv
Owner private data.
Definition ib_pathrec.h:42
static struct tlan_private * priv
Definition tlan.c:225