Date: Wed, 17 Jul 2024 14:24:31 GMT From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 66527188a4ed - stable/13 - cxgbe(4): Remove tx_modq lookup table. Message-ID: <202407171424.46HEOVp2032794@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=66527188a4edbf56ab7afd12929c3844c8bcb843 commit 66527188a4edbf56ab7afd12929c3844c8bcb843 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2024-03-29 05:49:32 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2024-07-17 07:12:42 +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 a717b1212532..a1548cc9b81f 100644 --- a/sys/dev/cxgbe/crypto/t6_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t6_kern_tls.c @@ -165,7 +165,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); @@ -200,7 +200,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 22c34c4d217c..1600325ca42f 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -1053,7 +1053,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407171424.46HEOVp2032794>