All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <james.smart@broadcom.com>
To: Nilesh Javali <njavali@marvell.com>, Shyam Sundar <ssundar@marvell.com>
Cc: linux-scsi@vger.kernel.org,
	GR-QLogic-Storage-Upstream@marvell.com,
	Himanshu Madhani <himanshu.madhani@oracle.com>
Subject: scsi_transport_fc: FPIN LI statistics
Date: Fri, 28 May 2021 14:49:32 -0700	[thread overview]
Message-ID: <b472606d-e67c-66f1-06d1-ecc5fbb2071a@broadcom.com> (raw)
In-Reply-To: <20201021092715.22669-4-njavali@marvell.com>

[-- Attachment #1: Type: text/plain, Size: 2615 bytes --]

Nilesh, Shyam,

I'm looking at commit 3dcfe0de5a97.  When we increment stats, we are 
incrementing by the event_count:
> +static void
> +fc_li_stats_update(struct fc_fn_li_desc *li_desc,
> +		   struct fc_fpin_stats *stats)
> +{
> +	stats->li += be32_to_cpu(li_desc->event_count);
> +	switch (be16_to_cpu(li_desc->event_type)) {
> +	case FPIN_LI_UNKNOWN:
> +		stats->li_failure_unknown +=
> +		    be32_to_cpu(li_desc->event_count);
> +		break;
> +	case FPIN_LI_LINK_FAILURE:
> +		stats->li_link_failure_count +=
> +		    be32_to_cpu(li_desc->event_count);
> +		break;
> +	case FPIN_LI_LOSS_OF_SYNC:
> +		stats->li_loss_of_sync_count +=
> +		    be32_to_cpu(li_desc->event_count);
> +		break;
> +	case FPIN_LI_LOSS_OF_SIG:
> +		stats->li_loss_of_signals_count +=
> +		    be32_to_cpu(li_desc->event_count);
> +		break;
> +	case FPIN_LI_PRIM_SEQ_ERR:
> +		stats->li_prim_seq_err_count +=
> +		    be32_to_cpu(li_desc->event_count);
> +		break;
> +	case FPIN_LI_INVALID_TX_WD:
> +		stats->li_invalid_tx_word_count +=
> +		    be32_to_cpu(li_desc->event_count);
> +		break;
> +	case FPIN_LI_INVALID_CRC:
> +		stats->li_invalid_crc_count +=
> +		    be32_to_cpu(li_desc->event_count);
> +		break;
> +	case FPIN_LI_DEVICE_SPEC:
> +		stats->li_device_specific +=
> +		    be32_to_cpu(li_desc->event_count);
> +		break;
> +	}
> +}

I'm wondering if this is really what we want.   Event_count is the 
minimum # of events that must occur before an FPIN is sent.  Thus, its 
not the actual number of events, and could be significantly off (low).   
Are we ok with that ?  Do we set the wrong impression with the user 
(here's a count, but its not necessary accurate) ?    Would it be better 
to simply count the # of FPINs (increment by 1 each time) ?

-- james


-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4206 bytes --]

  parent reply	other threads:[~2021-05-28 21:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21  9:27 [PATCH v3 0/5] SAN Congestion Management (SCM) statistics Nilesh Javali
2020-10-21  9:27 ` [PATCH v3 1/5] scsi: fc: Update formal FPIN descriptor definitions Nilesh Javali
2020-10-21 14:46   ` Himanshu Madhani
2020-10-21  9:27 ` [PATCH v3 2/5] scsi: fc: Add FPIN statistics to fc_host and fc_rport objects Nilesh Javali
2020-10-21 14:47   ` Himanshu Madhani
2020-10-21  9:27 ` [PATCH v3 3/5] scsi: fc: Parse FPIN packets and update statistics Nilesh Javali
2020-10-21 14:55   ` Himanshu Madhani
2020-10-21 17:49   ` James Smart
2021-05-28 21:49   ` James Smart [this message]
2020-10-21  9:27 ` [PATCH v3 4/5] scsi: fc: Add mechanism to update FPIN signal statistics Nilesh Javali
2020-10-21 14:56   ` Himanshu Madhani
2020-10-21  9:27 ` [PATCH v3 5/5] scsi: fc: Update documentation of sysfs nodes for FPIN stats Nilesh Javali
2020-10-21 14:57   ` Himanshu Madhani
2020-10-26 22:07 ` [PATCH v3 0/5] SAN Congestion Management (SCM) statistics Martin K. Petersen
2020-11-11  2:59 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b472606d-e67c-66f1-06d1-ecc5fbb2071a@broadcom.com \
    --to=james.smart@broadcom.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=himanshu.madhani@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=njavali@marvell.com \
    --cc=ssundar@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.