aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libfcoe.h
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-11-30 19:19:56 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:32 -0500
commit794d98e77f5901ceded697f1633463e88f078038 (patch)
tree97ac82ba7b14821472f81400f8d1a7230e037cb7 /include/scsi/libfcoe.h
parentb69ae0ae3f322d9a6bc4e209049b5b6e193ad652 (diff)
[SCSI] libfcoe: retry rejected FLOGI to another FCF if possible
Switches using multiple-FCFs may reject FLOGI in order to balance the load between multiple FCFs. Even though the FCF was available, it may have more load at the point we actually send the FLOGI. If the FLOGI fails, select a different FCF if possible, among those with the same priority. If no other FCF is available, just deliver the reject to libfc for retry. 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/libfcoe.h')
-rw-r--r--include/scsi/libfcoe.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index 06f1b5a8ed19..feb6a94c90ea 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -92,10 +92,12 @@ enum fip_state {
92 * @timer_work: &work_struct for doing keep-alives and resets. 92 * @timer_work: &work_struct for doing keep-alives and resets.
93 * @recv_work: &work_struct for receiving FIP frames. 93 * @recv_work: &work_struct for receiving FIP frames.
94 * @fip_recv_list: list of received FIP frames. 94 * @fip_recv_list: list of received FIP frames.
95 * @flogi_req: clone of FLOGI request sent
95 * @rnd_state: state for pseudo-random number generator. 96 * @rnd_state: state for pseudo-random number generator.
96 * @port_id: proposed or selected local-port ID. 97 * @port_id: proposed or selected local-port ID.
97 * @user_mfs: configured maximum FC frame size, including FC header. 98 * @user_mfs: configured maximum FC frame size, including FC header.
98 * @flogi_oxid: exchange ID of most recent fabric login. 99 * @flogi_oxid: exchange ID of most recent fabric login.
100 * @flogi_req_send: send of FLOGI requested
99 * @flogi_count: number of FLOGI attempts in AUTO mode. 101 * @flogi_count: number of FLOGI attempts in AUTO mode.
100 * @map_dest: use the FC_MAP mode for destination MAC addresses. 102 * @map_dest: use the FC_MAP mode for destination MAC addresses.
101 * @spma: supports SPMA server-provided MACs mode 103 * @spma: supports SPMA server-provided MACs mode
@@ -106,6 +108,7 @@ enum fip_state {
106 * @update_mac: LLD-supplied function to handle changes to MAC addresses. 108 * @update_mac: LLD-supplied function to handle changes to MAC addresses.
107 * @get_src_addr: LLD-supplied function to supply a source MAC address. 109 * @get_src_addr: LLD-supplied function to supply a source MAC address.
108 * @ctlr_mutex: lock protecting this structure. 110 * @ctlr_mutex: lock protecting this structure.
111 * @ctlr_lock: spinlock covering flogi_req
109 * 112 *
110 * This structure is used by all FCoE drivers. It contains information 113 * This structure is used by all FCoE drivers. It contains information
111 * needed by all FCoE low-level drivers (LLDs) as well as internal state 114 * needed by all FCoE low-level drivers (LLDs) as well as internal state
@@ -126,12 +129,14 @@ struct fcoe_ctlr {
126 struct work_struct timer_work; 129 struct work_struct timer_work;
127 struct work_struct recv_work; 130 struct work_struct recv_work;
128 struct sk_buff_head fip_recv_list; 131 struct sk_buff_head fip_recv_list;
132 struct sk_buff *flogi_req;
129 133
130 struct rnd_state rnd_state; 134 struct rnd_state rnd_state;
131 u32 port_id; 135 u32 port_id;
132 136
133 u16 user_mfs; 137 u16 user_mfs;
134 u16 flogi_oxid; 138 u16 flogi_oxid;
139 u8 flogi_req_send;
135 u8 flogi_count; 140 u8 flogi_count;
136 u8 map_dest; 141 u8 map_dest;
137 u8 spma; 142 u8 spma;
@@ -143,6 +148,7 @@ struct fcoe_ctlr {
143 void (*update_mac)(struct fc_lport *, u8 *addr); 148 void (*update_mac)(struct fc_lport *, u8 *addr);
144 u8 * (*get_src_addr)(struct fc_lport *); 149 u8 * (*get_src_addr)(struct fc_lport *);
145 struct mutex ctlr_mutex; 150 struct mutex ctlr_mutex;
151 spinlock_t ctlr_lock;
146}; 152};
147 153
148/** 154/**
@@ -155,6 +161,7 @@ struct fcoe_ctlr {
155 * @fcf_mac: Ethernet address of the FCF 161 * @fcf_mac: Ethernet address of the FCF
156 * @vfid: virtual fabric ID 162 * @vfid: virtual fabric ID
157 * @pri: selection priority, smaller values are better 163 * @pri: selection priority, smaller values are better
164 * @flogi_sent: current FLOGI sent to this FCF
158 * @flags: flags received from advertisement 165 * @flags: flags received from advertisement
159 * @fka_period: keep-alive period, in jiffies 166 * @fka_period: keep-alive period, in jiffies
160 * 167 *
@@ -176,6 +183,7 @@ struct fcoe_fcf {
176 u8 fcf_mac[ETH_ALEN]; 183 u8 fcf_mac[ETH_ALEN];
177 184
178 u8 pri; 185 u8 pri;
186 u8 flogi_sent;
179 u16 flags; 187 u16 flags;
180 u32 fka_period; 188 u32 fka_period;
181 u8 fd_flags:1; 189 u8 fd_flags:1;