diff mbox series

[blktests,v3,2/4] nvme/rc: Add nr queue parser arguments to _nvme_connect_subsys()

Message ID 20230329090202.8351-3-dwagner@suse.de (mailing list archive)
State New, archived
Headers show
Series Test different queue types | expand

Commit Message

Daniel Wagner March 29, 2023, 9:02 a.m. UTC
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 tests/nvme/rc | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

Chaitanya Kulkarni March 31, 2023, 4:56 a.m. UTC | #1
On 3/29/2023 2:02 AM, Daniel Wagner wrote:
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
diff mbox series

Patch

diff --git a/tests/nvme/rc b/tests/nvme/rc
index 20c5e2fa32cb..c1bb08be511a 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -326,6 +326,9 @@  _nvme_connect_subsys() {
 	local hostid="$def_hostid"
 	local hostkey=""
 	local ctrlkey=""
+	local nr_io_queues=""
+	local nr_write_queues=""
+	local nr_poll_queues=""
 
 	while [[ $# -gt 0 ]]; do
 		case $1 in
@@ -357,6 +360,18 @@  _nvme_connect_subsys() {
 				ctrlkey="$2"
 				shift 2
 				;;
+			-i|--nr-io-queues)
+				nr_io_queues="$2"
+				shift 2
+				;;
+			-W|--nr-write-queues)
+				nr_write_queues="$2"
+				shift 2
+				;;
+			-P|--nr-poll-queues)
+				nr_poll_queues="$2"
+				shift 2
+				;;
 			*)
 				positional_args+=("$1")
 				shift
@@ -387,6 +402,16 @@  _nvme_connect_subsys() {
 	if [[ -n "${ctrlkey}" ]]; then
 		ARGS+=(--dhchap-ctrl-secret="${ctrlkey}")
 	fi
+	if [[ -n "${nr_io_queues}" ]]; then
+		ARGS+=(--nr-io-queues="${nr_io_queues}")
+	fi
+	if [[ -n "${nr_write_queues}" ]]; then
+		ARGS+=(--nr-write-queues="${nr_write_queues}")
+	fi
+	if [[ -n "${nr_poll_queues}" ]]; then
+		ARGS+=(--nr-poll-queues="${nr_poll_queues}")
+	fi
+
 	nvme connect "${ARGS[@]}" 2> /dev/null
 }