diff options
author | Michael Brown <mcb30@ipxe.org> | 2016-03-09 00:26:56 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-03-09 08:43:40 +0000 |
commit | 9154d7a65c4fea575ff684bd08dc54db814f513c (patch) | |
tree | 3e0d99f3d3b79e156e739e01e17417561d879676 /src/include/ipxe | |
parent | 5bcaa1e4d4217911ef7c557a1da49b6248161e80 (diff) | |
download | ipxe-9154d7a65c4fea575ff684bd08dc54db814f513c.zip ipxe-9154d7a65c4fea575ff684bd08dc54db814f513c.tar.gz ipxe-9154d7a65c4fea575ff684bd08dc54db814f513c.tar.bz2 |
[eoib] Add Ethernet over Infiniband (EoIB) driver
EoIB is a fairly simple protocol in which raw Ethernet frames
(excluding the CRC) are encapsulated within Infiniband Unreliable
Datagrams, with a four-byte fixed EoIB header (which conveys no actual
information). The Ethernet broadcast domain is provided by a
multicast group, similar to the IPoIB IPv4 multicast group.
The mapping from Ethernet MAC addresses to Infiniband address vectors
is achieved by snooping incoming traffic and building a peer cache
which can then be used to map a MAC address into a port GID. The
address vector is completed using a path record lookup, as for IPoIB.
Note that this requires every packet to include a GRH.
Add basic support for EoIB devices. This driver is substantially
derived from the IPoIB driver. There is currently no mechanism for
automatically creating EoIB devices.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r-- | src/include/ipxe/eoib.h | 60 | ||||
-rw-r--r-- | src/include/ipxe/errfile.h | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/src/include/ipxe/eoib.h b/src/include/ipxe/eoib.h new file mode 100644 index 0000000..c53880b --- /dev/null +++ b/src/include/ipxe/eoib.h @@ -0,0 +1,60 @@ +#ifndef _IPXE_EOIB_H +#define _IPXE_EOIB_H + +/** @file + * + * Ethernet over Infiniband + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <stdint.h> +#include <byteswap.h> +#include <ipxe/netdevice.h> +#include <ipxe/infiniband.h> +#include <ipxe/ib_mcast.h> + +/** An EoIB header */ +struct eoib_header { + /** Signature */ + uint16_t magic; + /** Reserved */ + uint16_t reserved; +} __attribute__ (( packed )); + +/** EoIB magic signature */ +#define EOIB_MAGIC 0x8919 + +/** An EoIB device */ +struct eoib_device { + /** Name */ + const char *name; + /** Network device */ + struct net_device *netdev; + /** Underlying Infiniband device */ + struct ib_device *ibdev; + /** List of EoIB devices */ + struct list_head list; + /** Broadcast address */ + struct ib_address_vector broadcast; + + /** Completion queue */ + struct ib_completion_queue *cq; + /** Queue pair */ + struct ib_queue_pair *qp; + /** Broadcast group membership */ + struct ib_mc_membership membership; + + /** Peer cache */ + struct list_head peers; +}; + +extern int eoib_create ( struct ib_device *ibdev, const uint8_t *hw_addr, + struct ib_address_vector *broadcast, + const char *name ); +extern struct eoib_device * eoib_find ( struct ib_device *ibdev, + const uint8_t *hw_addr ); +extern void eoib_destroy ( struct eoib_device *eoib ); + +#endif /* _IPXE_EOIB_H */ diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h index 65b4d9c..e64ccc3 100644 --- a/src/include/ipxe/errfile.h +++ b/src/include/ipxe/errfile.h @@ -185,6 +185,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define ERRFILE_intelxvf ( ERRFILE_DRIVER | 0x00790000 ) #define ERRFILE_smsc95xx ( ERRFILE_DRIVER | 0x007a0000 ) #define ERRFILE_acm ( ERRFILE_DRIVER | 0x007b0000 ) +#define ERRFILE_eoib ( ERRFILE_DRIVER | 0x007c0000 ) #define ERRFILE_aoe ( ERRFILE_NET | 0x00000000 ) #define ERRFILE_arp ( ERRFILE_NET | 0x00010000 ) |