From nobody Mon Sep 29 14:37:56 2025 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 4cb3h45vR9z68K2G; Mon, 29 Sep 2025 14:37:56 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3h43M8Mz3t0p; Mon, 29 Sep 2025 14:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156676; 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=uldnC/7DqqmShk12rrekaFTBil0yohrsO14xdtOSFzY=; b=H5Q4PiToEWu811v8GLHCZH/8JAlx/HtU8y8nmsznqqcFrIIKs+ClUoSCH54vmmHfYLdNl6 gF14+34o760BUsNZRorqe1MddyG1f+VwHltC/DY/gv18sZwCwe/rXENbV8Iv0M7ZtwBkhG PMtMaPmKs2+BwQY7p6+oHTzny5Or14yHLFZULvKiQFMVz5GecoV/rS4C1WIsMNwVVO6FED /QQg3cROU98WB0xALHeEQoigac1vUdBJwqG/S1olPGXFtjV1n7Vz6vCyRYIcA6tTLFnKMl WLdmTVesgEVnCkAc/AOeZtl6Qwchye+FONA6yy8xYy4zRHoK1FeKODmgOPSrrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156676; 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=uldnC/7DqqmShk12rrekaFTBil0yohrsO14xdtOSFzY=; b=HDC8KlfWLt1LLfOfLn0gT/pA49r0g0UFZnCr6HjAJYuRiybXpH6+I6AdIcBhBYysMI2C8G X+K8MStyjmbNV04KXCpAYSjlDQ/ITf6FQqn79XqqaDvjaLjQ7lQhkGfDMtgBeFEFpCUD09 ZgUxXjNfkC6gkadus3QQRHUXUMWhlNVYQmzv6gObgdsQJQ/E2mj3FNGYk7iDp5w/CB/5N1 C22hKn3rZpdoQFpU99bCL3IFpdtffD5dqeb0b4WrVFv5XnbBviCPcy6lk91EqpyA/lAXaC r+dyN5p06TJRd6XYWstmGx1UbauqtkNpRFS0k9r4wTwi1YYaCNLUqvZ5ycCyng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156676; a=rsa-sha256; cv=none; b=WX21lP0HTXlfho1vzvt8aUB6ugAD1u68jCf88aWt/2BSjIAm2m00/iVYFyYwOvMjYJA7z5 1teW+ppi1y9W843cLmYjskfve9Kz8+frS+8ok6gj1oMupYTUnutGfFfsDTLFeHCpxs+V1l 9678+Mt9z6+Z67qvP++WzVptQX/bsFh575pM719iv8ELr+zO/5hTDqeZm8ojx0yRwEdGeP dhqeuf/fP+jHzFpx1prn/ycuhtBcTwuZZMpZC0gXZpnOOaKTL2twrcRyAkn1jM4ygH6ne0 OWkP8FMyq8/aPlkol+KVslUHAk2mJADhwI+rN51pEdbNHWlCM1Nqmg+WcmL+aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cb3h42y4Xz1854; Mon, 29 Sep 2025 14:37:56 +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 58TEbuX4018004; Mon, 29 Sep 2025 14:37:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbu1E018001; Mon, 29 Sep 2025 14:37:56 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:56 GMT Message-Id: <202509291437.58TEbu1E018001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 721033a7d96f - main - cxgbe(4): T7 TCB CPLs have queue and channel in different location 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 721033a7d96f24e80ec18ec9cc17712be55a52b7 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=721033a7d96f24e80ec18ec9cc17712be55a52b7 commit 721033a7d96f24e80ec18ec9cc17712be55a52b7 Author: Navdeep Parhar AuthorDate: 2025-09-29 09:52:55 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:00 +0000 cxgbe(4): T7 TCB CPLs have queue and channel in different location MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_filter.c | 18 +++++++++++++----- sys/dev/cxgbe/tom/t4_cpl_io.c | 15 ++++++++++++--- sys/dev/cxgbe/tom/t4_tom.c | 11 +++++++++-- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/t4_filter.c b/sys/dev/cxgbe/t4_filter.c index 92f882dd38cf..4b583b67ba07 100644 --- a/sys/dev/cxgbe/t4_filter.c +++ b/sys/dev/cxgbe/t4_filter.c @@ -1397,11 +1397,19 @@ set_tcb_field(struct adapter *sc, u_int tid, uint16_t word, uint64_t mask, return (ENOMEM); bzero(req, sizeof(*req)); INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, tid); - if (no_reply == 0) { - req->reply_ctrl = htobe16(V_QUEUENO(sc->sge.fwq.abs_id) | - V_NO_REPLY(0)); - } else - req->reply_ctrl = htobe16(V_NO_REPLY(1)); + if (no_reply) { + req->reply_ctrl = htobe16(F_NO_REPLY); + } else { + const int qid = sc->sge.fwq.abs_id; + + if (chip_id(sc) >= CHELSIO_T7) { + req->reply_ctrl = htobe16(V_T7_QUEUENO(qid) | + V_T7_REPLY_CHAN(0) | V_NO_REPLY(0)); + } else { + req->reply_ctrl = htobe16(V_QUEUENO(qid) | + V_REPLY_CHAN(0) | V_NO_REPLY(0)); + } + } req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(CPL_COOKIE_HASHFILTER)); req->mask = htobe64(mask); req->val = htobe64(val); diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 402aa29c05cb..84e31efa8b58 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -2051,9 +2051,18 @@ write_set_tcb_field(struct adapter *sc, void *dst, struct toepcb *toep, } INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, toep->tid); - req->reply_ctrl = htobe16(V_QUEUENO(toep->ofld_rxq->iq.abs_id)); - if (reply == 0) - req->reply_ctrl |= htobe16(F_NO_REPLY); + if (reply == 0) { + req->reply_ctrl = htobe16(F_NO_REPLY); + } else { + const int qid = toep->ofld_rxq->iq.abs_id; + if (chip_id(sc) >= CHELSIO_T7) { + req->reply_ctrl = htobe16(V_T7_QUEUENO(qid) | + V_T7_REPLY_CHAN(0) | V_NO_REPLY(0)); + } else { + req->reply_ctrl = htobe16(V_QUEUENO(qid) | + V_REPLY_CHAN(0) | V_NO_REPLY(0)); + } + } req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(cookie)); req->mask = htobe64(mask); req->val = htobe64(val); diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 82d8f724b382..18d73afc47c5 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -494,8 +494,15 @@ send_get_tcb(struct adapter *sc, u_int tid) bzero(cpl, sizeof(*cpl)); INIT_TP_WR(cpl, tid); OPCODE_TID(cpl) = htobe32(MK_OPCODE_TID(CPL_GET_TCB, tid)); - cpl->reply_ctrl = htobe16(V_REPLY_CHAN(0) | - V_QUEUENO(sc->sge.ofld_rxq[0].iq.cntxt_id)); + if (chip_id(sc) >= CHELSIO_T7) { + cpl->reply_ctrl = + htobe16(V_T7_QUEUENO(sc->sge.ofld_rxq[0].iq.cntxt_id) | + V_T7_REPLY_CHAN(0) | V_NO_REPLY(0)); + } else { + cpl->reply_ctrl = + htobe16(V_QUEUENO(sc->sge.ofld_rxq[0].iq.cntxt_id) | + V_REPLY_CHAN(0) | V_NO_REPLY(0)); + } cpl->cookie = 0xff; commit_wrq_wr(&sc->sge.ctrlq[0], cpl, &cookie);