diff options
author | Michael Brown <mcb30@ipxe.org> | 2010-09-15 03:10:27 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2010-09-15 03:20:54 +0100 |
commit | dace106f8286ff5484296021c5c687dbba68fefc (patch) | |
tree | 2b08c90dc564739828796f2dd5dc8d291c17c728 /src/include/ipxe | |
parent | d2a2618d76b6ec82dd3cec6fe492d3a2fed87591 (diff) | |
download | ipxe-dace106f8286ff5484296021c5c687dbba68fefc.tar.gz |
[fcoe] Add support for Fibre Channel over Ethernet
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r-- | src/include/ipxe/errfile.h | 1 | ||||
-rw-r--r-- | src/include/ipxe/fcoe.h | 76 | ||||
-rw-r--r-- | src/include/ipxe/features.h | 1 | ||||
-rw-r--r-- | src/include/ipxe/if_ether.h | 2 |
4 files changed, 80 insertions, 0 deletions
diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h index 2ae324126..efa3089ff 100644 --- a/src/include/ipxe/errfile.h +++ b/src/include/ipxe/errfile.h @@ -187,6 +187,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define ERRFILE_fc ( ERRFILE_NET | 0x002b0000 ) #define ERRFILE_fcels ( ERRFILE_NET | 0x002c0000 ) #define ERRFILE_fcp ( ERRFILE_NET | 0x002d0000 ) +#define ERRFILE_fcoe ( ERRFILE_NET | 0x002e0000 ) #define ERRFILE_image ( ERRFILE_IMAGE | 0x00000000 ) #define ERRFILE_elf ( ERRFILE_IMAGE | 0x00010000 ) diff --git a/src/include/ipxe/fcoe.h b/src/include/ipxe/fcoe.h new file mode 100644 index 000000000..25723ec7a --- /dev/null +++ b/src/include/ipxe/fcoe.h @@ -0,0 +1,76 @@ +#ifndef _IPXE_FCOE_H +#define _IPXE_FCOE_H + +/** + * @file + * + * Fibre Channel over Ethernet + * + */ + +FILE_LICENCE ( GPL2_OR_LATER ); + +#include <stdint.h> +#include <ipxe/fc.h> +#include <ipxe/if_ether.h> + +/** An FCoE name */ +union fcoe_name { + /** Fibre Channel name */ + struct fc_name fc; + /** FCoE name */ + struct { + /** Naming authority */ + uint16_t authority; + /** MAC address */ + uint8_t mac[ETH_ALEN]; + } __attribute__ (( packed )) fcoe; +}; + +/** IEEE 48-bit address */ +#define FCOE_AUTHORITY_IEEE 0x1000 + +/** IEEE extended */ +#define FCOE_AUTHORITY_IEEE_EXTENDED 0x2000 + +/** An FCoE header */ +struct fcoe_header { + /** FCoE frame version */ + uint8_t version; + /** Reserved */ + uint8_t reserved[12]; + /** Start of Frame marker */ + uint8_t sof; +} __attribute__ (( packed )); + +/** FCoE frame version */ +#define FCOE_FRAME_VER 0x00 + +/** Start of Frame marker values */ +enum fcoe_sof { + FCOE_SOF_F = 0x28, /**< Start of Frame Class F */ + FCOE_SOF_I2 = 0x2d, /**< Start of Frame Initiate Class 2 */ + FCOE_SOF_N2 = 0x35, /**< Start of Frame Normal Class 2 */ + FCOE_SOF_I3 = 0x2e, /**< Start of Frame Initiate Class 3 */ + FCOE_SOF_N3 = 0x36, /**< Start of Frame Normal Class 3 */ +}; + +/** An FCoE footer */ +struct fcoe_footer { + /** CRC */ + uint32_t crc; + /** End of frame marker */ + uint8_t eof; + /** Reserved */ + uint8_t reserved[3]; +} __attribute__ (( packed )); + +/** End of Frame marker value */ +enum fcoe_eof { + FCOE_EOF_N = 0x41, /**< End of Frame Normal */ + FCOE_EOF_T = 0x42, /**< End of Frame Terminate */ + FCOE_EOF_NI = 0x49, /**< End of Frame Invalid */ + FCOE_EOF_A = 0x50, /**< End of Frame Abort */ +}; + +#endif /* _IPXE_FCOE_H */ diff --git a/src/include/ipxe/features.h b/src/include/ipxe/features.h index b5033a6a9..76b59321f 100644 --- a/src/include/ipxe/features.h +++ b/src/include/ipxe/features.h @@ -50,6 +50,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define DHCP_EB_FEATURE_ELF 0x22 /**< ELF format */ #define DHCP_EB_FEATURE_COMBOOT 0x23 /**< COMBOOT format */ #define DHCP_EB_FEATURE_EFI 0x24 /**< EFI format */ +#define DHCP_EB_FEATURE_FCOE 0x25 /**< FCoE protocol */ /** @} */ diff --git a/src/include/ipxe/if_ether.h b/src/include/ipxe/if_ether.h index a52624146..db6cb0dfb 100644 --- a/src/include/ipxe/if_ether.h +++ b/src/include/ipxe/if_ether.h @@ -22,6 +22,8 @@ FILE_LICENCE ( GPL2_OR_LATER ); #define ETH_P_SLOW 0x8809 /* Ethernet slow protocols */ #define ETH_P_EAPOL 0x888E /* 802.1X EAP over LANs */ #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ +#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ +#define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ /** An Ethernet link-layer header */ struct ethhdr { |