00001 #ifndef _GPXE_IPOIB_H 00002 #define _GPXE_IPOIB_H 00003 00004 /** @file 00005 * 00006 * IP over Infiniband 00007 */ 00008 00009 FILE_LICENCE ( GPL2_OR_LATER ); 00010 00011 #include <gpxe/infiniband.h> 00012 00013 /** IPoIB MAC address length */ 00014 #define IPOIB_ALEN 20 00015 00016 /** An IPoIB MAC address */ 00017 struct ipoib_mac { 00018 /** Queue pair number 00019 * 00020 * MSB indicates support for IPoIB "connected mode". Lower 24 00021 * bits are the QPN. 00022 */ 00023 uint32_t flags__qpn; 00024 /** Port GID */ 00025 struct ib_gid gid; 00026 } __attribute__ (( packed )); 00027 00028 /** IPoIB link-layer header length */ 00029 #define IPOIB_HLEN 4 00030 00031 /** IPoIB link-layer header */ 00032 struct ipoib_hdr { 00033 /** Network-layer protocol */ 00034 uint16_t proto; 00035 /** Reserved, must be zero */ 00036 union { 00037 /** Reserved, must be zero */ 00038 uint16_t reserved; 00039 /** Peer addresses 00040 * 00041 * We use these fields internally to represent the 00042 * peer addresses using a lookup key. There simply 00043 * isn't enough room in the IPoIB header to store 00044 * literal source or destination MAC addresses. 00045 */ 00046 struct { 00047 /** Destination address key */ 00048 uint8_t dest; 00049 /** Source address key */ 00050 uint8_t src; 00051 } __attribute__ (( packed )) peer; 00052 } __attribute__ (( packed )) u; 00053 } __attribute__ (( packed )); 00054 00055 extern const char * ipoib_ntoa ( const void *ll_addr ); 00056 extern void ipoib_link_state_changed ( struct ib_device *ibdev ); 00057 extern int ipoib_probe ( struct ib_device *ibdev ); 00058 extern void ipoib_remove ( struct ib_device *ibdev ); 00059 extern struct net_device * alloc_ipoibdev ( size_t priv_size ); 00060 00061 #endif /* _GPXE_IPOIB_H */
1.5.7.1