aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/fc/fc_fip.h
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-07-20 18:20:19 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:05:55 -0400
commitedcbb4395ecd2f2731fbf38ecbff5be0316513cb (patch)
tree89312860a0911816af0330692f8d976a7b2feb38 /include/scsi/fc/fc_fip.h
parentf60e12e9c778c8256a646f80603d1b88ba5ce891 (diff)
[SCSI] libfcoe: add protocol description of FIP VN2VN mode
The FC-BB-6 committee is proposing a new FIP usage model called VN_port to VN_port mode. It allows VN_ports to discover each other over a loss-free L2 Ethernet without any FCF or Fibre-channel fabric services. This is point-to-multipoint. There is also a variant of this called point-to-point which provides for making sure there is just one pair of ports operating over the Ethernet fabric. This patch defines the new message type and subtypes as well as one new descriptor type used by VN2VN mode. These are all still at the proposed stage and subject to change. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi/fc/fc_fip.h')
-rw-r--r--include/scsi/fc/fc_fip.h46
1 files changed, 43 insertions, 3 deletions
diff --git a/include/scsi/fc/fc_fip.h b/include/scsi/fc/fc_fip.h
index 17baa19380f0..ae25d4ab2548 100644
--- a/include/scsi/fc/fc_fip.h
+++ b/include/scsi/fc/fc_fip.h
@@ -17,9 +17,12 @@
17#ifndef _FC_FIP_H_ 17#ifndef _FC_FIP_H_
18#define _FC_FIP_H_ 18#define _FC_FIP_H_
19 19
20#include <scsi/fc/fc_ns.h>
21
20/* 22/*
21 * This version is based on: 23 * This version is based on:
22 * http://www.t11.org/ftp/t11/pub/fc/bb-5/08-543v1.pdf 24 * http://www.t11.org/ftp/t11/pub/fc/bb-5/08-543v1.pdf
25 * and T11 FC-BB-6 10-019v4.pdf (June 2010 VN2VN proposal)
23 */ 26 */
24 27
25#define FIP_DEF_PRI 128 /* default selection priority */ 28#define FIP_DEF_PRI 128 /* default selection priority */
@@ -29,11 +32,24 @@
29#define FIP_FCF_FUZZ 100 /* random time added by FCF (mS) */ 32#define FIP_FCF_FUZZ 100 /* random time added by FCF (mS) */
30 33
31/* 34/*
35 * VN2VN proposed-standard values.
36 */
37#define FIP_VN_FC_MAP 0x0efd00 /* MAC OUI for VN2VN use */
38#define FIP_VN_PROBE_WAIT 100 /* interval between VN2VN probes (ms) */
39#define FIP_VN_ANN_WAIT 400 /* interval between VN2VN announcements (ms) */
40#define FIP_VN_RLIM_INT 10000 /* interval between probes when rate limited */
41#define FIP_VN_RLIM_COUNT 10 /* number of probes before rate limiting */
42#define FIP_VN_BEACON_INT 8000 /* interval between VN2VN beacons */
43#define FIP_VN_BEACON_FUZZ 100 /* random time to add to beacon period (ms) */
44
45/*
32 * Multicast MAC addresses. T11-adopted. 46 * Multicast MAC addresses. T11-adopted.
33 */ 47 */
34#define FIP_ALL_FCOE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 0 }) 48#define FIP_ALL_FCOE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 0 })
35#define FIP_ALL_ENODE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 1 }) 49#define FIP_ALL_ENODE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 1 })
36#define FIP_ALL_FCF_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 2 }) 50#define FIP_ALL_FCF_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 2 })
51#define FIP_ALL_VN2VN_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 4 })
52#define FIP_ALL_P2P_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 5 })
37 53
38#define FIP_VER 1 /* version for fip_header */ 54#define FIP_VER 1 /* version for fip_header */
39 55
@@ -60,6 +76,7 @@ enum fip_opcode {
60 FIP_OP_LS = 2, /* Link Service request or reply */ 76 FIP_OP_LS = 2, /* Link Service request or reply */
61 FIP_OP_CTRL = 3, /* Keep Alive / Link Reset */ 77 FIP_OP_CTRL = 3, /* Keep Alive / Link Reset */
62 FIP_OP_VLAN = 4, /* VLAN discovery */ 78 FIP_OP_VLAN = 4, /* VLAN discovery */
79 FIP_OP_VN2VN = 5, /* VN2VN operation */
63 FIP_OP_VENDOR_MIN = 0xfff8, /* min vendor-specific opcode */ 80 FIP_OP_VENDOR_MIN = 0xfff8, /* min vendor-specific opcode */
64 FIP_OP_VENDOR_MAX = 0xfffe, /* max vendor-specific opcode */ 81 FIP_OP_VENDOR_MAX = 0xfffe, /* max vendor-specific opcode */
65}; 82};
@@ -97,11 +114,23 @@ enum fip_vlan_subcode {
97}; 114};
98 115
99/* 116/*
117 * Subcodes for FIP_OP_VN2VN.
118 */
119enum fip_vn2vn_subcode {
120 FIP_SC_VN_PROBE_REQ = 1, /* probe request */
121 FIP_SC_VN_PROBE_REP = 2, /* probe reply */
122 FIP_SC_VN_CLAIM_NOTIFY = 3, /* claim notification */
123 FIP_SC_VN_CLAIM_REP = 4, /* claim response */
124 FIP_SC_VN_BEACON = 5, /* beacon */
125};
126
127/*
100 * flags in header fip_flags. 128 * flags in header fip_flags.
101 */ 129 */
102enum fip_flag { 130enum fip_flag {
103 FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */ 131 FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */
104 FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */ 132 FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */
133 FIP_FL_REC_OR_P2P = 0x0008, /* configured addr or point-to-point */
105 FIP_FL_AVAIL = 0x0004, /* available for FLOGI/ELP */ 134 FIP_FL_AVAIL = 0x0004, /* available for FLOGI/ELP */
106 FIP_FL_SOL = 0x0002, /* this is a solicited message */ 135 FIP_FL_SOL = 0x0002, /* this is a solicited message */
107 FIP_FL_FPORT = 0x0001, /* sent from an F port */ 136 FIP_FL_FPORT = 0x0001, /* sent from an F port */
@@ -130,6 +159,7 @@ enum fip_desc_type {
130 FIP_DT_FKA = 12, /* advertisement keep-alive period */ 159 FIP_DT_FKA = 12, /* advertisement keep-alive period */
131 FIP_DT_VENDOR = 13, /* vendor ID */ 160 FIP_DT_VENDOR = 13, /* vendor ID */
132 FIP_DT_VLAN = 14, /* vlan number */ 161 FIP_DT_VLAN = 14, /* vlan number */
162 FIP_DT_FC4F = 15, /* FC-4 features */
133 FIP_DT_LIMIT, /* max defined desc_type + 1 */ 163 FIP_DT_LIMIT, /* max defined desc_type + 1 */
134 FIP_DT_VENDOR_BASE = 128, /* first vendor-specific desc_type */ 164 FIP_DT_VENDOR_BASE = 128, /* first vendor-specific desc_type */
135}; 165};
@@ -229,6 +259,16 @@ enum fip_fka_flags {
229/* FIP_DT_FKA flags */ 259/* FIP_DT_FKA flags */
230 260
231/* 261/*
262 * FIP_DT_FC4F - FC-4 features.
263 */
264struct fip_fc4_feat {
265 struct fip_desc fd_desc;
266 __u8 fd_resvd[2];
267 struct fc_ns_fts fd_fts;
268 struct fc_ns_ff fd_ff;
269} __attribute__((packed));
270
271/*
232 * FIP_DT_VENDOR descriptor. 272 * FIP_DT_VENDOR descriptor.
233 */ 273 */
234struct fip_vendor_desc { 274struct fip_vendor_desc {