[PATCH 1/3] nvme-fabrics: unify common code in admin and io queue connect

Christoph Hellwig hch at lst.de
Thu May 11 06:12:59 PDT 2023


On Wed, May 10, 2023 at 09:02:29PM +0300, Max Gurtovoy wrote:
> +static struct nvmf_connect_data *nvmf_connect_data_prepare(struct nvme_ctrl *ctrl,

Overly long line.  Maybe shorten the function name a little?

> +	if (qid) {
> +		cmd->connect.sqsize = cpu_to_le16(ctrl->sqsize);
> +	} else {
> +		cmd->connect.sqsize = cpu_to_le16(NVME_AQ_DEPTH - 1);
> +
> +		/*
> +		 * For admin queue, set keep-alive timeout in seconds
> +		 * granularity (ms * 1000)
> +		 */
> +		cmd->connect.kato = cpu_to_le32(ctrl->kato * 1000);
> +	}

Not sure the "For admin queue, " part here adds any value.  That's
pretty obvious from the code.



More information about the Linux-nvme mailing list