Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Joe Eykholt and committed by
James Bottomley
edcbb439 f60e12e9

+50 -3
+43 -3
include/scsi/fc/fc_fip.h
··· 17 17 #ifndef _FC_FIP_H_ 18 18 #define _FC_FIP_H_ 19 19 20 + #include <scsi/fc/fc_ns.h> 21 + 20 22 /* 21 23 * This version is based on: 22 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 28 #define FIP_DEF_PRI 128 /* default selection priority */ ··· 32 29 #define FIP_FCF_FUZZ 100 /* random time added by FCF (mS) */ 33 30 34 31 /* 32 + * VN2VN proposed-standard values. 33 + */ 34 + #define FIP_VN_FC_MAP 0x0efd00 /* MAC OUI for VN2VN use */ 35 + #define FIP_VN_PROBE_WAIT 100 /* interval between VN2VN probes (ms) */ 36 + #define FIP_VN_ANN_WAIT 400 /* interval between VN2VN announcements (ms) */ 37 + #define FIP_VN_RLIM_INT 10000 /* interval between probes when rate limited */ 38 + #define FIP_VN_RLIM_COUNT 10 /* number of probes before rate limiting */ 39 + #define FIP_VN_BEACON_INT 8000 /* interval between VN2VN beacons */ 40 + #define FIP_VN_BEACON_FUZZ 100 /* random time to add to beacon period (ms) */ 41 + 42 + /* 35 43 * Multicast MAC addresses. T11-adopted. 36 44 */ 37 - #define FIP_ALL_FCOE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 0 }) 38 - #define FIP_ALL_ENODE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 1 }) 39 - #define FIP_ALL_FCF_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 2 }) 45 + #define FIP_ALL_FCOE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 0 }) 46 + #define FIP_ALL_ENODE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 1 }) 47 + #define FIP_ALL_FCF_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 2 }) 48 + #define FIP_ALL_VN2VN_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 4 }) 49 + #define FIP_ALL_P2P_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 5 }) 40 50 41 51 #define FIP_VER 1 /* version for fip_header */ 42 52 ··· 76 60 FIP_OP_LS = 2, /* Link Service request or reply */ 77 61 FIP_OP_CTRL = 3, /* Keep Alive / Link Reset */ 78 62 FIP_OP_VLAN = 4, /* VLAN discovery */ 63 + FIP_OP_VN2VN = 5, /* VN2VN operation */ 79 64 FIP_OP_VENDOR_MIN = 0xfff8, /* min vendor-specific opcode */ 80 65 FIP_OP_VENDOR_MAX = 0xfffe, /* max vendor-specific opcode */ 81 66 }; ··· 114 97 }; 115 98 116 99 /* 100 + * Subcodes for FIP_OP_VN2VN. 101 + */ 102 + enum fip_vn2vn_subcode { 103 + FIP_SC_VN_PROBE_REQ = 1, /* probe request */ 104 + FIP_SC_VN_PROBE_REP = 2, /* probe reply */ 105 + FIP_SC_VN_CLAIM_NOTIFY = 3, /* claim notification */ 106 + FIP_SC_VN_CLAIM_REP = 4, /* claim response */ 107 + FIP_SC_VN_BEACON = 5, /* beacon */ 108 + }; 109 + 110 + /* 117 111 * flags in header fip_flags. 118 112 */ 119 113 enum fip_flag { 120 114 FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */ 121 115 FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */ 116 + FIP_FL_REC_OR_P2P = 0x0008, /* configured addr or point-to-point */ 122 117 FIP_FL_AVAIL = 0x0004, /* available for FLOGI/ELP */ 123 118 FIP_FL_SOL = 0x0002, /* this is a solicited message */ 124 119 FIP_FL_FPORT = 0x0001, /* sent from an F port */ ··· 159 130 FIP_DT_FKA = 12, /* advertisement keep-alive period */ 160 131 FIP_DT_VENDOR = 13, /* vendor ID */ 161 132 FIP_DT_VLAN = 14, /* vlan number */ 133 + FIP_DT_FC4F = 15, /* FC-4 features */ 162 134 FIP_DT_LIMIT, /* max defined desc_type + 1 */ 163 135 FIP_DT_VENDOR_BASE = 128, /* first vendor-specific desc_type */ 164 136 }; ··· 257 227 }; 258 228 259 229 /* FIP_DT_FKA flags */ 230 + 231 + /* 232 + * FIP_DT_FC4F - FC-4 features. 233 + */ 234 + struct fip_fc4_feat { 235 + struct fip_desc fd_desc; 236 + __u8 fd_resvd[2]; 237 + struct fc_ns_fts fd_fts; 238 + struct fc_ns_ff fd_ff; 239 + } __attribute__((packed)); 260 240 261 241 /* 262 242 * FIP_DT_VENDOR descriptor.
+7
include/scsi/fc/fc_ns.h
··· 100 100 }; 101 101 102 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 + 109 + /* 103 110 * GID_PT request. 104 111 */ 105 112 struct fc_ns_gid_pt {