[PATCH 4/4] nvmet: add --qid-max support for subsystem creation and setup
Shinichiro Kawasaki
shinichiro.kawasaki at wdc.com
Mon Sep 29 20:41:07 PDT 2025
On Sep 28, 2025 / 14:51, Max Gurtovoy wrote:
> Introduce support for the --qid-max argument to both
> _create_nvmet_subsystem and _nvmet_target_setup functions, allowing
> configuration of the maximum queue ID through the "attr_qid_max" sysfs
> attribute when available. This enables more flexible queue management
> for NVMe subsystems.
>
> Additionally, update test 048 to set qid_max via the new --qid-max
> workflow. This will follow the new logic added to the NVMe target
> driver, which forbid changing the attr_qid_max for a discovered
> subsystem.
>
> Also increase the sleep durations to adjust real RDMA HW devices.
>
> Signed-off-by: Max Gurtovoy <mgurtovoy at nvidia.com>
> ---
[...]
> diff --git a/tests/nvme/048 b/tests/nvme/048
> index afd9272..c6f4d9f 100755
> --- a/tests/nvme/048
> +++ b/tests/nvme/048
> @@ -37,7 +37,7 @@ nvmf_check_queue_count() {
> return 1
> fi
>
> - sleep 1
> + sleep 2
>
> retries=$((retries - 1))
> queue_count_file=$(cat /sys/class/nvme-fabrics/ctl/"${nvmedev}"/queue_count)
> @@ -58,9 +58,10 @@ set_qid_max() {
> local subsys_name="$1"
> local qid_max="$2"
>
> - set_nvmet_attr_qid_max "${subsys_name}" "${qid_max}"
The call to set_nvmet_attr_qid_max() is removed here, but the function is still
left in nvme/048. I suggest to remove it.
> + _nvmet_target_cleanup
> + _nvmet_target_setup --blkdev file --qid-max "${qid_max}"
> nvmf_check_queue_count "${subsys_name}" "${qid_max}" || return 1
> - _nvmf_wait_for_state "${subsys_name}" "live" || return 1
> + _nvmf_wait_for_state "${subsys_name}" "live" 10 || return 1
More information about the Linux-nvme
mailing list