Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204262
b: refs/heads/master
c: edcbb43
h: refs/heads/master
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Jul 28, 2010
1 parent 2ba5967 commit 32708e5
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f60e12e9c778c8256a646f80603d1b88ba5ce891
refs/heads/master: edcbb4395ecd2f2731fbf38ecbff5be0316513cb
46 changes: 43 additions & 3 deletions trunk/include/scsi/fc/fc_fip.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
#ifndef _FC_FIP_H_
#define _FC_FIP_H_

#include <scsi/fc/fc_ns.h>

/*
* This version is based on:
* http://www.t11.org/ftp/t11/pub/fc/bb-5/08-543v1.pdf
* and T11 FC-BB-6 10-019v4.pdf (June 2010 VN2VN proposal)
*/

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

/*
* VN2VN proposed-standard values.
*/
#define FIP_VN_FC_MAP 0x0efd00 /* MAC OUI for VN2VN use */
#define FIP_VN_PROBE_WAIT 100 /* interval between VN2VN probes (ms) */
#define FIP_VN_ANN_WAIT 400 /* interval between VN2VN announcements (ms) */
#define FIP_VN_RLIM_INT 10000 /* interval between probes when rate limited */
#define FIP_VN_RLIM_COUNT 10 /* number of probes before rate limiting */
#define FIP_VN_BEACON_INT 8000 /* interval between VN2VN beacons */
#define FIP_VN_BEACON_FUZZ 100 /* random time to add to beacon period (ms) */

/*
* Multicast MAC addresses. T11-adopted.
*/
#define FIP_ALL_FCOE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 0 })
#define FIP_ALL_ENODE_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 1 })
#define FIP_ALL_FCF_MACS ((u8[6]) { 1, 0x10, 0x18, 1, 0, 2 })
#define FIP_ALL_FCOE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 0 })
#define FIP_ALL_ENODE_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 1 })
#define FIP_ALL_FCF_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 2 })
#define FIP_ALL_VN2VN_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 4 })
#define FIP_ALL_P2P_MACS ((__u8[6]) { 1, 0x10, 0x18, 1, 0, 5 })

#define FIP_VER 1 /* version for fip_header */

Expand All @@ -60,6 +76,7 @@ enum fip_opcode {
FIP_OP_LS = 2, /* Link Service request or reply */
FIP_OP_CTRL = 3, /* Keep Alive / Link Reset */
FIP_OP_VLAN = 4, /* VLAN discovery */
FIP_OP_VN2VN = 5, /* VN2VN operation */
FIP_OP_VENDOR_MIN = 0xfff8, /* min vendor-specific opcode */
FIP_OP_VENDOR_MAX = 0xfffe, /* max vendor-specific opcode */
};
Expand Down Expand Up @@ -96,12 +113,24 @@ enum fip_vlan_subcode {
FIP_SC_VL_REP = 2, /* reply */
};

/*
* Subcodes for FIP_OP_VN2VN.
*/
enum fip_vn2vn_subcode {
FIP_SC_VN_PROBE_REQ = 1, /* probe request */
FIP_SC_VN_PROBE_REP = 2, /* probe reply */
FIP_SC_VN_CLAIM_NOTIFY = 3, /* claim notification */
FIP_SC_VN_CLAIM_REP = 4, /* claim response */
FIP_SC_VN_BEACON = 5, /* beacon */
};

/*
* flags in header fip_flags.
*/
enum fip_flag {
FIP_FL_FPMA = 0x8000, /* supports FPMA fabric-provided MACs */
FIP_FL_SPMA = 0x4000, /* supports SPMA server-provided MACs */
FIP_FL_REC_OR_P2P = 0x0008, /* configured addr or point-to-point */
FIP_FL_AVAIL = 0x0004, /* available for FLOGI/ELP */
FIP_FL_SOL = 0x0002, /* this is a solicited message */
FIP_FL_FPORT = 0x0001, /* sent from an F port */
Expand Down Expand Up @@ -130,6 +159,7 @@ enum fip_desc_type {
FIP_DT_FKA = 12, /* advertisement keep-alive period */
FIP_DT_VENDOR = 13, /* vendor ID */
FIP_DT_VLAN = 14, /* vlan number */
FIP_DT_FC4F = 15, /* FC-4 features */
FIP_DT_LIMIT, /* max defined desc_type + 1 */
FIP_DT_VENDOR_BASE = 128, /* first vendor-specific desc_type */
};
Expand Down Expand Up @@ -228,6 +258,16 @@ enum fip_fka_flags {

/* FIP_DT_FKA flags */

/*
* FIP_DT_FC4F - FC-4 features.
*/
struct fip_fc4_feat {
struct fip_desc fd_desc;
__u8 fd_resvd[2];
struct fc_ns_fts fd_fts;
struct fc_ns_ff fd_ff;
} __attribute__((packed));

/*
* FIP_DT_VENDOR descriptor.
*/
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/scsi/fc/fc_ns.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ struct fc_ns_fts {
__be32 ff_type_map[FC_NS_TYPES / FC_NS_BPW]; /* bitmap of FC-4 types */
};

/*
* FC4-features object.
*/
struct fc_ns_ff {
__be32 fd_feat[FC_NS_TYPES * 4 / FC_NS_BPW]; /* 4-bits per FC-type */
};

/*
* GID_PT request.
*/
Expand Down

0 comments on commit 32708e5

Please sign in to comment.