From: Bart Van Assche <bvanassche@acm.org>
To: Karan Tilak Kumar <kartilak@cisco.com>, sebaddel@cisco.com
Cc: arulponn@cisco.com, djhawar@cisco.com, gcboffa@cisco.com,
mkai2@cisco.com, satishkh@cisco.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 12/13] scsi: fnic: Add support for multiqueue (MQ) in fnic driver
Date: Wed, 25 Oct 2023 11:19:40 -0700 [thread overview]
Message-ID: <573a7ab2-93ec-4184-9806-31a7ed99c04b@acm.org> (raw)
In-Reply-To: <20231020190629.338623-13-kartilak@cisco.com>
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.
next prev parent reply other threads:[~2023-10-25 18:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 19:06 [PATCH 00/13] Introduce support for multiqueue (MQ) in Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 01/13] scsi: fnic: Modify definitions to sync with VIC firmware Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 02/13] scsi: fnic: Add and use fnic number Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 03/13] scsi: fnic: Add and improve log messages Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 04/13] scsi: fnic: Rename wq_copy to hw_copy_wq Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 05/13] scsi: fnic: Get copy workqueue count and interrupt mode from config Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 06/13] scsi: fnic: Refactor and redefine fnic.h for multiqueue Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 07/13] scsi: fnic: Modify ISRs to support multiqueue(MQ) Karan Tilak Kumar
2023-10-25 10:52 ` kernel test robot
2023-10-20 19:06 ` [PATCH 08/13] scsi: fnic: Define stats to track multiqueue (MQ) IOs Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 09/13] scsi: fnic: Remove usage of host_lock Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 10/13] scsi: fnic: Add support for multiqueue (MQ) in fnic_main.c Karan Tilak Kumar
2023-11-08 13:57 ` John Garry
2023-11-09 2:21 ` Karan Tilak Kumar (kartilak)
2023-10-20 19:06 ` [PATCH 11/13] scsi: fnic: Use fnic_lock to protect fnic structures in queuecommand Karan Tilak Kumar
2023-10-20 19:06 ` [PATCH 12/13] scsi: fnic: Add support for multiqueue (MQ) in fnic driver Karan Tilak Kumar
2023-10-25 18:19 ` Bart Van Assche [this message]
2023-10-25 21:29 ` Karan Tilak Kumar (kartilak)
2023-10-20 19:06 ` [PATCH 13/13] scsi: fnic: Improve logs and add support for multiqueue (MQ) Karan Tilak Kumar
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=573a7ab2-93ec-4184-9806-31a7ed99c04b@acm.org \
--to=bvanassche@acm.org \
--cc=arulponn@cisco.com \
--cc=djhawar@cisco.com \
--cc=gcboffa@cisco.com \
--cc=jejb@linux.ibm.com \
--cc=kartilak@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mkai2@cisco.com \
--cc=satishkh@cisco.com \
--cc=sebaddel@cisco.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®