From nobody Fri Sep 18 13:03:52 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 4hmXr85JqJz6sRGX for ; Fri, 18 Sep 2026 13:03:52 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hmXr84fMDz4TTY for ; Fri, 18 Sep 2026 13:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789736632; 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=qV+ZGcs0H1vyStfxT3qbw1+EFBybAClYgAlVVq9n18s=; b=b5+TczAGyjTYKBKoZFMuS9og8Z3eVcVezuruMw7MglTMcNAg8Y+96+HQpM0yf6+Am4RkHU INV6y2jmTuhrAUMS1FB8zJMn7fFw+GIsMW8Z8m/hPLp/NjMwV0oM07ge/JMliQt8SRgtp2 duCtRAzYVR9GU2R8xJHs5LShERcMQMSWvjndkQwhxb7+36Uz7t4RpxS1lyzmHmAZYNhPey 3PwhTFHjgynJ7lekuVThuCTdn2Z0nEIrzoZ+sv3UGHIsjgZfimFxOvKJix+Nvqb0pwqXNP yYEjGYSQJcUrxzm20rhqhh8ZE7peJUBEAx3WBceFTByfrnKjLCSk4CQtSWBLHA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789736632; b=GaHzpLnizwtrSM4jyvkWKNl6K6VgoianHmDqIGqabOyQYpVUgXisHZ1sTIHet7oVdxYCVQ cnOlz/JUeRev8qwJViqL4qFdxrWKcj3D5sLyCTxbNzX9yMDKVEkEF0muQtM470+/KvdunD RfRfmIXEqu8/Nus+LU3qJm/yx2iNY1RPN8GdnqUcMPl0ZCV9R8DMLrPlH3ldBDfabnprKp mKR0yYEkW2giDWnQv6XexQMhb4iTT8TuaG5fOJOzuzqOdPbkoOcrxNuzTgq5NZeNC6g0tC 97RdYGRr31YOaO8OlKZ+oJ+tH2bCFSK40vtNBWiGoL0NZd9qY2ngHvxZ1ZwQQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789736632; 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=qV+ZGcs0H1vyStfxT3qbw1+EFBybAClYgAlVVq9n18s=; b=hWNtJZfsBiUKhC/afTKllB7+Rp1iEbaxNhM/YNKKrq/jT3cYzLMJBDu3K2GPR1IIjL+ieG t8wmQ2lKYc7ruLdHBE6e7nIupwOLSE60bnIyBxAubZhu0C4bSkGaIltUryGNb9bVbDRUjV CrlL8VadZ0iqUdxedOahmzAP/s8Blmw+3oowOyV/ICGZ0HvsOQVcw/NRMyZCPZNdbxjx6+ v3JD8Q6RcaWv18TRBtH+RVVZ65K+nuwQHM4rQiFEjs/6nRl0UPPOEXRnZBebDPJaRTDH91 63/5WhDt4h1sLafgDs9AwNa1wTLiGVHbOVWnLhkrycpgqAx9wY7rAUm3VQYdfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hmXr83PRtzJYh for ; Fri, 18 Sep 2026 13:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ce0d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 18 Sep 2026 13:03:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 823466bd5647 - main - dpaa: Add ContextA and ContextB to qman_fq_create 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 823466bd56479d54ae482c77c311b2fa0855df2f Auto-Submitted: auto-generated Date: Fri, 18 Sep 2026 13:03:52 +0000 Message-Id: <6aad36b8.3ce0d.49716932@gitrepo.freebsd.org> The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=823466bd56479d54ae482c77c311b2fa0855df2f commit 823466bd56479d54ae482c77c311b2fa0855df2f Author: Justin Hibbits AuthorDate: 2026-09-10 22:27:55 +0000 Commit: Justin Hibbits CommitDate: 2026-09-18 13:03:28 +0000 dpaa: Add ContextA and ContextB to qman_fq_create The SEC QMan interface stores context in context_a and context_b, so add them to the frame queue creation. --- sys/dev/dpaa/dpaa_eth.c | 6 +++--- sys/dev/dpaa/qman.c | 17 ++++++++++++++++- sys/dev/dpaa/qman.h | 27 ++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/sys/dev/dpaa/dpaa_eth.c b/sys/dev/dpaa/dpaa_eth.c index 67e9da45b1d7..f17fc962539e 100644 --- a/sys/dev/dpaa/dpaa_eth.c +++ b/sys/dev/dpaa/dpaa_eth.c @@ -699,7 +699,7 @@ dpaa_eth_fq_rx_init(struct dpaa_eth_softc *sc) } fq = qman_fq_create(1, chan, DTSEC_RM_FQR_RX_WQ, /*force_fqid=*/true, base_fqid + i, - false, false, true, false, 0, 0, 0, 1, 1); + false, false, true, false, 0, 0, 0, 1, 1, 0, 0); if (fq == NULL) { device_printf(sc->sc_dev, "could not create RX FQ %d (fqid 0x%x)\n", @@ -819,7 +819,7 @@ dpaa_eth_fq_tx_init(struct dpaa_eth_softc *sc) /* TX Frame Queue */ fq = qman_fq_create(1, sc->sc_port_tx_qman_chan, DTSEC_RM_FQR_TX_WQ, false, 0, false, false, true, false, 0, 0, 0, - 0, 0); + 0, 0, 0, 0); if (fq == NULL) { device_printf(sc->sc_dev, "could not create default TX queue" "\n"); @@ -849,7 +849,7 @@ dpaa_eth_fq_tx_init(struct dpaa_eth_softc *sc) /* TX Confirmation Frame Queue */ fq = qman_fq_create(1, sc->sc_rx_channel, DTSEC_RM_FQR_TX_CONF_WQ, false, 0, false, false, true, false, 0, 0, - 0, 0, 0); + 0, 0, 0, 0, 0); if (fq == NULL) { device_printf(sc->sc_dev, "could not create TX confirmation " "queue\n"); diff --git a/sys/dev/dpaa/qman.c b/sys/dev/dpaa/qman.c index 9da6e45d3b49..9434da73494e 100644 --- a/sys/dev/dpaa/qman.c +++ b/sys/dev/dpaa/qman.c @@ -504,7 +504,8 @@ qman_fq_create(uint32_t fqids_num, int channel, uint8_t wq, bool hold_active, bool prefer_in_cache, bool congst_avoid_ena, void *congst_group, int8_t overhead_accounting_len, uint32_t tail_drop_threshold, - uint8_t annotation_cl, uint8_t data_cl) + uint8_t annotation_cl, uint8_t data_cl, + uint64_t context_a_opaque, uint32_t context_b_opaque) { union qman_mc_command cmd; struct qman_softc *sc; @@ -567,6 +568,20 @@ qman_fq_create(uint32_t fqids_num, int channel, uint8_t wq, cmd.init_fq.context_a = (excl << 56) | (cl << 48); cmd.init_fq.fq_ctrl |= QM_FQCTRL_CTXASTASH; cmd.init_fq.we_mask |= QCSP_INIT_FQ_WE_CONTEXT_A; + } else if (context_a_opaque != 0) { + /* + * Opaque ContextA: caller (e.g. SEC in QI mode) needs the + * FQ's ContextA read literally by the consumer. CTXASTASH + * stays off so QMan doesn't reinterpret it as stashing + * config. + */ + cmd.init_fq.context_a = context_a_opaque; + cmd.init_fq.we_mask |= QCSP_INIT_FQ_WE_CONTEXT_A; + } + + if (context_b_opaque != 0) { + cmd.init_fq.context_b = context_b_opaque; + cmd.init_fq.we_mask |= QCSP_INIT_FQ_WE_CONTEXT_B; } critical_enter(); diff --git a/sys/dev/dpaa/qman.h b/sys/dev/dpaa/qman.h index b009760d6257..564a0a1d9cb4 100644 --- a/sys/dev/dpaa/qman.h +++ b/sys/dev/dpaa/qman.h @@ -249,6 +249,30 @@ void qman_set_sdest(uint16_t, int); * @param tail_drop_threshold If not 0 - enable tail drop on this * FQR. * + * @param annotation_cl Number of words of frame annotation to + * stash in cache. + * + * @param data_cl Number of words of frame data to stash + * in cache. + * + * @param context_a_opaque Raw 64-bit value written into the FQ's + * ContextA field. Used when the FQ's + * consumer (e.g. SEC in QI mode) reads + * ContextA as an opaque cookie — for SEC + * this is the physical address of the + * session preheader. Mutually exclusive + * with the hardware stashing config + * driven by @annotation_cl / @data_cl: + * if either stash count is non-zero, + * this argument is ignored. Pass 0 when + * unused. + * + * @param context_b_opaque Raw 32-bit value written into the FQ's + * ContextB field. For SEC in QI mode + * this is the FQID of the FQ where + * responses should be enqueued. Pass 0 + * when unused. + * * @return A handle to newly created FQR object. */ struct qman_fq *qman_fq_create(uint32_t fqids_num, int channel, @@ -256,7 +280,8 @@ struct qman_fq *qman_fq_create(uint32_t fqids_num, int channel, bool hold_active, bool prefer_in_cache, bool congst_avoid_ena, void *congst_group, int8_t overhead_accounting_len, uint32_t tail_drop_threshold, - uint8_t annotation_cl, uint8_t data_cl); + uint8_t annotation_cl, uint8_t data_cl, + uint64_t context_a_opaque, uint32_t context_b_opaque); /** * Free Frame Queue Range.