diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-02-17 20:17:17 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-02-17 20:17:17 -0800 |
commit | d0c6656a62113b913948361779d6298fe76f6e61 (patch) | |
tree | efa2541a1abae4760717c6db421ea818114ab6f7 /gpxe/src/include/gpxe/ipoib.h | |
parent | 85b92a462dab7ce36c48614ea18314f8fc83ca9c (diff) | |
download | syslinux-d0c6656a62113b913948361779d6298fe76f6e61.tar.gz |
Update gPXE to version 0.9.6+ 277b84c6e7d49f3cf01c855007f591de8c7cb75f
Update gPXE to version 0.9.6+, from commit
277b84c6e7d49f3cf01c855007f591de8c7cb75f in the main gPXE repository.
The only differences is src/config/general.h which has a few protocols
added, and src/arch/i386/prefix/boot1a.S which was called boot1a.s in
the upstream repository.
Diffstat (limited to 'gpxe/src/include/gpxe/ipoib.h')
-rw-r--r-- | gpxe/src/include/gpxe/ipoib.h | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/gpxe/src/include/gpxe/ipoib.h b/gpxe/src/include/gpxe/ipoib.h index bcbdc4c6..80adee5b 100644 --- a/gpxe/src/include/gpxe/ipoib.h +++ b/gpxe/src/include/gpxe/ipoib.h @@ -8,6 +8,9 @@ #include <gpxe/infiniband.h> +/** IPoIB packet length */ +#define IPOIB_PKT_LEN 2048 + /** IPoIB MAC address length */ #define IPOIB_ALEN 20 @@ -23,33 +26,30 @@ struct ipoib_mac { } __attribute__ (( packed )); /** IPoIB link-layer header length */ -#define IPOIB_HLEN 24 - -/** - * IPoIB link-layer header pseudo portion - * - * This part doesn't actually exist on the wire, but it provides a - * convenient way to fit into the typical network device model. - */ -struct ipoib_pseudo_hdr { - /** Peer address */ - struct ipoib_mac peer; -} __attribute__ (( packed )); +#define IPOIB_HLEN 4 -/** IPoIB link-layer header real portion */ -struct ipoib_real_hdr { +/** IPoIB link-layer header */ +struct ipoib_hdr { /** Network-layer protocol */ uint16_t proto; /** Reserved, must be zero */ - uint16_t reserved; -} __attribute__ (( packed )); - -/** An IPoIB link-layer header */ -struct ipoib_hdr { - /** Pseudo portion */ - struct ipoib_pseudo_hdr pseudo; - /** Real portion */ - struct ipoib_real_hdr real; + union { + /** Reserved, must be zero */ + uint16_t reserved; + /** Peer addresses + * + * We use these fields internally to represent the + * peer addresses using a lookup key. There simply + * isn't enough room in the IPoIB header to store + * literal source or destination MAC addresses. + */ + struct { + /** Destination address key */ + uint8_t dest; + /** Source address key */ + uint8_t src; + } __attribute__ (( packed )) peer; + } __attribute__ (( packed )) u; } __attribute__ (( packed )); extern struct ll_protocol ipoib_protocol; @@ -68,6 +68,7 @@ static inline struct net_device * alloc_ipoibdev ( size_t priv_size ) { netdev = alloc_netdev ( priv_size ); if ( netdev ) { netdev->ll_protocol = &ipoib_protocol; + netdev->max_pkt_len = IPOIB_PKT_LEN; } return netdev; } |