This is general protocol info potentially useful to other code.
Signed-off-by: Robert Love <[EMAIL PROTECTED]>
---
drivers/scsi/fcoe/fc_fcoe.h | 108 ------------------------------------------
drivers/scsi/fcoe/fcoe_def.h | 2 -
drivers/scsi/fcoe/fcoe_dev.c | 2 -
drivers/scsi/fcoe/fcoe_if.c | 2 -
include/scsi/fc/fc_fcoe.h | 108 ++++++++++++++++++++++++++++++++++++++++++
5 files changed, 111 insertions(+), 111 deletions(-)
diff --git a/drivers/scsi/fcoe/fc_fcoe.h b/drivers/scsi/fcoe/fc_fcoe.h
deleted file mode 100644
index b2e07ec..0000000
--- a/drivers/scsi/fcoe/fc_fcoe.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright(c) 2007 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Maintained at www.Open-FCoE.org
- */
-
-#ifndef _FC_FCOE_H_
-#define _FC_FCOE_H_
-
-/*
- * FCoE - Fibre Channel over Ethernet.
- */
-
-/*
- * The FCoE ethertype eventually goes in net/if_ether.h.
- */
-#ifndef ETH_P_FCOE
-#define ETH_P_FCOE 0x8906 /* FCOE ether type */
-#endif
-
-/*
- * FC_FCOE_OUI hasn't been standardized yet. XXX TBD.
- */
-#ifndef FC_FCOE_OUI
-#define FC_FCOE_OUI 0x0efc00 /* upper 24 bits of FCOE dest
MAC TBD */
-#endif
-
-/*
- * The destination MAC address for the fabric login may get a different OUI.
- * This isn't standardized yet.
- */
-#ifndef FC_FCOE_FLOGI_MAC
-/* gateway MAC - TBD */
-#define FC_FCOE_FLOGI_MAC { 0x0e, 0xfc, 0x00, 0xff, 0xff, 0xfe }
-#endif
-
-#define FC_FCOE_VER 0 /* version */
-
-/*
- * Ethernet Addresses based on FC S_ID and D_ID.
- * Generated by FC_FCOE_OUI | S_ID/D_ID
- */
-#define FC_FCOE_ENCAPS_ID(n) (((u64) FC_FCOE_OUI << 24) | (n))
-#define FC_FCOE_DECAPS_ID(n) ((n) >> 24)
-
-/*
- * FCoE frame header - 14 bytes
- *
- * This is the August 2007 version of the FCoE header as defined by T11.
- * This follows the VLAN header, which includes the ethertype.
- */
-struct fcoe_hdr {
- __u8 fcoe_ver; /* version field - upper 4 bits */
- __u8 fcoe_resvd[12]; /* reserved - send zero and ignore */
- __u8 fcoe_sof; /* start of frame per RFC 3643 */
-};
-
-#define FC_FCOE_DECAPS_VER(hp) ((hp)->fcoe_ver >> 4)
-#define FC_FCOE_ENCAPS_VER(hp, ver) ((hp)->fcoe_ver = (ver) << 4)
-
-/*
- * FCoE CRC & EOF - 8 bytes.
- */
-struct fcoe_crc_eof {
- __le32 fcoe_crc32; /* CRC for FC packet */
- __u8 fcoe_eof; /* EOF from RFC 3643 */
- __u8 fcoe_resvd[3]; /* reserved - send zero and ignore */
-} __attribute__((packed));
-
-/*
- * Store OUI + DID into MAC address field.
- */
-static inline void fc_fcoe_set_mac(u8 *mac, u8 *did)
-{
- mac[0] = (u8) (FC_FCOE_OUI >> 16);
- mac[1] = (u8) (FC_FCOE_OUI >> 8);
- mac[2] = (u8) FC_FCOE_OUI;
- mac[3] = did[0];
- mac[4] = did[1];
- mac[5] = did[2];
-}
-
-/*
- * VLAN header. This is also defined in linux/if_vlan.h, but for
kernels only.
- */
-struct fcoe_vlan_hdr {
- __be16 vlan_tag; /* VLAN tag including priority */
- __be16 vlan_ethertype; /* encapsulated ethertype ETH_P_FCOE */
-};
-
-#ifndef ETH_P_8021Q
-#define ETH_P_8021Q 0x8100
-#endif
-
-#endif /* _FC_FCOE_H_ */
diff --git a/drivers/scsi/fcoe/fcoe_def.h b/drivers/scsi/fcoe/fcoe_def.h
index defea60..12bf69c 100644
--- a/drivers/scsi/fcoe/fcoe_def.h
+++ b/drivers/scsi/fcoe/fcoe_def.h
@@ -25,7 +25,7 @@
#include <scsi/libfc/libfc.h>
-#include "fc_fcoe.h"
+#include <scsi/fc/fc_fcoe.h>
#define FCOE_DRIVER_NAME "fcoe" /* driver name for ioctls */
#define FCOE_DRIVER_VENDOR "Open-FC.org" /* vendor name for ioctls */
diff --git a/drivers/scsi/fcoe/fcoe_dev.c b/drivers/scsi/fcoe/fcoe_dev.c
index 4579a66..d5a354f 100644
--- a/drivers/scsi/fcoe/fcoe_dev.c
+++ b/drivers/scsi/fcoe/fcoe_dev.c
@@ -42,7 +42,7 @@
#include <scsi/libfc/libfc.h>
#include <scsi/libfc/fc_frame.h>
-#include "fc_fcoe.h"
+#include <scsi/fc/fc_fcoe.h>
#include "fcoe_def.h"
#define FCOE_MAX_QUEUE_DEPTH 256
diff --git a/drivers/scsi/fcoe/fcoe_if.c b/drivers/scsi/fcoe/fcoe_if.c
index b5a32c6..01ad482 100644
--- a/drivers/scsi/fcoe/fcoe_if.c
+++ b/drivers/scsi/fcoe/fcoe_if.c
@@ -41,7 +41,7 @@
#include <scsi/libfc/libfc.h>
-#include "fc_fcoe.h"
+#include <scsi/fc/fc_fcoe.h>
#include "fcoe_def.h"
#define FCOE_VERSION "0.1"
diff --git a/include/scsi/fc/fc_fcoe.h b/include/scsi/fc/fc_fcoe.h
new file mode 100644
index 0000000..b2e07ec
--- /dev/null
+++ b/include/scsi/fc/fc_fcoe.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright(c) 2007 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Maintained at www.Open-FCoE.org
+ */
+
+#ifndef _FC_FCOE_H_
+#define _FC_FCOE_H_
+
+/*
+ * FCoE - Fibre Channel over Ethernet.
+ */
+
+/*
+ * The FCoE ethertype eventually goes in net/if_ether.h.
+ */
+#ifndef ETH_P_FCOE
+#define ETH_P_FCOE 0x8906 /* FCOE ether type */
+#endif
+
+/*
+ * FC_FCOE_OUI hasn't been standardized yet. XXX TBD.
+ */
+#ifndef FC_FCOE_OUI
+#define FC_FCOE_OUI 0x0efc00 /* upper 24 bits of FCOE dest
MAC TBD */
+#endif
+
+/*
+ * The destination MAC address for the fabric login may get a different OUI.
+ * This isn't standardized yet.
+ */
+#ifndef FC_FCOE_FLOGI_MAC
+/* gateway MAC - TBD */
+#define FC_FCOE_FLOGI_MAC { 0x0e, 0xfc, 0x00, 0xff, 0xff, 0xfe }
+#endif
+
+#define FC_FCOE_VER 0 /* version */
+
+/*
+ * Ethernet Addresses based on FC S_ID and D_ID.
+ * Generated by FC_FCOE_OUI | S_ID/D_ID
+ */
+#define FC_FCOE_ENCAPS_ID(n) (((u64) FC_FCOE_OUI << 24) | (n))
+#define FC_FCOE_DECAPS_ID(n) ((n) >> 24)
+
+/*
+ * FCoE frame header - 14 bytes
+ *
+ * This is the August 2007 version of the FCoE header as defined by T11.
+ * This follows the VLAN header, which includes the ethertype.
+ */
+struct fcoe_hdr {
+ __u8 fcoe_ver; /* version field - upper 4 bits */
+ __u8 fcoe_resvd[12]; /* reserved - send zero and ignore */
+ __u8 fcoe_sof; /* start of frame per RFC 3643 */
+};
+
+#define FC_FCOE_DECAPS_VER(hp) ((hp)->fcoe_ver >> 4)
+#define FC_FCOE_ENCAPS_VER(hp, ver) ((hp)->fcoe_ver = (ver) << 4)
+
+/*
+ * FCoE CRC & EOF - 8 bytes.
+ */
+struct fcoe_crc_eof {
+ __le32 fcoe_crc32; /* CRC for FC packet */
+ __u8 fcoe_eof; /* EOF from RFC 3643 */
+ __u8 fcoe_resvd[3]; /* reserved - send zero and ignore */
+} __attribute__((packed));
+
+/*
+ * Store OUI + DID into MAC address field.
+ */
+static inline void fc_fcoe_set_mac(u8 *mac, u8 *did)
+{
+ mac[0] = (u8) (FC_FCOE_OUI >> 16);
+ mac[1] = (u8) (FC_FCOE_OUI >> 8);
+ mac[2] = (u8) FC_FCOE_OUI;
+ mac[3] = did[0];
+ mac[4] = did[1];
+ mac[5] = did[2];
+}
+
+/*
+ * VLAN header. This is also defined in linux/if_vlan.h, but for
kernels only.
+ */
+struct fcoe_vlan_hdr {
+ __be16 vlan_tag; /* VLAN tag including priority */
+ __be16 vlan_ethertype; /* encapsulated ethertype ETH_P_FCOE */
+};
+
+#ifndef ETH_P_8021Q
+#define ETH_P_8021Q 0x8100
+#endif
+
+#endif /* _FC_FCOE_H_ */
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel