aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/include/gpxe/ipoib.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpxe/src/include/gpxe/ipoib.h')
-rw-r--r--gpxe/src/include/gpxe/ipoib.h31
1 files changed, 6 insertions, 25 deletions
diff --git a/gpxe/src/include/gpxe/ipoib.h b/gpxe/src/include/gpxe/ipoib.h
index 80adee5b..1d02f792 100644
--- a/gpxe/src/include/gpxe/ipoib.h
+++ b/gpxe/src/include/gpxe/ipoib.h
@@ -6,10 +6,9 @@
* IP over Infiniband
*/
-#include <gpxe/infiniband.h>
+FILE_LICENCE ( GPL2_OR_LATER );
-/** IPoIB packet length */
-#define IPOIB_PKT_LEN 2048
+#include <gpxe/infiniband.h>
/** IPoIB MAC address length */
#define IPOIB_ALEN 20
@@ -18,9 +17,10 @@
struct ipoib_mac {
/** Queue pair number
*
- * MSB must be zero; QPNs are only 24-bit.
+ * MSB indicates support for IPoIB "connected mode". Lower 24
+ * bits are the QPN.
*/
- uint32_t qpn;
+ uint32_t flags__qpn;
/** Port GID */
struct ib_gid gid;
} __attribute__ (( packed ));
@@ -52,29 +52,10 @@ struct ipoib_hdr {
} __attribute__ (( packed )) u;
} __attribute__ (( packed ));
-extern struct ll_protocol ipoib_protocol;
-
extern const char * ipoib_ntoa ( const void *ll_addr );
-
-/**
- * Allocate IPoIB device
- *
- * @v priv_size Size of driver private data
- * @ret netdev Network device, or NULL
- */
-static inline struct net_device * alloc_ipoibdev ( size_t priv_size ) {
- struct net_device *netdev;
-
- netdev = alloc_netdev ( priv_size );
- if ( netdev ) {
- netdev->ll_protocol = &ipoib_protocol;
- netdev->max_pkt_len = IPOIB_PKT_LEN;
- }
- return netdev;
-}
-
extern void ipoib_link_state_changed ( struct ib_device *ibdev );
extern int ipoib_probe ( struct ib_device *ibdev );
extern void ipoib_remove ( struct ib_device *ibdev );
+extern struct net_device * alloc_ipoibdev ( size_t priv_size );
#endif /* _GPXE_IPOIB_H */