scsi: lpfc: Log discarded and insufficient RQE buffer events

An RCQE with statuses indicating that an RQE is dropped or when there
are insufficient buffers to receive new RQEs are currently occuring
silently.  Add a new log message to warn when such events occur.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://patch.msgid.link/20260212213008.149873-3-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Justin Tee 2026-02-12 13:29:57 -08:00 committed by Martin K. Petersen
parent 8ecb3ec244
commit b4082ac8e6
2 changed files with 18 additions and 4 deletions

View File

@ -1,7 +1,7 @@
/*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
* Fibre Channel Host Bus Adapters. *
* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term *
* Broadcom refers to Broadcom Inc. and/or its subsidiaries. *
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
* EMULEX and SLI are trademarks of Emulex. *
@ -14736,11 +14736,22 @@ lpfc_sli4_sp_handle_rcqe(struct lpfc_hba *phba, struct lpfc_rcqe *rcqe)
atomic_read(&tgtp->rcv_fcp_cmd_out),
atomic_read(&tgtp->xmt_fcp_release));
}
hrq->RQ_discard_frm++;
fallthrough;
case FC_STATUS_INSUFF_BUF_NEED_BUF:
/* Unexpected event - bump the counter for support. */
hrq->RQ_no_posted_buf++;
/* Post more buffers if possible */
lpfc_log_msg(phba, KERN_WARNING,
LOG_ELS | LOG_DISCOVERY | LOG_SLI,
"6423 RQE completion Status x%x, needed x%x "
"discarded x%x\n", status,
hrq->RQ_no_posted_buf - hrq->RQ_discard_frm,
hrq->RQ_discard_frm);
/* For SLI3, post more buffers if possible. No action for SLI4.
* SLI4 is reposting immediately after processing the RQE.
*/
set_bit(HBA_POST_RECEIVE_BUFFER, &phba->hba_flag);
workposted = true;
break;

View File

@ -1,7 +1,7 @@
/*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
* Fibre Channel Host Bus Adapters. *
* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term *
* Broadcom refers to Broadcom Inc. and/or its subsidiaries. *
* Copyright (C) 2009-2016 Emulex. All rights reserved. *
* EMULEX and SLI are trademarks of Emulex. *
@ -246,6 +246,8 @@ struct lpfc_queue {
uint32_t q_cnt_2;
uint32_t q_cnt_3;
uint64_t q_cnt_4;
uint32_t q_cnt_5;
/* defines for EQ stats */
#define EQ_max_eqe q_cnt_1
#define EQ_no_entry q_cnt_2
@ -268,6 +270,7 @@ struct lpfc_queue {
#define RQ_no_buf_found q_cnt_2
#define RQ_buf_posted q_cnt_3
#define RQ_rcv_buf q_cnt_4
#define RQ_discard_frm q_cnt_5
struct work_struct irqwork;
struct work_struct spwork;