iPXE
|
Infiniband packet format. More...
Go to the source code of this file.
Data Structures | |
union | ib_guid |
An Infiniband Globally Unique Identifier. More... | |
union | ib_gid |
An Infiniband Global Identifier. More... | |
struct | ib_local_route_header |
An Infiniband Local Route Header. More... | |
struct | ib_global_route_header |
An Infiniband Global Route Header. More... | |
struct | ib_base_transport_header |
An Infiniband Base Transport Header. More... | |
struct | ib_datagram_extended_transport_header |
An Infiniband Datagram Extended Transport Header. More... | |
union | ib_headers |
All known IB header formats. More... | |
Macros | |
#define | IB_GUID_FMT "%08x:%08x" |
Infiniband Globally Unique Identifier debug message format. More... | |
#define | IB_GUID_ARGS(guid) ntohl ( (guid)->dwords[0] ), ntohl ( (guid)->dwords[1] ) |
Infiniband Globally Unique Identifier debug message arguments. More... | |
#define | IB_GID_FMT IB_GUID_FMT ":" IB_GUID_FMT |
Infiniband Global Identifier debug message format. More... | |
#define | IB_GID_ARGS(gid) IB_GUID_ARGS ( &(gid)->s.prefix ), IB_GUID_ARGS ( &(gid)->s.guid ) |
Infiniband Global Identifier debug message arguments. More... | |
#define | IB_GID_MULTICAST(gid) ( (gid)->bytes[0] == 0xff ) |
Test for multicast GID. More... | |
#define | IB_LID_NONE 0xffff |
Default Infiniband LID. More... | |
#define | IB_LID_MULTICAST(lid) ( ( (lid) >= 0xc000 ) && ( (lid) <= 0xfffe ) ) |
Test for multicast LID. More... | |
#define | IB_GRH_IPVER_IPv6 0x06 |
#define | IB_GRH_NXTHDR_IBA 0x1b |
#define | IB_MAX_HEADER_SIZE sizeof ( union ib_headers ) |
Maximum size required for IB headers. More... | |
Enumerations | |
enum | ib_vl { IB_VL_DEFAULT = 0, IB_VL_SMP = 15 } |
Infiniband virtual lanes. More... | |
enum | ib_lnh { IB_LNH_RAW = 0, IB_LNH_IPv6 = 1, IB_LNH_BTH = 2, IB_LNH_GRH = 3 } |
An Infiniband Link Next Header value. More... | |
enum | ib_bth_opcode { BTH_OPCODE_UD_SEND = 0x64 } |
An Infiniband BTH opcode. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
struct ib_local_route_header | __attribute__ ((packed)) |
int | ib_push (struct ib_device *ibdev, struct io_buffer *iobuf, struct ib_queue_pair *qp, size_t payload_len, const struct ib_address_vector *dest) |
Add IB headers. More... | |
int | ib_pull (struct ib_device *ibdev, struct io_buffer *iobuf, struct ib_queue_pair **qp, size_t *payload_len, struct ib_address_vector *dest, struct ib_address_vector *source) |
Remove IB headers. More... | |
Variables | |
uint8_t | vl__lver |
Virtual lane and link version. More... | |
uint8_t | sl__lnh |
Service level and next link header. More... | |
uint16_t | dlid |
Destination LID. More... | |
uint16_t | length |
Packet length. More... | |
uint16_t | slid |
Source LID. More... | |
enum ib_vl | __attribute__ |
uint32_t | ipver__tclass__flowlabel |
IP version, traffic class, and flow label. More... | |
uint16_t | paylen |
Payload length. More... | |
uint8_t | nxthdr |
Next header. More... | |
uint8_t | hoplmt |
Hop limit. More... | |
union ib_gid | sgid |
Source GID. More... | |
union ib_gid | dgid |
Destiniation GID. More... | |
uint8_t | opcode |
Opcode. More... | |
uint8_t | se__m__padcnt__tver |
Transport header version, pad count, migration and solicitation. More... | |
uint16_t | pkey |
Partition key. More... | |
uint32_t | dest_qp |
Destination queue pair. More... | |
uint32_t | ack__psn |
Packet sequence number and acknowledge request. More... | |
uint32_t | qkey |
Queue key. More... | |
uint32_t | src_qp |
Source queue pair. More... | |
struct ib_local_route_header | lrh |
struct ib_global_route_header | grh |
struct ib_base_transport_header | bth |
struct ib_datagram_extended_transport_header | deth |
Infiniband packet format.
Definition in file ib_packet.h.
#define IB_GUID_FMT "%08x:%08x" |
Infiniband Globally Unique Identifier debug message format.
Definition at line 26 of file ib_packet.h.
Infiniband Globally Unique Identifier debug message arguments.
Definition at line 29 of file ib_packet.h.
#define IB_GID_FMT IB_GUID_FMT ":" IB_GUID_FMT |
Infiniband Global Identifier debug message format.
Definition at line 45 of file ib_packet.h.
#define IB_GID_ARGS | ( | gid | ) | IB_GUID_ARGS ( &(gid)->s.prefix ), IB_GUID_ARGS ( &(gid)->s.guid ) |
Infiniband Global Identifier debug message arguments.
Definition at line 48 of file ib_packet.h.
Test for multicast GID.
Definition at line 52 of file ib_packet.h.
#define IB_LID_NONE 0xffff |
Default Infiniband LID.
Definition at line 83 of file ib_packet.h.
Test for multicast LID.
Definition at line 86 of file ib_packet.h.
#define IB_GRH_IPVER_IPv6 0x06 |
Definition at line 109 of file ib_packet.h.
#define IB_GRH_NXTHDR_IBA 0x1b |
Definition at line 110 of file ib_packet.h.
#define IB_MAX_HEADER_SIZE sizeof ( union ib_headers ) |
Maximum size required for IB headers.
Definition at line 156 of file ib_packet.h.
enum ib_vl |
Infiniband virtual lanes.
Enumerator | |
---|---|
IB_VL_DEFAULT | |
IB_VL_SMP |
Definition at line 69 of file ib_packet.h.
enum ib_lnh |
An Infiniband Link Next Header value.
Enumerator | |
---|---|
IB_LNH_RAW | |
IB_LNH_IPv6 | |
IB_LNH_BTH | |
IB_LNH_GRH |
Definition at line 75 of file ib_packet.h.
enum ib_bth_opcode |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
struct ib_local_route_header __attribute__ | ( | (packed) | ) |
int ib_push | ( | struct ib_device * | ibdev, |
struct io_buffer * | iobuf, | ||
struct ib_queue_pair * | qp, | ||
size_t | payload_len, | ||
const struct ib_address_vector * | dest | ||
) |
Add IB headers.
ibdev | Infiniband device |
iobuf | I/O buffer to contain headers |
qp | Queue pair |
payload_len | Payload length |
dest | Destination address vector |
rc | Return status code |
Definition at line 52 of file ib_packet.c.
References ib_base_transport_header::ack__psn, bth, BTH_OPCODE_UD_SEND, io_buffer::data, DBGC2, DBGCP_HDA, dest, ib_base_transport_header::dest_qp, deth, ib_global_route_header::dgid, ib_local_route_header::dlid, ib_device::gid, grh, ib_global_route_header::hoplmt, htonl, htons, IB_GRH_IPVER_IPv6, IB_GRH_NXTHDR_IBA, IB_LNH_BTH, IB_LNH_GRH, IB_QPN_SMI, IB_VL_DEFAULT, IB_VL_SMP, iob_len(), iob_push, ib_global_route_header::ipver__tclass__flowlabel, ib_local_route_header::length, ib_device::lid, lrh, memcpy(), ib_device::name, NULL, ib_global_route_header::nxthdr, ib_base_transport_header::opcode, pad_len, ib_global_route_header::paylen, ib_base_transport_header::pkey, ib_device::pkey, ib_datagram_extended_transport_header::qkey, qp, ib_base_transport_header::se__m__padcnt__tver, ib_global_route_header::sgid, ib_local_route_header::sl__lnh, ib_local_route_header::slid, ib_datagram_extended_transport_header::src_qp, and ib_local_route_header::vl__lver.
Referenced by arbel_fill_mlx_send_wqe(), hermon_fill_mlx_send_wqe(), linda_post_send(), and qib7322_post_send().
int ib_pull | ( | struct ib_device * | ibdev, |
struct io_buffer * | iobuf, | ||
struct ib_queue_pair ** | qp, | ||
size_t * | payload_len, | ||
struct ib_address_vector * | dest, | ||
struct ib_address_vector * | source | ||
) |
Remove IB headers.
ibdev | Infiniband device |
iobuf | I/O buffer containing headers |
qp | Queue pair to fill in, or NULL |
payload_len | Payload length to fill in, or NULL |
dest | Destination address vector to fill in |
source | Source address vector to fill in |
rc | Return status code |
Definition at line 133 of file ib_packet.c.
References assert(), bth, BTH_OPCODE_UD_SEND, io_buffer::data, DBGC, DBGC2, DBGCP_HDA, dest, ib_base_transport_header::dest_qp, deth, ib_global_route_header::dgid, ib_local_route_header::dlid, EINVAL, ENODEV, ENOTSUP, ib_address_vector::gid, ib_address_vector::gid_present, grh, ib_find_qp_mgid(), ib_find_qp_qpn(), IB_GID_ARGS, IB_GID_FMT, IB_LID_MULTICAST, IB_LNH_BTH, IB_LNH_GRH, iob_len(), iob_pull, ib_local_route_header::length, ib_address_vector::lid, lrh, memcpy(), memset(), ib_device::name, ntohl, ntohs, NULL, ib_base_transport_header::opcode, pad_len, ib_address_vector::qkey, ib_datagram_extended_transport_header::qkey, qp, ib_address_vector::qpn, ib_base_transport_header::se__m__padcnt__tver, ib_global_route_header::sgid, ib_address_vector::sl, ib_local_route_header::sl__lnh, ib_local_route_header::slid, and ib_datagram_extended_transport_header::src_qp.
Referenced by linda_complete_recv(), and qib7322_complete_recv().
uint8_t vl__lver |
Virtual lane and link version.
Definition at line 12 of file ib_packet.h.
uint8_t sl__lnh |
Service level and next link header.
Definition at line 14 of file ib_packet.h.
uint16_t dlid |
Destination LID.
Definition at line 16 of file ib_packet.h.
uint16_t length |
Packet length.
Definition at line 18 of file ib_packet.h.
uint16_t slid |
Source LID.
Definition at line 20 of file ib_packet.h.
uint32_t ipver__tclass__flowlabel |
IP version, traffic class, and flow label.
4 bits : Version of the GRH 8 bits : Traffic class 20 bits : Flow label
Definition at line 17 of file ib_packet.h.
uint16_t paylen |
Payload length.
Definition at line 19 of file ib_packet.h.
uint8_t nxthdr |
Next header.
Definition at line 21 of file ib_packet.h.
uint8_t hoplmt |
Hop limit.
Definition at line 23 of file ib_packet.h.
union ib_gid sgid |
Source GID.
Definition at line 25 of file ib_packet.h.
union ib_gid dgid |
Destiniation GID.
Definition at line 27 of file ib_packet.h.
uint8_t opcode |
Opcode.
Definition at line 12 of file ib_packet.h.
uint8_t se__m__padcnt__tver |
Transport header version, pad count, migration and solicitation.
Definition at line 14 of file ib_packet.h.
uint16_t pkey |
Partition key.
Definition at line 16 of file ib_packet.h.
uint32_t dest_qp |
Destination queue pair.
Definition at line 18 of file ib_packet.h.
uint32_t ack__psn |
Packet sequence number and acknowledge request.
Definition at line 20 of file ib_packet.h.
uint32_t qkey |
Queue key.
Definition at line 12 of file ib_packet.h.
uint32_t src_qp |
Source queue pair.
Definition at line 14 of file ib_packet.h.
struct ib_local_route_header lrh |
Definition at line 15 of file ib_packet.h.
struct ib_global_route_header grh |
Definition at line 16 of file ib_packet.h.
Referenced by arbel_complete(), arbel_post_recv(), golan_complete(), golan_post_recv(), hermon_complete(), hermon_post_recv(), ib_pull(), and ib_push().
struct ib_base_transport_header bth |
Definition at line 17 of file ib_packet.h.
struct ib_datagram_extended_transport_header deth |
Definition at line 18 of file ib_packet.h.