diff mbox series

[09/17] lpfc: Save FPIN frequency statistics upon receipt of peer cgn notifications

Message ID 20240131003549.147784-10-justintee8345@gmail.com
State New
Headers show
Series lpfc: Update lpfc to revision 14.4.0.0 | expand

Commit Message

Justin Tee Jan. 31, 2024, 12:35 a.m. UTC
FPIN frequency is provided by the fabric in peer congestion notifications.

Currently, the frequency is only logged in a message, but it should also be
saved into the phba's cgn_fpin statistics member for proper application
functionality.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
---
 drivers/scsi/lpfc/lpfc_els.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Himanshu Madhani Jan. 31, 2024, 2:39 a.m. UTC | #1
On 1/30/24 16:35, Justin Tee wrote:
> FPIN frequency is provided by the fabric in peer congestion notifications.
> 
> Currently, the frequency is only logged in a message, but it should also be
> saved into the phba's cgn_fpin statistics member for proper application
> functionality.
> 
> Signed-off-by: Justin Tee <justin.tee@broadcom.com>
> ---
>   drivers/scsi/lpfc/lpfc_els.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
> index a17c66e31637..1ada8ba6cc2a 100644
> --- a/drivers/scsi/lpfc/lpfc_els.c
> +++ b/drivers/scsi/lpfc/lpfc_els.c
> @@ -10131,6 +10131,9 @@ lpfc_els_rcv_fpin_peer_cgn(struct lpfc_hba *phba, struct fc_tlv_desc *tlv)
>   	pc_evt_str = lpfc_get_fpin_congn_event_nm(pc_evt);
>   	cnt = be32_to_cpu(pc->pname_count);
>   
> +	/* Capture FPIN frequency */
> +	phba->cgn_fpin_frequency = be32_to_cpu(pc->event_period);
> +
>   	lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT | LOG_ELS,
>   			"4684 FPIN Peer Congestion %s (x%x) "
>   			"Duration %d mSecs "

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index a17c66e31637..1ada8ba6cc2a 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -10131,6 +10131,9 @@  lpfc_els_rcv_fpin_peer_cgn(struct lpfc_hba *phba, struct fc_tlv_desc *tlv)
 	pc_evt_str = lpfc_get_fpin_congn_event_nm(pc_evt);
 	cnt = be32_to_cpu(pc->pname_count);
 
+	/* Capture FPIN frequency */
+	phba->cgn_fpin_frequency = be32_to_cpu(pc->event_period);
+
 	lpfc_printf_log(phba, KERN_INFO, LOG_CGN_MGMT | LOG_ELS,
 			"4684 FPIN Peer Congestion %s (x%x) "
 			"Duration %d mSecs "