[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SJ0PR11MB58968AE791657557863D0FD5C3DEA@SJ0PR11MB5896.namprd11.prod.outlook.com>
Date: Wed, 25 Oct 2023 21:29:24 +0000
From: "Karan Tilak Kumar (kartilak)" <kartilak@...co.com>
To: Bart Van Assche <bvanassche@....org>,
"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>,
"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>
Subject: RE: [PATCH 12/13] scsi: fnic: Add support for multiqueue (MQ) in fnic
driver
Hi Bart,
Thanks for your review comments. I'll fix the issues.
Regards,
Karan
-----Original Message-----
From: Bart Van Assche <bvanassche@....org>
Sent: Wednesday, October 25, 2023 11:20 AM
To: Karan Tilak Kumar (kartilak) <kartilak@...co.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>; jejb@...ux.ibm.com; martin.petersen@...cle.com; linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/13] scsi: fnic: Add support for multiqueue (MQ) in fnic driver
On 10/20/23 12:06, Karan Tilak Kumar wrote:
> @@ -405,22 +388,20 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic,
> * Routine to send a scsi cdb
> * Called with host_lock held and interrupts disabled.
> */
This patch removes the DEF_SCSI_QCMD() invocation so the above comment
is now wrong. Please fix it.
> -static int fnic_queuecommand_lck(struct scsi_cmnd *sc)
> +static int fnic_queuecommand_lck(struct scsi_cmnd *sc, uint32_t mqtag, uint16_t hwq)
Because this patch removes the DEF_SCSI_QCMD() invocation, the name of
the fnic_queuecommand_lck() function is now incorrect. Please remove the
_lck() suffix.
> -DEF_SCSI_QCMD(fnic_queuecommand)
> +int fnic_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc)
> +{
> + struct request *const rq = scsi_cmd_to_rq(sc);
> + int rc;
> + struct fc_lport *lp = shost_priv(sc->device->host);
> + struct fnic *fnic = lport_priv(lp);
> + uint32_t mqtag = 0;
> + int tag = 0;
> + uint16_t hwq = 0;
> +
> + mqtag = blk_mq_unique_tag(rq);
> + hwq = blk_mq_unique_tag_to_hwq(mqtag);
> + tag = blk_mq_unique_tag_to_tag(mqtag);
> +
> + if (tag >= fnic->fnic_max_tag_id) {
> + FNIC_SCSI_DBG(KERN_ERR, fnic->lport->host,
> + "fnic<%d>: %s: Out of range tag: 0x%x\n",
> + fnic->fnic_num, __func__, tag);
> + sc->result = DID_ERROR << 16;
> + scsi_done(sc);
> + return 0;
> + }
> +
> + rc = fnic_queuecommand_lck(sc, mqtag, hwq);
> + return rc;
> +}
The code guarded by "if (tag >= fnic->fnic_max_tag_id)" should be
removed and instead the driver should ensure that tags never exceed the
fnic->fnic_max_tag_id limit.
Please also remove the local variable 'rc'.
Thanks,
Bart.
Powered by blists - more mailing lists