From nobody Wed Jul 17 14:21:36 2024 X-Original-To: dev-commits-src-branches@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 4WPJ5r4JHvz5RPR3; Wed, 17 Jul 2024 14:21:36 +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 4WPJ5r25CMz4shT; Wed, 17 Jul 2024 14:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721226096; 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=I8r9Vf1U81g3SDSYjHJVCVxNFVosu9pwi/piDufBuXY=; b=XjvEy3buWbFag1yb3SclADXZvudzGlyjS1m6m0lsVDy/t/fSVFoU+IRusPDeDoZQYajSpU yHLFRj11io0+3XxGLEpM3sBYsGfFAO1uKYtGwRKYJjDzgb/f8+Y93r3Sk+t6e+EKSLl19O dk7Ilufb3ef/SKhLs92GY0q6XP4JmUwRktfJKOf1lX1UeVQ0N2Iy5FiwIFJjizS2IJAO52 36XOtbfOTN3geSQAO99Hva/mkswykBeMeSVC1uK+T2henMhdt6OC3ElrHFDv4Pw4MZyQ78 tuHnQ5kBg4RuWp502466AvVALs0sKCZNWzqNssNnT8uXh3jKQu3uAN5ARuflww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721226096; a=rsa-sha256; cv=none; b=jT5OVHQiyei/e74T41IkpcPaMX6XYVK85QRY+wK+KWOjod4UmhKvag+vb20FCgzLPuzeJ4 jXpu7ppaGLravHM+JXL7Imml5owJMv0j23XbqfGcrqV9eS388r0u/VMDZXBAr7L4LkJO0X rjyKDq9dr17YzckK1Lo6LJvLV4lozGRHWDC7PIt4CeZBg9xJ5WmXoS7XyDfSFSMadMBXp5 a5TYgm8CcisRgcwC0H8eM5PUXaeNmxfumnU8Q5qnJXgkOKqO2g+cYzBG+5Lm3mBNg7rL04 9LRzxaKTzaJUZ6uy5PMGdgNjWVc4DPsWEC8VTYNdUAPtl2uwb5yrF4KuI1m2LQ== 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=1721226096; 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=I8r9Vf1U81g3SDSYjHJVCVxNFVosu9pwi/piDufBuXY=; b=BsueZf7BNmqoLFIduPKLfL2Sm74fc8zT7J/HRntummMmniYBJcywFrKYFqmVDpyoFluHZR vctsq2TKak68T2QVPz7AfNWTpPgDt0wt7ZfIY0hlciZXa7hOXAwWIviVNWsnhqkqPXjvPu D8dKlo3OxW9nuc/V9F58bWv7o/H2kenZYGptmxxR2ijKmgbmPwtZVqzGxvPksePukMurS5 oeL2A2MguFTMWDUREeU+dSzhEZ0BBO/3LRnnFcbCbcbKOTafim5JXnvtqCKMIG0vjbQUd/ 3For5JFmWRuqOQ6fPa9iFpN82l8BbDe4xeuWSu5dLws3s4RKoAmVaMnCIS8GdQ== 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 4WPJ5r1jHnz1Lnq; Wed, 17 Jul 2024 14:21:36 +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 46HELa6d026770; Wed, 17 Jul 2024 14:21:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HELaIi026767; Wed, 17 Jul 2024 14:21:36 GMT (envelope-from git) Date: Wed, 17 Jul 2024 14:21:36 GMT Message-Id: <202407171421.46HELaIi026767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 1089f5755e11 - stable/14 - cxgbe(4): Remove tx_modq lookup table. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1089f5755e1131ad13adea0d2c7ac17be024c494 Auto-Submitted: auto-generated The branch stable/14 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=1089f5755e1131ad13adea0d2c7ac17be024c494 commit 1089f5755e1131ad13adea0d2c7ac17be024c494 Author: Navdeep Parhar AuthorDate: 2024-03-29 05:49:32 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-17 06:27:14 +0000 cxgbe(4): Remove tx_modq lookup table. The driver always uses the same modulation queue as the channel and the table is unnecessary. Sponsored by: Chelsio Communications (cherry picked from commit f76effed14b25bfa0c47b10f6d8a076104c48d94) --- sys/dev/cxgbe/common/common.h | 4 +++- sys/dev/cxgbe/common/t4_hw.c | 5 ----- sys/dev/cxgbe/crypto/t6_kern_tls.c | 4 ++-- sys/dev/cxgbe/tom/t4_tom.c | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 0871ca8c40f1..634474470e17 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -252,7 +252,6 @@ struct tp_params { unsigned int tre; /* log2 of core clocks per TP tick */ unsigned int dack_re; /* DACK timer resolution */ unsigned int la_mask; /* what events are recorded by TP LA */ - unsigned short tx_modq[MAX_NCHAN]; /* channel to modulation queue map */ uint16_t filter_mode; uint16_t filter_mask; /* Used by TOE and hashfilters */ @@ -273,6 +272,9 @@ struct tp_params { int8_t frag_shift; }; +/* Use same modulation queue as the tx channel. */ +#define TX_MODQ(tx_chan) (tx_chan) + struct vpd_params { unsigned int cclk; u8 ec[EC_LEN + 1]; diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index c428fd2720cd..30dedd91262c 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9800,7 +9800,6 @@ read_filter_mode_and_ingress_config(struct adapter *adap) */ int t4_init_tp_params(struct adapter *adap) { - int chan; u32 tx_len, rx_len, r, v; struct tp_params *tpp = &adap->params.tp; @@ -9808,10 +9807,6 @@ int t4_init_tp_params(struct adapter *adap) tpp->tre = G_TIMERRESOLUTION(v); tpp->dack_re = G_DELAYEDACKRESOLUTION(v); - /* MODQ_REQ_MAP defaults to setting queues 0-3 to chan 0-3 */ - for (chan = 0; chan < MAX_NCHAN; chan++) - tpp->tx_modq[chan] = chan; - read_filter_mode_and_ingress_config(adap); if (chip_id(adap) > CHELSIO_T5) { diff --git a/sys/dev/cxgbe/crypto/t6_kern_tls.c b/sys/dev/cxgbe/crypto/t6_kern_tls.c index 6b684c952647..2173cb670874 100644 --- a/sys/dev/cxgbe/crypto/t6_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t6_kern_tls.c @@ -171,7 +171,7 @@ mk_ktls_act_open_req(struct adapter *sc, struct vi_info *vi, struct inpcb *inp, options |= F_NON_OFFLOAD; cpl->opt0 = htobe64(options); - options = V_TX_QUEUE(sc->params.tp.tx_modq[vi->pi->tx_chan]); + options = V_TX_QUEUE(TX_MODQ(vi->pi->tx_chan)); if (tp->t_flags & TF_REQ_TSTMP) options |= F_TSTAMPS_EN; cpl->opt2 = htobe32(options); @@ -206,7 +206,7 @@ mk_ktls_act_open_req6(struct adapter *sc, struct vi_info *vi, options |= F_NON_OFFLOAD; cpl->opt0 = htobe64(options); - options = V_TX_QUEUE(sc->params.tp.tx_modq[vi->pi->tx_chan]); + options = V_TX_QUEUE(TX_MODQ(vi->pi->tx_chan)); if (tp->t_flags & TF_REQ_TSTMP) options |= F_TSTAMPS_EN; cpl->opt2 = htobe32(options); diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 4d4400512ef5..b2d0b85e4832 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -1202,7 +1202,7 @@ calc_options2(struct vi_info *vi, struct conn_params *cp) /* XXX: F_RX_CHANNEL for multiple rx c-chan support goes here. */ - opt2 |= V_TX_QUEUE(sc->params.tp.tx_modq[pi->tx_chan]); + opt2 |= V_TX_QUEUE(TX_MODQ(pi->tx_chan)); opt2 |= V_PACE(0); opt2 |= F_RSS_QUEUE_VALID; opt2 |= V_RSS_QUEUE(sc->sge.ofld_rxq[cp->rxq_idx].iq.abs_id);