aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-11-30 19:20:07 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:33 -0500
commit981c1154b240ee77133a478fcd3853ac18111672 (patch)
tree5df76658bb23e1c5733715a5d6c369139f17dbea /drivers/scsi/fcoe
parent9069f5c433e402be5707f37f3d0dfb376659c1e4 (diff)
[SCSI] libfcoe: reorder FCF list to put latest advertiser first
When there are several FCFs to choose from, the one most likely to accept a FLOGI on certian switches is the one that last answered a multicast solicit. So, when receiving an advertisement, move the FCF to the front of the list so that it gets chosen first among those with the same priority. Without this, more FLOGIs need to be sent in a test with multiple FCFs and a switch in NPV mode, but it still eventually finds one that accepts the FLOGI. 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 'drivers/scsi/fcoe')
-rw-r--r--drivers/scsi/fcoe/libfcoe.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index dcccb0bf3170..1a0bb230dd03 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -1000,6 +1000,17 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb)
1000 fcoe_ctlr_solicit(fip, NULL); 1000 fcoe_ctlr_solicit(fip, NULL);
1001 1001
1002 /* 1002 /*
1003 * Put this FCF at the head of the list for priority among equals.
1004 * This helps in the case of an NPV switch which insists we use
1005 * the FCF that answers multicast solicitations, not the others that
1006 * are sending periodic multicast advertisements.
1007 */
1008 if (mtu_valid) {
1009 list_del(&fcf->list);
1010 list_add(&fcf->list, &fip->fcfs);
1011 }
1012
1013 /*
1003 * If this is the first validated FCF, note the time and 1014 * If this is the first validated FCF, note the time and
1004 * set a timer to trigger selection. 1015 * set a timer to trigger selection.
1005 */ 1016 */