6 * SCSI RDMA Protocol over Infiniband
10 FILE_LICENCE ( BSD2
);
13 #include <gpxe/infiniband.h>
16 /** SRP initiator port identifier for Infiniband */
17 struct ib_srp_initiator_port_id
{
18 /** Identifier extension */
19 struct ib_gid_half id_ext
;
20 /** IB channel adapter GUID */
21 struct ib_gid_half hca_guid
;
22 } __attribute__ (( packed
));
24 /** SRP target port identifier for Infiniband */
25 struct ib_srp_target_port_id
{
26 /** Identifier extension */
27 struct ib_gid_half id_ext
;
28 /** I/O controller GUID */
29 struct ib_gid_half ioc_guid
;
30 } __attribute__ (( packed
));
33 * Get Infiniband-specific initiator port ID
35 * @v port_ids SRP port IDs
36 * @ret initiator_port_id Infiniband-specific initiator port ID
38 static inline __always_inline
struct ib_srp_initiator_port_id
*
39 ib_srp_initiator_port_id ( struct srp_port_ids
*port_ids
) {
40 return ( ( struct ib_srp_initiator_port_id
* ) &port_ids
->initiator
);
44 * Get Infiniband-specific target port ID
46 * @v port_ids SRP port IDs
47 * @ret target_port_id Infiniband-specific target port ID
49 static inline __always_inline
struct ib_srp_target_port_id
*
50 ib_srp_target_port_id ( struct srp_port_ids
*port_ids
) {
51 return ( ( struct ib_srp_target_port_id
* ) &port_ids
->target
);
54 /** Infiniband-specific SRP parameters */
55 struct ib_srp_parameters
{
58 /** Destination GID */
61 struct ib_gid_half service_id
;
67 * Get Infiniband-specific transport parameters
70 * @ret ib_params Infiniband-specific transport parameters
72 static inline __always_inline
struct ib_srp_parameters
*
73 ib_srp_params ( struct srp_device
*srp
) {
74 return srp_transport_priv ( srp
);
77 extern struct srp_transport_type ib_srp_transport
;
79 #endif /* _GPXE_IB_SRP_H */