Yi Zou wrote:
> Update VLinkFailureCount in fcoe_dev_stats
> 
> Signed-off-by: Yi Zou <[email protected]>
> ---
> 
>  drivers/scsi/fcoe/libfcoe.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
> index a3745a2..6174598 100644
> --- a/drivers/scsi/fcoe/libfcoe.c
> +++ b/drivers/scsi/fcoe/libfcoe.c
> @@ -578,6 +578,7 @@ static void fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip)
>                       WARN_ON(!fip->fcf_count);
>                       fip->fcf_count--;
>                       kfree(fcf);
> +                     fc_lport_get_stats(fip->lp)->VLinkFailureCount++;
>               } else if (fcoe_ctlr_mtu_valid(fcf) &&
>                          (!sel_time || time_before(sel_time, fcf->time))) {
>                       sel_time = fcf->time;
> @@ -989,6 +990,8 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr 
> *fip,
>       } else {
>               LIBFCOE_FIP_DBG(fip, "performing Clear Virtual Link\n");
>  
> +             fc_lport_get_stats(lport)->VLinkFailureCount++;

Maybe this should get incremented only once in fc_linkdown() so that
it is correct for non-FIP mode as well as FIP, and so it's only decremented
once per link-down event?  Not sure I understand the spec for the stat, though.

> +
>               spin_lock_bh(&fip->lock);
>               fcoe_ctlr_reset(fip);
>               spin_unlock_bh(&fip->lock);
> 
> _______________________________________________
> devel mailing list
> [email protected]
> http://www.open-fcoe.org/mailman/listinfo/devel

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to