From nobody Sat Nov 02 13:54:54 2024 X-Original-To: dev-commits-src-all@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 4XgfPC1CPXz5c40X; Sat, 02 Nov 2024 13:54:55 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XgfPB52G7z40QZ; Sat, 2 Nov 2024 13:54:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730555694; 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=7DyeU2SFAqK1apAOSoQ2g4C/KxpJ7I9cbFArojW7Ipg=; b=NLVsGFuyIW0yLvy5Mcc5q6ab4I8Zrhoj2JG1vaheguKEc3P5pi4nrzvwe6UArHdCGQWADW LNuhDJqDAVIojm8ESoF6E/07i8EdwJJDs58holVtsG/D7LfgjuH4MgK6sMDIBPxBxOlPaW PaPnlyiZiAwIeo1MP+H8RlnorftO1inqilL9S1enVM63+JymIEA/Ptis8G/a8WYKoyNHgX 46MU2K68BovlIegsTnnYXDVr9q380C2LoaZdkp3Hav1uyTLC8IzxahfkRKT2/WXn/23Gq2 eo19VvPQGbEi7mFsqOzteaxo6M6vw/4gZnsf8+yJXpNpSF2tuH3gmoYzRCubPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730555694; 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=7DyeU2SFAqK1apAOSoQ2g4C/KxpJ7I9cbFArojW7Ipg=; b=kw704VhAbPM94N8CKt2M7ETtsLviERtul6W42XgLgD4lP8qaTPXhfp4OJLDvJtVMMbuyjm iQzI5Pt+FWD7SQXwhJfSii50p7z4tqTK+x7ns4bnRaEBdqU7MRcUPSiVaRkSC73slUfQUo dWgVXkm/8+iAcNwfC924o5T0SVH1RaSadm/U8t5v+5EUHgAvRUqebHClkxMp77ZWK+B85m 6rT5+DjEaupMUaSUUr0eaceWk1/aK/y1ODmvlYw250lbSHRgkGakzFO9j+GN3kICoc4ukZ y/sybofoZF0EBJTh78cxMJB9TMvzKtcs7yY3L9NnXwXcnGnmKL6T9ecblAfsFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730555694; a=rsa-sha256; cv=none; b=A5LEbm898u/OvPRI16k1YrVMJahLE2R3fV21iMliqRdN1IhyK+Rbw0a2cyILYXzNYD4Wf6 bEAvmOapgmsGRhGGIWJmItq6iGgq8unIqMOL8fK0MgdXwDKT+KxtsVSeUS0hSHDgKIDh3i GVaCyi4iyb2y9/HVmGVUxp5P9eKj9BIk3GdBdoskFrDidWO7TBAK4YWgFHHc1hbQqp/F6D Myb9ZeuzqmdK98O87/qvuD0P8/L9eJA5KsDQkiKh4cVW6ZnmBMKJ/MPcn2KymEYrADyvdQ tKeLH+qF3TpqhvVCq7vtX2NKKc/1OIMyoB3G62k+FBSVqOdg12ws2yf6ceDuxw== 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 4XgfPB4RLpz16Wt; Sat, 2 Nov 2024 13:54:54 +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 4A2Dsshx098903; Sat, 2 Nov 2024 13:54:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A2Dss4p098900; Sat, 2 Nov 2024 13:54:54 GMT (envelope-from git) Date: Sat, 2 Nov 2024 13:54:54 GMT Message-Id: <202411021354.4A2Dss4p098900@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: 7b8dd078ea3c - main - libnvmf: Correctly set the controller and host PDA fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 7b8dd078ea3c6b836f514f47587672fd062279c8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7b8dd078ea3c6b836f514f47587672fd062279c8 commit 7b8dd078ea3c6b836f514f47587672fd062279c8 Author: John Baldwin AuthorDate: 2024-11-02 13:54:20 +0000 Commit: John Baldwin CommitDate: 2024-11-02 13:54:20 +0000 libnvmf: Correctly set the controller and host PDA fields The caller supplied PDU data alignment (PDA) field from nvmf_association_params is the caller's restriction on data alignment (so affects received PDUs), and the PDA value received from the other end is the remote end's restriction (so affects transmitted PDUs). I had these backwards so that if the remote end advertised a PDA it was used as the receive PDA instead of the transmit PDA. Sponsored by: Chelsio Communications --- lib/libnvmf/nvmf_tcp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libnvmf/nvmf_tcp.c b/lib/libnvmf/nvmf_tcp.c index 93948b9b5fd0..cc4c0b90b0fb 100644 --- a/lib/libnvmf/nvmf_tcp.c +++ b/lib/libnvmf/nvmf_tcp.c @@ -1024,8 +1024,8 @@ tcp_connect(struct nvmf_tcp_qpair *qp, struct nvmf_association *na, bool admin) return (false); } - qp->txpda = (params->tcp.pda + 1) * 4; - qp->rxpda = (ic_resp.cpda + 1) * 4; + qp->rxpda = (params->tcp.pda + 1) * 4; + qp->txpda = (ic_resp.cpda + 1) * 4; qp->header_digests = ic_resp.dgst.bits.hdgst_enable != 0; qp->data_digests = ic_resp.dgst.bits.ddgst_enable != 0; qp->maxr2t = params->tcp.maxr2t; @@ -1069,8 +1069,8 @@ tcp_accept(struct nvmf_tcp_qpair *qp, struct nvmf_association *na) return (false); } - qp->txpda = (params->tcp.pda + 1) * 4; - qp->rxpda = (ic_req.hpda + 1) * 4; + qp->rxpda = (params->tcp.pda + 1) * 4; + qp->txpda = (ic_req.hpda + 1) * 4; qp->header_digests = ic_resp.dgst.bits.hdgst_enable != 0; qp->data_digests = ic_resp.dgst.bits.ddgst_enable != 0; qp->maxr2t = le32toh(ic_req.maxr2t);