Commit 2ec8493f authored by Yi Zou's avatar Yi Zou Committed by James Bottomley

[SCSI] libfcoe: add tracking FIP Virtual Link Failure count

Add tracking the Virtual Link Failure count when either we have found
the FCF as "aged" or we are receiving FIP Clear Virtual Link from the
FCF.
Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 8cdffdcc
...@@ -578,6 +578,7 @@ static void fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip) ...@@ -578,6 +578,7 @@ static void fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip)
WARN_ON(!fip->fcf_count); WARN_ON(!fip->fcf_count);
fip->fcf_count--; fip->fcf_count--;
kfree(fcf); kfree(fcf);
fc_lport_get_stats(fip->lp)->VLinkFailureCount++;
} else if (fcoe_ctlr_mtu_valid(fcf) && } else if (fcoe_ctlr_mtu_valid(fcf) &&
(!sel_time || time_before(sel_time, fcf->time))) { (!sel_time || time_before(sel_time, fcf->time))) {
sel_time = fcf->time; sel_time = fcf->time;
...@@ -990,6 +991,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, ...@@ -990,6 +991,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip,
LIBFCOE_FIP_DBG(fip, "performing Clear Virtual Link\n"); LIBFCOE_FIP_DBG(fip, "performing Clear Virtual Link\n");
spin_lock_bh(&fip->lock); spin_lock_bh(&fip->lock);
fc_lport_get_stats(lport)->VLinkFailureCount++;
fcoe_ctlr_reset(fip); fcoe_ctlr_reset(fip);
spin_unlock_bh(&fip->lock); spin_unlock_bh(&fip->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment