Skip to content

Commit edcbb43

Browse files
Joe EykholtJames Bottomley
authored andcommitted
[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>
1 parent f60e12e commit edcbb43

2 files changed

Lines changed: 50 additions & 3 deletions

File tree

include/scsi/fc/fc_fip.h

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@
1717
#ifndef _FC_FIP_H_
1818
#define _FC_FIP_H_
1919

20+
#include <scsi/fc/fc_ns.h>
21+
2022
/*
2123
* This version is based on:
2224
* 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)
2326
*/
2427

2528
#define FIP_DEF_PRI 128 /* default selection priority */
@@ -28,12 +31,25 @@
2831
#define FIP_VN_KA_PERIOD 90000 /* required VN_port keep-alive period (mS) */
2932
#define FIP_FCF_FUZZ 100 /* random time added by FCF (mS) */
3033

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+
3145
/*
3246
* Multicast MAC addresses. T11-adopted.
3347
*/
34-
#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 })
36-
#define FIP_ALL_FCF_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 2 })
48+
#define FIP_ALL_FCOE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 0 })
49+
#define FIP_ALL_ENODE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 1 })
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 })
3753

3854
#define FIP_VER 1 /* version for fip_header */
3955

@@ -60,6 +76,7 @@ enum fip_opcode {
6076
FIP_OP_LS = 2, /* Link Service request or reply */
6177
FIP_OP_CTRL = 3, /* Keep Alive / Link Reset */
6278
FIP_OP_VLAN = 4, /* VLAN discovery */
79+
FIP_OP_VN2VN = 5, /* VN2VN operation */
6380
FIP_OP_VENDOR_MIN = 0xfff8, /* min vendor-specific opcode */
6481
FIP_OP_VENDOR_MAX = 0xfffe, /* max vendor-specific opcode */
6582
};
@@ -96,12 +113,24 @@ enum fip_vlan_subcode {
96113
FIP_SC_VL_REP = 2, /* reply */
97114
};
98115

116+
/*
117+
* Subcodes for FIP_OP_VN2VN.
118+
*/
119+
enum 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+
99127
/*
100128
* flags in header fip_flags.
101129
*/
102130
enum fip_flag {
103131
FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */
104132
FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */
133+
FIP_FL_REC_OR_P2P = 0x0008, /* configured addr or point-to-point */
105134
FIP_FL_AVAIL = 0x0004, /* available for FLOGI/ELP */
106135
FIP_FL_SOL = 0x0002, /* this is a solicited message */
107136
FIP_FL_FPORT = 0x0001, /* sent from an F port */
@@ -130,6 +159,7 @@ enum fip_desc_type {
130159
FIP_DT_FKA = 12, /* advertisement keep-alive period */
131160
FIP_DT_VENDOR = 13, /* vendor ID */
132161
FIP_DT_VLAN = 14, /* vlan number */
162+
FIP_DT_FC4F = 15, /* FC-4 features */
133163
FIP_DT_LIMIT, /* max defined desc_type + 1 */
134164
FIP_DT_VENDOR_BASE = 128, /* first vendor-specific desc_type */
135165
};
@@ -228,6 +258,16 @@ enum fip_fka_flags {
228258

229259
/* FIP_DT_FKA flags */
230260

261+
/*
262+
* FIP_DT_FC4F - FC-4 features.
263+
*/
264+
struct 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+
231271
/*
232272
* FIP_DT_VENDOR descriptor.
233273
*/

include/scsi/fc/fc_ns.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ struct fc_ns_fts {
9999
__be32 ff_type_map[FC_NS_TYPES / FC_NS_BPW]; /* bitmap of FC-4 types */
100100
};
101101

102+
/*
103+
* FC4-features object.
104+
*/
105+
struct fc_ns_ff {
106+
__be32 fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW]; /* 4-bits per FC-type */
107+
};
108+
102109
/*
103110
* GID_PT request.
104111
*/

0 commit comments

Comments
 (0)