From nobody Tue Jul 30 14:29:21 2024 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 4WYHfp1P0cz5S4Fd; Tue, 30 Jul 2024 14:29:22 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WYHfn67QNz4ysL; Tue, 30 Jul 2024 14:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722349761; 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=Hb9OVzmH8f+4jUlnDBSBWTYql1fqmv6p6nIXE/WvMXc=; b=xzIEb+GD16yioBgtkNEX89lPHNPFKHw5fPpdnScsVC37U0MduBnx9niu6pPwu4PV+ovyGX W22y/8lfXmQBvQA2jm2jfnVBEZH94JMoNxiaqOkzoe7/8uV587hZdYu/CM0X4tgBbcmESY koMVBf04SVF+wZWR2Pi+xst7ZTMifqvGRMa6EUL/u6UWZ+wB51ycV5oeWAC265nMSvBz1L yD7Pm37sx5bYeC1U5YPWpJd3YBcqqrylQ21QaVjxxRLqB/c23VEryaid0EM/V942BK5pIs eswZbMsuy/cO+oE1qFPAh+xChAkQ2N+truY3Tc2feA5YKzYgfpqxmgsi8qhmOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722349761; a=rsa-sha256; cv=none; b=Ie872FrdxGiKfUkkwtxPR9HUK4FGfpvIKg7a4Nk7RvLkpJuc5rFJZLcTF/IsyNE47GrpUd bWQkm7BWc+5ThyVMcjgef3T2MY2W4DL/fN2cqNcZBAeiZchf1djvI6OLAmeZKE0FC5gmQd 60jCFxbkcf8K43zFTlODyarpWEbnyxQIhS9jBHxCZEMir0+ZGUxs6LipJcm3WWcbsksMA+ lNfT/TFEJiHPYQiKtVMB+HwsgcLaeZMaxU3q7YmW/2gJx1hLU/YigULYocUMtdOOlXnAN7 SFRmBHMVBjC4Hmj54G61+Hb+0SsQYiqvIPLQO24y6z5jnUp2jD3UFRCYy52/kQ== 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=1722349761; 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=Hb9OVzmH8f+4jUlnDBSBWTYql1fqmv6p6nIXE/WvMXc=; b=dQbixvHWjPu7VLGtFHm4X3ysNbmFoPFqhs0dLssOWbxEYEnmU+E8l2/dwKsHwXWc6T226Q xQi0loJdoS9iFv8PjD3ypzNX/x/e1Ts5/vscv2wGJNp5tkSmN1aTaOYaTh2WzolhfUtGTU JrmbBduCSvOLfjCrS/A2OeYIpVvbc5FXbPjYWKDmzmuiid+S8XuCurM6v0l92I0Ynjiq2A CBv7LYAQGSeXZTllDo8KdbQRva5ljvUn3nGlmv+3r6Z9hz7JWg96r/xXZ+tUuQ+wS86EiK B3EZ4a34ow1Zd2hCTiujx+FoUe6BOaEcpkucB5ukcNc4LlH1I6BdsHzXHCU20w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WYHfn5jLMzKtT; Tue, 30 Jul 2024 14:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46UETLxK029724; Tue, 30 Jul 2024 14:29:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46UETLei029721; Tue, 30 Jul 2024 14:29:21 GMT (envelope-from git) Date: Tue, 30 Jul 2024 14:29:21 GMT Message-Id: <202407301429.46UETLei029721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8ebacb9daa9e - main - nvmf_tcp: Correct calculation of number of TTAGs to allocate 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: 8ebacb9daa9ee3f3b6beed56477024009b84edc1 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8ebacb9daa9ee3f3b6beed56477024009b84edc1 commit 8ebacb9daa9ee3f3b6beed56477024009b84edc1 Author: John Baldwin AuthorDate: 2024-07-30 14:28:54 +0000 Commit: John Baldwin CommitDate: 2024-07-30 14:28:54 +0000 nvmf_tcp: Correct calculation of number of TTAGs to allocate The increment of 1 was intended to convert qp->maxr2t from 0's based to 1 based before multiplying by the queue length. Sponsored by: Chelsio Communications --- sys/dev/nvmf/nvmf_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvmf/nvmf_tcp.c b/sys/dev/nvmf/nvmf_tcp.c index 135c9968d8eb..67d239b63faf 100644 --- a/sys/dev/nvmf/nvmf_tcp.c +++ b/sys/dev/nvmf/nvmf_tcp.c @@ -1464,7 +1464,7 @@ tcp_allocate_qpair(bool controller, /* NB: maxr2t is 0's based. */ qp->num_ttags = MIN((u_int)UINT16_MAX + 1, - (uint64_t)params->qsize * (uint64_t)qp->maxr2t + 1); + (uint64_t)params->qsize * ((uint64_t)qp->maxr2t + 1)); qp->open_ttags = mallocarray(qp->num_ttags, sizeof(*qp->open_ttags), M_NVMF_TCP, M_WAITOK | M_ZERO); }