From nobody Fri Feb 20 20:40:03 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fHhvS1T0gz6Swx4 for ; Fri, 20 Feb 2026 20:40:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fHhvR5tf9z3ZlF for ; Fri, 20 Feb 2026 20:40:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771620003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SiC9yyx0MqbXuVtglOvF3XY/5AafBCcxnkgQabM3CfI=; b=F2YmDoIacpqSbPKkaoDqyRs1hef06EP/HP7ZIBJPnttE/nSnzb1G7ixk02rcZ8dUXgj2zW NFTHNsr+pNxIxVSh7UA+qMD/A1HNFr5I6Ip08iHMsGB3qDdxKAuSN8yMliwA5o+6cpF4PV bQr+jyh7npFTW29a4IOvW7Bcgxep8lNoy7ALGvS0E1dBRIytu6wz7XoAj3rAUG+bfVOVHL S40XcxNutOseI7Cq3hcreVsojvuj+hBKPdtI+lBRP6EU9Sd85mOxFEkXEJAtGOqVL0eJcN pklsOnE/cXizGq/grsmCHMpKHQ6h8ZYrCdcEgt7f7QFUAuWwlK2d7WGF80r8AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771620003; a=rsa-sha256; cv=none; b=isuoSYgXmssguIAP6FBP19lgAsKVakqMX8RwqVIJyl4ZXo2DzbZNinnySr1DSPx1M2x8ch TQ58fl3HS3lkQTwiBCO97dSEI7JgASt+LkTd0uLZC9+Ch4B+iMma5sNnJ8nzwSQCtROjCU twr11IXEArp7A/sy+HYaHancAGxEUG8pUe1MZ2UauDov0txq52DQ35xCzaUZg/zMKbiqVX Z2h2kLAhIxMTD8pm/KCDveogthknbYij45jxC01PABRas3gZIYMasaWSqh8wIAIRscXqiy SseBWbUdJ/A43NaUPbicQKrhRrP2J0gRdraKvQLO2itY2aFuym5ftIHJLq2dbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771620003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SiC9yyx0MqbXuVtglOvF3XY/5AafBCcxnkgQabM3CfI=; b=Dj3mDN+TqwsCSJ90q44VZH7+OsVy+NYSOiAvr+Lk+5m0K6qP42Q43gdULONSGL4tLfv+On ot1/6GedgdLJPK2+p4eeD6EIiYdlpbKpopek3hYGbkqyBgohJl1EroL1wrTry7lKWaPPYA rRprEi9mITIzb2V3TcJ1abEPzgilfcWi8Qfx9u41AHUNM+Hg9DUM0LWyuKHxQ5DuKfr+nw 1MnCKb/V0BUDvzlDUnNK7svX+CZs4Z11zY+HnS4PaaZkrQfQrvqR+yn7gRZWPBmQ/ZTMcG LmzquT+u5+CNW7pCfKjO5pVuywbWzFlh6hnVKSoqFWTVT2RF7vZ5uNmizMz85A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fHhvR5LTPzkLm for ; Fri, 20 Feb 2026 20:40:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e405 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Feb 2026 20:40:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1602f0013bdd - main - nvmf: Limit the default I/O queue size to 128 entries List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1602f0013bddc7b59b0b8de94c0e6cd742ffc9be Auto-Submitted: auto-generated Date: Fri, 20 Feb 2026 20:40:03 +0000 Message-Id: <6998c6a3.1e405.4c3687de@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1602f0013bddc7b59b0b8de94c0e6cd742ffc9be commit 1602f0013bddc7b59b0b8de94c0e6cd742ffc9be Author: John Baldwin AuthorDate: 2026-02-20 19:21:18 +0000 Commit: John Baldwin CommitDate: 2026-02-20 20:39:02 +0000 nvmf: Limit the default I/O queue size to 128 entries Previously the size defaulted to the maximum supported size reported by the remote host. The value of 128 matches the default on Linux and avoids excessive resource usage for I/O queues. Sponsored by: Chelsio Communications --- sbin/nvmecontrol/fabrics.c | 2 +- sbin/nvmecontrol/nvmecontrol.8 | 6 +++--- sys/dev/nvmf/nvmf.h | 3 ++- tools/tools/nvmf/nvmfdd/nvmfdd.c | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sbin/nvmecontrol/fabrics.c b/sbin/nvmecontrol/fabrics.c index 5fdbf68127d4..b120118cf022 100644 --- a/sbin/nvmecontrol/fabrics.c +++ b/sbin/nvmecontrol/fabrics.c @@ -485,7 +485,7 @@ connect_nvm_queues(const struct nvmf_association_params *aparams, /* Validate I/O queue size. */ memset(io, 0, sizeof(*io) * num_io_queues); if (queue_size == 0) - queue_size = (u_int)mqes + 1; + queue_size = MIN(NVMF_DEFAULT_IO_ENTRIES, (u_int)mqes + 1); else if (queue_size > (u_int)mqes + 1) { warnx("I/O queue size exceeds controller maximum (%u)", mqes + 1); diff --git a/sbin/nvmecontrol/nvmecontrol.8 b/sbin/nvmecontrol/nvmecontrol.8 index 61574715a26c..2e666f5259ff 100644 --- a/sbin/nvmecontrol/nvmecontrol.8 +++ b/sbin/nvmecontrol/nvmecontrol.8 @@ -33,7 +33,7 @@ .\" .\" Author: Jim Harris .\" -.Dd January 31, 2026 +.Dd February 20, 2026 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -828,8 +828,8 @@ NVMe Qualified Name to use for this host. By default an NQN is auto-generated from the current host's UUID. .It Fl Q Ar entries Number of entries in each I/O queue. -By default the maximum queue size reported by the MQES field -of the remote host's CAP property is used. +The default is the minimum of 128 or the maximum queue size reported +by the MQES field of the remote host's CAP property. .El .Ss connect-all Query the Discovery Controller at diff --git a/sys/dev/nvmf/nvmf.h b/sys/dev/nvmf/nvmf.h index 9b2b4c1dea40..e53eecca156e 100644 --- a/sys/dev/nvmf/nvmf.h +++ b/sys/dev/nvmf/nvmf.h @@ -27,11 +27,12 @@ #define NVMF_NN (1024) /* - * Default timeouts for Fabrics hosts. These match values used by + * Default settings for Fabrics hosts. These match values used by * Linux. */ #define NVMF_DEFAULT_RECONNECT_DELAY 10 #define NVMF_DEFAULT_CONTROLLER_LOSS 600 +#define NVMF_DEFAULT_IO_ENTRIES 128 /* * (data, size) is the userspace buffer for a packed nvlist. diff --git a/tools/tools/nvmf/nvmfdd/nvmfdd.c b/tools/tools/nvmf/nvmfdd/nvmfdd.c index 0f181682aac2..9cc426c3ede9 100644 --- a/tools/tools/nvmf/nvmfdd/nvmfdd.c +++ b/tools/tools/nvmf/nvmfdd/nvmfdd.c @@ -474,7 +474,8 @@ main(int ac, char **av) memset(&qparams, 0, sizeof(qparams)); tcp_qpair_params(&qparams, false, address, port); - io = nvmf_connect(na, &qparams, 1, info.mqes + 1, hostid, + io = nvmf_connect(na, &qparams, 1, + MIN(NVMF_DEFAULT_IO_ENTRIES, info.mqes + 1), hostid, nvmf_cntlid(admin), av[2], hostnqn, 0); if (io == NULL) { warn("Failed to create I/O queue: %s",