All of lore.kernel.org
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Nilesh Javali <njavali@marvell.com>
Cc: Martin Petersen <martin.petersen@oracle.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"GR-QLogic-Storage-Upstream@marvell.com" 
	<GR-QLogic-Storage-Upstream@marvell.com>
Subject: Re: [PATCH 09/16] qla2xxx: Add ql2xnvme_queues module param to configure number of NVME queues
Date: Mon, 3 Jan 2022 00:44:37 +0000	[thread overview]
Message-ID: <AAC9E886-F1E2-4A1C-A37F-687D99A4FDC5@oracle.com> (raw)
In-Reply-To: <20211224070712.17905-10-njavali@marvell.com>



> On Dec 23, 2021, at 11:07 PM, Nilesh Javali <njavali@marvell.com> wrote:
> 
> From: Shreyas Deodhar <sdeodhar@marvell.com>
> 
> Add ql2xnvme_queues module parameter to configure number of NVME queues
> 
> Usage:
> Number of NVMe Queues that can be configured.
> Final value will be min(ql2xnvme_queues, num_cpus, num_chip_queues),
> 1 - Minimum number of queues supported
> 128 - Maximum number of queues supported
> 8 - Default value
> 
> Signed-off-by: Shreyas Deodhar <sdeodhar@marvell.com>
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
> drivers/scsi/qla2xxx/qla_gbl.h  |  1 +
> drivers/scsi/qla2xxx/qla_nvme.c | 16 ++++++++++++++--
> drivers/scsi/qla2xxx/qla_nvme.h |  4 ++++
> drivers/scsi/qla2xxx/qla_os.c   |  8 ++++++++
> 4 files changed, 27 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
> index 3f8b8bbabe6d..cedc347e3c33 100644
> --- a/drivers/scsi/qla2xxx/qla_gbl.h
> +++ b/drivers/scsi/qla2xxx/qla_gbl.h
> @@ -192,6 +192,7 @@ extern int ql2xfulldump_on_mpifail;
> extern int ql2xsecenable;
> extern int ql2xenforce_iocb_limit;
> extern int ql2xabts_wait_nvme;
> +extern u32 ql2xnvme_queues;
> 
> extern int qla2x00_loop_reset(scsi_qla_host_t *);
> extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
> diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
> index e22ec7cb65db..718c761ff5f8 100644
> --- a/drivers/scsi/qla2xxx/qla_nvme.c
> +++ b/drivers/scsi/qla2xxx/qla_nvme.c
> @@ -710,7 +710,7 @@ static struct nvme_fc_port_template qla_nvme_fc_transport = {
> 	.fcp_io		= qla_nvme_post_cmd,
> 	.fcp_abort	= qla_nvme_fcp_abort,
> 	.map_queues	= qla_nvme_map_queues,
> -	.max_hw_queues  = 8,
> +	.max_hw_queues  = DEF_NVME_HW_QUEUES,
> 	.max_sgl_segments = 1024,
> 	.max_dif_sgl_segments = 64,
> 	.dma_boundary = 0xFFFFFFFF,
> @@ -779,10 +779,22 @@ int qla_nvme_register_hba(struct scsi_qla_host *vha)
> 
> 	WARN_ON(vha->nvme_local_port);
> 
> +	if (ql2xnvme_queues < MIN_NVME_HW_QUEUES || ql2xnvme_queues > MAX_NVME_HW_QUEUES) {
> +		ql_log(ql_log_warn, vha, 0xfffd,
> +		    "ql2xnvme_queues=%d is out of range(MIN:%d - MAX:%d). Resetting ql2xnvme_queues to:%d\n",
> +		    ql2xnvme_queues, MIN_NVME_HW_QUEUES, MAX_NVME_HW_QUEUES,
> +		    DEF_NVME_HW_QUEUES);
> +		ql2xnvme_queues = DEF_NVME_HW_QUEUES;
> +	}
> +
> 	qla_nvme_fc_transport.max_hw_queues =
> -	    min((uint8_t)(qla_nvme_fc_transport.max_hw_queues),
> +	    min((uint8_t)(ql2xnvme_queues),
> 		(uint8_t)(ha->max_qpairs ? ha->max_qpairs : 1));
> 
> +	ql_log(ql_log_info, vha, 0xfffb,
> +	    "Number of NVME queues used for this port: %d\n",
> +	    qla_nvme_fc_transport.max_hw_queues);
> +
> 	pinfo.node_name = wwn_to_u64(vha->node_name);
> 	pinfo.port_name = wwn_to_u64(vha->port_name);
> 	pinfo.port_role = FC_PORT_ROLE_NVME_INITIATOR;
> diff --git a/drivers/scsi/qla2xxx/qla_nvme.h b/drivers/scsi/qla2xxx/qla_nvme.h
> index f81f219c7c7d..d0e3c0e07baa 100644
> --- a/drivers/scsi/qla2xxx/qla_nvme.h
> +++ b/drivers/scsi/qla2xxx/qla_nvme.h
> @@ -13,6 +13,10 @@
> #include "qla_def.h"
> #include "qla_dsd.h"
> 
> +#define MIN_NVME_HW_QUEUES 1
> +#define MAX_NVME_HW_QUEUES 128
> +#define DEF_NVME_HW_QUEUES 8
> +
> #define NVME_ATIO_CMD_OFF 32
> #define NVME_FIRST_PACKET_CMDLEN (64 - NVME_ATIO_CMD_OFF)
> #define Q2T_NVME_NUM_TAGS 2048
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index c4b4b4496399..7d5159306112 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -338,6 +338,14 @@ static void qla2x00_free_device(scsi_qla_host_t *);
> static int qla2xxx_map_queues(struct Scsi_Host *shost);
> static void qla2x00_destroy_deferred_work(struct qla_hw_data *);
> 
> +u32 ql2xnvme_queues = DEF_NVME_HW_QUEUES;
> +module_param(ql2xnvme_queues, uint, S_IRUGO);
> +MODULE_PARM_DESC(ql2xnvme_queues,
> +	"Number of NVMe Queues that can be configured.\n"
> +	"Final value will be min(ql2xnvme_queues, num_cpus,num_chip_queues)\n"
> +	"1 - Minimum number of queues supported\n"
> +	"128 - Maximum number of queues supported\n"
> +	"8 - Default value");
> 
> static struct scsi_transport_template *qla2xxx_transport_template = NULL;
> struct scsi_transport_template *qla2xxx_transport_vport_template = NULL;
> -- 
> 2.23.1
> 

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

--
Himanshu Madhani	 Oracle Linux Engineering


  reply	other threads:[~2022-01-03  0:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  7:06 [PATCH 00/16] qla2xxx misc bug fixes and features Nilesh Javali
2021-12-24  7:06 ` [PATCH 01/16] qla2xxx: Refactor asynchronous command initialization Nilesh Javali
2022-01-03  0:32   ` Himanshu Madhani
2021-12-24  7:06 ` [PATCH 02/16] qla2xxx: Implement ref count for srb Nilesh Javali
2021-12-28 11:12   ` Daniel Wagner
2021-12-28 11:31     ` Saurav Kashyap
2022-01-03  0:32   ` Himanshu Madhani
2022-01-03  3:56     ` Saurav Kashyap
2022-01-04 12:32       ` Daniel Wagner
2022-01-05  1:55         ` Himanshu Madhani
2022-01-05  4:28           ` Saurav Kashyap
2021-12-24  7:06 ` [PATCH 03/16] qla2xxx: fix stuck session in gpdb Nilesh Javali
2022-01-03  0:34   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 04/16] qla2xxx: Fix warning message due to adisc is being flush Nilesh Javali
2022-01-03  0:37   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 05/16] qla2xxx: Fix premature hw access after pci error Nilesh Javali
2022-01-03  0:39   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 06/16] qla2xxx: Fix scheduling while atomic Nilesh Javali
2022-01-03  0:41   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 07/16] qla2xxx: add retry for exec fw Nilesh Javali
2022-01-03  0:42   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 08/16] qla2xxx: Show wrong FDMI data for 64G adaptor Nilesh Javali
2022-01-03  0:43   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 09/16] qla2xxx: Add ql2xnvme_queues module param to configure number of NVME queues Nilesh Javali
2022-01-03  0:44   ` Himanshu Madhani [this message]
2021-12-24  7:07 ` [PATCH 10/16] qla2xxx: Fix device reconnect in loop topology Nilesh Javali
2022-01-03  0:46   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 11/16] qla2xxx: fix warning for missing error code Nilesh Javali
2022-01-03  0:46   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 12/16] qla2xxx: edif: Fix clang warning Nilesh Javali
2022-01-03  0:47   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 13/16] qla2xxx: Fix T10 PI tag escape and IP guard options for 28XX adapters Nilesh Javali
2022-01-03  0:48   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 14/16] qla2xxx: Add devid's and conditionals for 28xx Nilesh Javali
2022-01-03  0:52   ` Himanshu Madhani
2022-01-03 16:02     ` Nilesh Javali
2022-01-06  0:55     ` Arun Easi
2021-12-24  7:07 ` [PATCH 15/16] qla2xxx: Suppress a kernel complaint in qla_create_qpair() Nilesh Javali
2022-01-03  0:52   ` Himanshu Madhani
2021-12-24  7:07 ` [PATCH 16/16] qla2xxx: Update version to 10.02.07.300-k Nilesh Javali
2022-01-03  0:53   ` Himanshu Madhani

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=AAC9E886-F1E2-4A1C-A37F-687D99A4FDC5@oracle.com \
    --to=himanshu.madhani@oracle.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.