iPXE
ipoib.h
Go to the documentation of this file.
1 #ifndef _IPXE_IPOIB_H
2 #define _IPXE_IPOIB_H
3 
4 /** @file
5  *
6  * IP over Infiniband
7  */
8 
9 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
10 
11 #include <ipxe/if_arp.h>
12 #include <ipxe/infiniband.h>
13 
14 /** IPoIB MAC address length */
15 #define IPOIB_ALEN 20
16 
17 /** An IPoIB MAC address */
18 struct ipoib_mac {
19  /** Queue pair number
20  *
21  * MSB indicates support for IPoIB "connected mode". Lower 24
22  * bits are the QPN.
23  */
25  /** Port GID */
26  union ib_gid gid;
27 } __attribute__ (( packed ));
28 
29 /** IPoIB link-layer header length */
30 #define IPOIB_HLEN 4
31 
32 /** IPoIB link-layer header */
33 struct ipoib_hdr {
34  /** Network-layer protocol */
36  /** Reserved, must be zero */
38 } __attribute__ (( packed ));
39 
40 /** GUID mask used for constructing eIPoIB Local Ethernet MAC address (LEMAC) */
41 #define IPOIB_GUID_MASK 0xe7
42 
43 /** eIPoIB Remote Ethernet MAC address
44  *
45  * An eIPoIB REMAC address is an Ethernet-like (6 byte) link-layer
46  * pseudo-address used to look up a full IPoIB link-layer address.
47  */
48 struct ipoib_remac {
49  /** Remote QPN
50  *
51  * Must be ORed with EIPOIB_QPN_LA so that eIPoIB REMAC
52  * addresses are considered as locally-assigned Ethernet MAC
53  * addreses.
54  */
56  /** Remote LID */
58 } __attribute__ (( packed ));
59 
60 /** eIPoIB REMAC locally-assigned address indicator */
61 #define EIPOIB_QPN_LA 0x02000000UL
62 
63 extern const char * ipoib_ntoa ( const void *ll_addr );
64 extern struct net_device * alloc_ipoibdev ( size_t priv_size );
65 extern struct net_device * ipoib_netdev ( struct ib_device *ibdev );
66 
67 #endif /* _IPXE_IPOIB_H */
#define __attribute__(x)
Definition: compiler.h:10
Infiniband protocol.
unsigned short uint16_t
Definition: stdint.h:11
An Infiniband Global Identifier.
Definition: ib_packet.h:33
Address Resolution Protocol constants and types.
const char * ipoib_ntoa(const void *ll_addr)
An Infiniband device.
Definition: infiniband.h:398
uint16_t reserved
Reserved, must be zero.
Definition: ipoib.h:37
A network device.
Definition: netdevice.h:352
uint32_t flags__qpn
Queue pair number.
Definition: ipoib.h:24
unsigned int uint32_t
Definition: stdint.h:12
uint32_t qpn
Remote QPN.
Definition: ipoib.h:55
struct net_device * ipoib_netdev(struct ib_device *ibdev)
Find IPoIB network device.
Definition: ipoib.c:1036
uint16_t proto
Network-layer protocol.
Definition: ipoib.h:35
eIPoIB Remote Ethernet MAC address
Definition: ipoib.h:48
An IPoIB MAC address.
Definition: ipoib.h:18
IPoIB link-layer header.
Definition: ipoib.h:33
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
struct net_device * alloc_ipoibdev(size_t priv_size)
Allocate IPoIB device.
Definition: ipoib.c:315
uint16_t lid
Remote LID.
Definition: ipoib.h:57
union ib_gid gid
Port GID.
Definition: ipoib.h:26