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 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <ipxe/infiniband.h>
13 
14 struct ib_mad_transaction;
15 struct 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 */
32 struct ib_path {
33  /** Infiniband device */
34  struct ib_device *ibdev;
35  /** Address vector */
37  /** Management transaction */
39  /** Path operations */
41  /** Owner private data */
42  void *owner_priv;
43 };
44 
45 /**
46  * Set Infiniband path owner-private data
47  *
48  * @v path Path
49  * @v priv Private data
50  */
51 static inline __always_inline void
52 ib_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  */
62 static inline __always_inline void *
63 ib_path_get_ownerdata ( struct ib_path *path ) {
64  return path->owner_priv;
65 }
66 
67 extern struct ib_path *
69  struct ib_path_operations *op );
70 extern void ib_destroy_path ( struct ib_device *ibdev,
71  struct ib_path *path );
72 
73 extern int ib_resolve_path ( struct ib_device *ibdev,
74  struct ib_address_vector *av );
75 
76 #endif /* _IPXE_IB_PATHREC_H */
void * owner_priv
Owner private data.
Definition: ib_pathrec.h:42
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
Infiniband protocol.
void ib_destroy_path(struct ib_device *ibdev, struct ib_path *path)
Destroy path.
Definition: ib_pathrec.c:156
An Infiniband path.
Definition: ib_pathrec.h:32
struct ib_device * ibdev
Infiniband device.
Definition: ib_pathrec.h:34
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
int ib_resolve_path(struct ib_device *ibdev, struct ib_address_vector *av)
Resolve path.
Definition: ib_pathrec.c:249
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
An Infiniband device.
Definition: infiniband.h:398
struct ib_mad_transaction * madx
Management transaction.
Definition: ib_pathrec.h:38
Infiniband path operations.
Definition: ib_pathrec.h:18
An Infiniband management transaction.
Definition: ib_mi.h:70
static __always_inline void * ib_path_get_ownerdata(struct ib_path *path)
Get Infiniband path owner-private data.
Definition: ib_pathrec.h:63
struct ib_address_vector av
Address vector.
Definition: ib_pathrec.h:36
#define __always_inline
Declare a function to be always inline.
Definition: compiler.h:611
static uint16_t struct vmbus_xfer_pages_operations * op
Definition: netvsc.h:327
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 struct tlan_private * priv
Definition: tlan.c:224
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct ib_path_operations * op
Path operations.
Definition: ib_pathrec.h:40
An Infiniband Address Vector.
Definition: infiniband.h:72