[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SJ0PR11MB5896190ABDAC1CF7A3CC53E0C377A@SJ0PR11MB5896.namprd11.prod.outlook.com>
Date: Fri, 13 Jun 2025 21:46:36 +0000
From: "Karan Tilak Kumar (kartilak)" <kartilak@...co.com>
To: John Meneghini <jmeneghi@...hat.com>, "Sesidhar Baddela (sebaddel)"
<sebaddel@...co.com>
CC: "Arulprabhu Ponnusamy (arulponn)" <arulponn@...co.com>, "Dhanraj Jhawar
(djhawar)" <djhawar@...co.com>, "Gian Carlo Boffa (gcboffa)"
<gcboffa@...co.com>, "Masa Kai (mkai2)" <mkai2@...co.com>, "Satish Kharat
(satishkh)" <satishkh@...co.com>, "Arun Easi (aeasi)" <aeasi@...co.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>, "martin.petersen@...cle.com"
<martin.petersen@...cle.com>, "linux-scsi@...r.kernel.org"
<linux-scsi@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "revers@...hat.com" <revers@...hat.com>,
"dan.carpenter@...aro.org" <dan.carpenter@...aro.org>
Subject: RE: [PATCH v4 3/5] scsi: fnic: Add and improve logs in FDMI and FDMI
ABTS paths
On Friday, June 13, 2025 2:05 PM, John Meneghini <jmeneghi@...hat.com> wrote:
>
> Reviewed-by: John Meneghini <jmeneghi@...hat.com>
Thanks for your review.
> On 6/12/25 6:18 PM, Karan Tilak Kumar wrote:
> > Add logs in FDMI and FDMI ABTS paths.
> > Modify log text in these paths.
> >
> > Reviewed-by: Sesidhar Baddela <sebaddel@...co.com>
> > Reviewed-by: Arulprabhu Ponnusamy <arulponn@...co.com>
> > Reviewed-by: Gian Carlo Boffa <gcboffa@...co.com>
> > Reviewed-by: Arun Easi <aeasi@...co.com>
> > Signed-off-by: Karan Tilak Kumar <kartilak@...co.com>
> > ---
> > drivers/scsi/fnic/fdls_disc.c | 65 +++++++++++++++++++++++++++++++----
> > 1 file changed, 58 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/scsi/fnic/fdls_disc.c b/drivers/scsi/fnic/fdls_disc.c
> > index 0ee1b74967b9..9e9939d41fa8 100644
> > --- a/drivers/scsi/fnic/fdls_disc.c
> > +++ b/drivers/scsi/fnic/fdls_disc.c
> > @@ -791,6 +791,7 @@ static uint8_t *fdls_alloc_init_fdmi_abts_frame(struct fnic_iport_s *iport,
> > static void fdls_send_fdmi_abts(struct fnic_iport_s *iport)
> > {
> > uint8_t *frame;
> > + struct fnic *fnic = iport->fnic;
> > unsigned long fdmi_tov;
> > uint16_t frame_size = FNIC_ETH_FCOE_HDRS_OFFSET +
> > sizeof(struct fc_frame_header);
> > @@ -801,6 +802,9 @@ static void fdls_send_fdmi_abts(struct fnic_iport_s *iport)
> > if (frame == NULL)
> > return;
> >
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: FDLS send FDMI PLOGI abts. iport->fabric.state: %d oxid: 0x%x",
> > + iport->fcid, iport->fabric.state, iport->active_oxid_fdmi_plogi);
> > fnic_send_fcoe_frame(iport, frame, frame_size);
> > } else {
> > if (iport->fabric.fdmi_pending & FDLS_FDMI_REG_HBA_PENDING) {
> > @@ -809,6 +813,9 @@ static void fdls_send_fdmi_abts(struct fnic_iport_s *iport)
> > if (frame == NULL)
> > return;
> >
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: FDLS send FDMI RHBA abts. iport->fabric.state: %d oxid: 0x%x",
> > + iport->fcid, iport->fabric.state, iport->active_oxid_fdmi_rhba);
> > fnic_send_fcoe_frame(iport, frame, frame_size);
> > }
> > if (iport->fabric.fdmi_pending & FDLS_FDMI_RPA_PENDING) {
> > @@ -821,6 +828,9 @@ static void fdls_send_fdmi_abts(struct fnic_iport_s *iport)
> > return;
> > }
> >
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: FDLS send FDMI RPA abts. iport->fabric.state: %d oxid: 0x%x",
> > + iport->fcid, iport->fabric.state, iport->active_oxid_fdmi_rpa);
> > fnic_send_fcoe_frame(iport, frame, frame_size);
> > }
> > }
> > @@ -829,6 +839,10 @@ static void fdls_send_fdmi_abts(struct fnic_iport_s *iport)
> > fdmi_tov = jiffies + msecs_to_jiffies(2 * iport->e_d_tov);
> > mod_timer(&iport->fabric.fdmi_timer, round_jiffies(fdmi_tov));
> > iport->fabric.fdmi_pending |= FDLS_FDMI_ABORT_PENDING;
> > +
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: iport->fabric.fdmi_pending: 0x%x",
> > + iport->fcid, iport->fabric.fdmi_pending);
> > }
> >
> > static void fdls_send_fabric_flogi(struct fnic_iport_s *iport)
> > @@ -2292,7 +2306,7 @@ void fdls_fdmi_timer_callback(struct timer_list *t)
> > spin_lock_irqsave(&fnic->fnic_lock, flags);
> >
> > FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > - "fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
> > + "iport->fabric.fdmi_pending: 0x%x\n", iport->fabric.fdmi_pending);
> >
> > if (!iport->fabric.fdmi_pending) {
> > /* timer expired after fdmi responses received. */
> > @@ -2300,7 +2314,7 @@ void fdls_fdmi_timer_callback(struct timer_list *t)
> > return;
> > }
> > FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > - "fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
> > + "iport->fabric.fdmi_pending: 0x%x\n", iport->fabric.fdmi_pending);
> >
> > /* if not abort pending, send an abort */
> > if (!(iport->fabric.fdmi_pending & FDLS_FDMI_ABORT_PENDING)) {
> > @@ -2309,26 +2323,37 @@ void fdls_fdmi_timer_callback(struct timer_list *t)
> > return;
> > }
> > FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > - "fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
> > + "iport->fabric.fdmi_pending: 0x%x\n", iport->fabric.fdmi_pending);
> >
> > /* ABTS pending for an active fdmi request that is pending.
> > * That means FDMI ABTS timed out
> > * Schedule to free the OXID after 2*r_a_tov and proceed
> > */
> > if (iport->fabric.fdmi_pending & FDLS_FDMI_PLOGI_PENDING) {
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "FDMI PLOGI ABTS timed out. Schedule oxid free: 0x%x\n",
> > + iport->active_oxid_fdmi_plogi);
> > fdls_schedule_oxid_free(iport, &iport->active_oxid_fdmi_plogi);
> > } else {
> > - if (iport->fabric.fdmi_pending & FDLS_FDMI_REG_HBA_PENDING)
> > + if (iport->fabric.fdmi_pending & FDLS_FDMI_REG_HBA_PENDING) {
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "FDMI RHBA ABTS timed out. Schedule oxid free: 0x%x\n",
> > + iport->active_oxid_fdmi_rhba);
> > fdls_schedule_oxid_free(iport, &iport->active_oxid_fdmi_rhba);
> > - if (iport->fabric.fdmi_pending & FDLS_FDMI_RPA_PENDING)
> > + }
> > + if (iport->fabric.fdmi_pending & FDLS_FDMI_RPA_PENDING) {
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "FDMI RPA ABTS timed out. Schedule oxid free: 0x%x\n",
> > + iport->active_oxid_fdmi_rpa);
> > fdls_schedule_oxid_free(iport, &iport->active_oxid_fdmi_rpa);
> > + }
> > }
> > FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > - "fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
> > + "iport->fabric.fdmi_pending: 0x%x\n", iport->fabric.fdmi_pending);
> >
> > fdls_fdmi_retry_plogi(iport);
> > FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > - "fdmi timer callback : 0x%x\n", iport->fabric.fdmi_pending);
> > + "iport->fabric.fdmi_pending: 0x%x\n", iport->fabric.fdmi_pending);
> > spin_unlock_irqrestore(&fnic->fnic_lock, flags);
> > }
> >
> > @@ -3743,12 +3768,26 @@ static void fdls_process_fdmi_abts_rsp(struct fnic_iport_s *iport,
> >
> > switch (FNIC_FRAME_TYPE(oxid)) {
> > case FNIC_FRAME_TYPE_FDMI_PLOGI:
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "Received FDMI PLOGI ABTS rsp with oxid: 0x%x", oxid);
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: iport->fabric.fdmi_pending: 0x%x",
> > + iport->fcid, iport->fabric.fdmi_pending);
> > fdls_free_oxid(iport, oxid, &iport->active_oxid_fdmi_plogi);
> >
> > iport->fabric.fdmi_pending &= ~FDLS_FDMI_PLOGI_PENDING;
> > iport->fabric.fdmi_pending &= ~FDLS_FDMI_ABORT_PENDING;
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: iport->fabric.fdmi_pending: 0x%x",
> > + iport->fcid, iport->fabric.fdmi_pending);
> > break;
> > case FNIC_FRAME_TYPE_FDMI_RHBA:
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "Received FDMI RHBA ABTS rsp with oxid: 0x%x", oxid);
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: iport->fabric.fdmi_pending: 0x%x",
> > + iport->fcid, iport->fabric.fdmi_pending);
> > +
> > iport->fabric.fdmi_pending &= ~FDLS_FDMI_REG_HBA_PENDING;
> >
> > /* If RPA is still pending, don't turn off ABORT PENDING.
> > @@ -3759,8 +3798,17 @@ static void fdls_process_fdmi_abts_rsp(struct fnic_iport_s *iport,
> > iport->fabric.fdmi_pending &= ~FDLS_FDMI_ABORT_PENDING;
> >
> > fdls_free_oxid(iport, oxid, &iport->active_oxid_fdmi_rhba);
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: iport->fabric.fdmi_pending: 0x%x",
> > + iport->fcid, iport->fabric.fdmi_pending);
> > break;
> > case FNIC_FRAME_TYPE_FDMI_RPA:
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "Received FDMI RPA ABTS rsp with oxid: 0x%x", oxid);
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: iport->fabric.fdmi_pending: 0x%x",
> > + iport->fcid, iport->fabric.fdmi_pending);
> > +
> > iport->fabric.fdmi_pending &= ~FDLS_FDMI_RPA_PENDING;
> >
> > /* If RHBA is still pending, don't turn off ABORT PENDING.
> > @@ -3771,6 +3819,9 @@ static void fdls_process_fdmi_abts_rsp(struct fnic_iport_s *iport,
> > iport->fabric.fdmi_pending &= ~FDLS_FDMI_ABORT_PENDING;
> >
> > fdls_free_oxid(iport, oxid, &iport->active_oxid_fdmi_rpa);
> > + FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
> > + "0x%x: iport->fabric.fdmi_pending: 0x%x",
> > + iport->fcid, iport->fabric.fdmi_pending);
> > break;
> > default:
> > FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
>
>
Regards,
Karan
Powered by blists - more mailing lists