提交 981c1154 编写于 作者: J Joe Eykholt 提交者: James Bottomley

[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: NJoe Eykholt <jeykholt@cisco.com>
Signed-off-by: NRobert Love <robert.w.love@intel.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 9069f5c4
......@@ -999,6 +999,17 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb)
if (first && time_after(jiffies, fip->sol_time + sol_tov))
fcoe_ctlr_solicit(fip, NULL);
/*
* Put this FCF at the head of the list for priority among equals.
* This helps in the case of an NPV switch which insists we use
* the FCF that answers multicast solicitations, not the others that
* are sending periodic multicast advertisements.
*/
if (mtu_valid) {
list_del(&fcf->list);
list_add(&fcf->list, &fip->fcfs);
}
/*
* If this is the first validated FCF, note the time and
* set a timer to trigger selection.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册