From nobody Wed Jul 17 14:24:42 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 4WPJ9R4DwFz5RPnc; Wed, 17 Jul 2024 14:24:43 +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 4WPJ9R1WyZz40kl; Wed, 17 Jul 2024 14:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721226283; 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=yap5wbeXLPTJrZK13RTZKYCnGA3ImYajX1VwlnMh6Ho=; b=rw00SMA24tHfi22UIcc2Ddp9tmOVIo/ED6tofmf0tK0hI2mN8yhDbVHqc0kEcyY3ZenXFA SyHaqMpz+WtbGUlK+HDGx0/ul+ObSTo97/K/V0vGGO/AYGTv8fAeMqIfhcVkVEA0LePv4a I4/dYh6qbPJq9rNjiN5LoX1ndwHzWCzjKc54a3W+qCdGUSirS0c+b9mH6KAyRSfO/0jYg3 SYdrStv21T5BvDdlsxLPfrSNloNKwbU40djWproy+akdDy9xOg/YpfJLXtiQTDeOxoc88U vGfLtI8j9InmxfRUnKYjWSsm0dVtlnhm9lV9JTN9l7BTfXPyhobyF0/SIQVXqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721226283; a=rsa-sha256; cv=none; b=jLT1tpX9PimopOiauINHYaJ2yBxy7REsqgZ2DNucp+LtFCv8Lc/YXoMN2b+bEOZHLeWadL ++HRxaURB1qPDoUZ2aXZ0B6K4JyD9/ld7SetOVrUGKkIFk16VPeuaPwdyoohk7eK/STdyg N87L+JJBX34kyDIYAQd9p028Vx6rPkXphrTwxLxMmKmXRU9k71MuS1nShM9A6AQt31m9A1 h/rdiGDuZMotUYjL42UsYKMCHFyiwVr/bc4qnTdZahJVWJTCryuO5OCIKMnw9WG28l7uVA wnNj7/hRAQ/VBcFxNkzQPaavOA1MpU3gL5bfgC9A2XqxFxA0t57BBu0/1JCiPg== 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=1721226283; 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=yap5wbeXLPTJrZK13RTZKYCnGA3ImYajX1VwlnMh6Ho=; b=H2q6Lm3R3MJYDK9xB8fUbtbaDTVWSluzO/8FXOjfMiNlq/PVySGnjRmb23hy37RRt+ZLnu fMlXRFpdcvGmwwjAxmDlSpw7KQhSwPVvnH5p/Rs7JQuSpCPYN5Oq5sbt/SjZxTvWQ53k7f vZjfRBSE96xiK04xahcw+hqJX/VSDsEgqhx73wr+0CSzH3NnW6ZIZn5LksoCHi4tMGkU6q Ot5Ec7c/or82OWYiorFX2MsF72fjiVl4B82ZTWXfwUoAFAMELBfiL5gpMP3NjaOeMpyiQE rcdZT36D3ujwuECxmfb+ldu6t0rbZ25FaMcU/oVVUYWSEj7PuZ9c5ZzEkTzaLw== 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 4WPJ9Q62X4z1Mpf; Wed, 17 Jul 2024 14:24:42 +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 46HEOghk033337; Wed, 17 Jul 2024 14:24:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46HEOgCI033334; Wed, 17 Jul 2024 14:24:42 GMT (envelope-from git) Date: Wed, 17 Jul 2024 14:24:42 GMT Message-Id: <202407171424.46HEOgCI033334@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: 8b6adcb3c768 - stable/13 - cxgbe(4): Rename rx_c_chan to rx_chan. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8b6adcb3c76858accbe445eb9414064856477ce1 Auto-Submitted: auto-generated The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=8b6adcb3c76858accbe445eb9414064856477ce1 commit 8b6adcb3c76858accbe445eb9414064856477ce1 Author: Navdeep Parhar AuthorDate: 2024-04-30 23:07:24 +0000 Commit: Navdeep Parhar CommitDate: 2024-07-17 07:16:05 +0000 cxgbe(4): Rename rx_c_chan to rx_chan. It is the equivalent of tx_chan but for receive so rx_chan is a better name. Initialize both using helper functions and make sure both are displayed in the sysctl MIB. Sponsored by: Chelsio Communications (cherry picked from commit 480ff89c67b25113515018cdcd13179229b4a0d3) --- sys/dev/cxgbe/adapter.h | 4 ++-- sys/dev/cxgbe/common/t4_hw.c | 12 ++++++++++-- sys/dev/cxgbe/crypto/t4_crypto.c | 2 +- sys/dev/cxgbe/t4_main.c | 6 ++++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 8d70e840d3f2..17e4e682bdc2 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -324,10 +324,10 @@ struct port_info { uint8_t port_type; uint8_t mod_type; uint8_t port_id; - uint8_t tx_chan; + uint8_t tx_chan; /* tx TP c-channel */ + uint8_t rx_chan; /* rx TP c-channel */ uint8_t mps_bg_map; /* rx MPS buffer group bitmap */ uint8_t rx_e_chan_map; /* rx TP e-channel bitmap */ - uint8_t rx_c_chan; /* rx TP c-channel */ struct link_config link_cfg; struct ifmedia media; diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 755062909e14..3e04995eec3b 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -6786,6 +6786,14 @@ static unsigned int t4_get_rx_c_chan(struct adapter *adap, int idx) return 0; } +/* + * TP TX c-channel associated with the port. + */ +static unsigned int t4_get_tx_c_chan(struct adapter *adap, int idx) +{ + return idx; +} + /** * t4_get_port_type_description - return Port Type string description * @port_type: firmware Port Type enumeration @@ -9817,10 +9825,10 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id) } while ((adap->params.portvec & (1 << j)) == 0); } - p->tx_chan = j; + p->tx_chan = t4_get_tx_c_chan(adap, j); + p->rx_chan = t4_get_rx_c_chan(adap, j); p->mps_bg_map = t4_get_mps_bg_map(adap, j); p->rx_e_chan_map = t4_get_rx_e_chan_map(adap, j); - p->rx_c_chan = t4_get_rx_c_chan(adap, j); p->lport = j; if (!(adap->flags & IS_VF) || diff --git a/sys/dev/cxgbe/crypto/t4_crypto.c b/sys/dev/cxgbe/crypto/t4_crypto.c index 7301174614d2..6e925103ba74 100644 --- a/sys/dev/cxgbe/crypto/t4_crypto.c +++ b/sys/dev/cxgbe/crypto/t4_crypto.c @@ -1919,7 +1919,7 @@ ccr_init_port(struct ccr_softc *sc, int port) pi = sc->adapter->port[port]; sc->ports[port].txq = &sc->adapter->sge.ctrlq[port]; sc->ports[port].rxq = &sc->adapter->sge.rxq[pi->vi->first_rxq]; - sc->ports[port].rx_channel_id = pi->rx_c_chan; + sc->ports[port].rx_channel_id = pi->rx_chan; sc->ports[port].tx_channel_id = pi->tx_chan; sc->ports[port].stats_queued = counter_u64_alloc(M_WAITOK); sc->ports[port].stats_completed = counter_u64_alloc(M_WAITOK); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 6db64dc53440..ae6e25e47a15 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -8062,8 +8062,10 @@ cxgbe_sysctls(struct port_info *pi) pi->mps_bg_map, "MPS buffer group map"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_e_chan_map", CTLFLAG_RD, NULL, pi->rx_e_chan_map, "TP rx e-channel map"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_c_chan", CTLFLAG_RD, NULL, - pi->rx_c_chan, "TP rx c-channel"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_chan", CTLFLAG_RD, NULL, + pi->tx_chan, "TP tx c-channel"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_chan", CTLFLAG_RD, NULL, + pi->rx_chan, "TP rx c-channel"); if (sc->flags & IS_VF) return;