From nobody Tue May 28 10:36:26 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 4VpTT70L8Wz5Lyw1; Tue, 28 May 2024 10:36:27 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VpTT664rjz4Tfx; Tue, 28 May 2024 10:36:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716892586; 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=xI9+v0ARs47QbnN2vkX2FAYkgZesntEz4oHBjuDlIjU=; b=MpW81sU7GE9HNJfXMUNQ4R6bnUOJ2jx/Ugh6h6lRPqfxnkD6uRXev4oVEDmLvGZS1QWats YINqXegjGjXLM83UtRfjCS+7/Q9KWEjjP8GykJZkOgHyGOo3uTVmk6mGuUgOPMelgdJGQk T5vhZ52c12VkT0zg9b4QuXOHu284Sa+f/CYeSke9a0OVxlwQfGlZ2sijgw77SkYYiMAhWd MkKMbiSr//q0tCKeDbwcTt5zLnZwCPvhZqmOzJ2orE1YNrnqe2aAGF9YYgMyvbgpDXhCNy JBroJxOaF9DyrypXocV0HbDnnUIzVNN0UZZ1oPVd1MexmjEU1KkXrUK6K1iAMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716892586; a=rsa-sha256; cv=none; b=YZQUXf/6HqegTETbsg2wHmQgm3WirKEAx1EisyOylm+9miE0I0FaPubqQIyyvnRHwYAk6c Lk/+vTbYnKbTjlQPULAa0qNETyEvpEm5FPstqmROnMm9WP882rq0Jv8HK9qRpehCf3Z2h9 EuXyov7C6T+2xsB22Jb9sFJhbFXdziGx+PiUY4cB/PPUPj40i8Ghz4Yoe5WXntFVcEin+G 6+hd5KufIG/tgS8l+xiDg8iC0QRjyHilrYFMMbO+TKYLS+Ya3ggVUMGYggB0jS/Sc/PpGM 6t1KZPqo9mze9ou38mLCmsQJAMW2w4+un38WsQD60YgUloXI1u4NnzekDHtlEA== 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=1716892586; 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=xI9+v0ARs47QbnN2vkX2FAYkgZesntEz4oHBjuDlIjU=; b=Rb4IUS4piuZhomGzpMBE+QvzIT3y6WlQzbihAM2usGuA+3sL0buHOV3yv94DuGKKKPZcQg gPTC50eHIo61yjtKk3EhsOY1syi8Y0LnvfH3uAr0XmnM4SJ7gRfaUyoGU6Z8vKLZn3PNEz op5HhxmQL7EGMIzdBRMlppTs8WJAgGW+KSxRZVre43H8vBCJYFeZ4QDYH/4RPy1PT0HtTo JXyx/Oz1JR1YA8DcuDVgIQfTLTzQ3cqEYiaPTFkt/PInql//of6lihfspBdA0zwFMreAFM O6FTbY0sZwjxrwltXDhp1p2m+IKzFwZ3bBcRdP/Fibpgrm/42hbvWbM7ApEmCQ== 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 4VpTT65hB9z1Nqf; Tue, 28 May 2024 10:36:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44SAaQ0G051861; Tue, 28 May 2024 10:36:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44SAaQcv051858; Tue, 28 May 2024 10:36:26 GMT (envelope-from git) Date: Tue, 28 May 2024 10:36:26 GMT Message-Id: <202405281036.44SAaQcv051858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Sumit Saxena Subject: git: 032899b59c25 - main - bnxt_en: Added support for priority queues extended stats 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: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 032899b59c25389e60a0a092a0dad347102a6edc Auto-Submitted: auto-generated The branch main has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=032899b59c25389e60a0a092a0dad347102a6edc commit 032899b59c25389e60a0a092a0dad347102a6edc Author: Chandrakanth patil AuthorDate: 2024-04-27 16:26:35 +0000 Commit: Sumit Saxena CommitDate: 2024-05-28 10:36:11 +0000 bnxt_en: Added support for priority queues extended stats Below priority queues extended stats are exposed to sysctl: tx_bytes_pri{0-7} rx_bytes_pri{0-7} tx_packets_pri{0-7} rx_packets_pri{0-7} Reviewed by: imp Approved by: imp Differential revision: https://reviews.freebsd.org/D45007 --- sys/dev/bnxt/bnxt_en/bnxt.h | 23 ++++++ sys/dev/bnxt/bnxt_en/bnxt_hwrm.c | 161 +++++++++++++++++++++++++++++++++++-- sys/dev/bnxt/bnxt_en/bnxt_hwrm.h | 2 +- sys/dev/bnxt/bnxt_en/bnxt_sysctl.c | 98 ++++++++++++++++++++++ 4 files changed, 277 insertions(+), 7 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index ab60ddf74672..d6fe2ce8ddb1 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -267,6 +267,15 @@ #define BNXT_MIN_FRAME_SIZE 52 /* Frames must be padded to this size for some A0 chips */ +#define BNXT_RX_STATS_EXT_OFFSET(counter) \ + (offsetof(struct rx_port_stats_ext, counter) / 8) + +#define BNXT_RX_STATS_EXT_NUM_LEGACY \ + BNXT_RX_STATS_EXT_OFFSET(rx_fec_corrected_blocks) + +#define BNXT_TX_STATS_EXT_OFFSET(counter) \ + (offsetof(struct tx_port_stats_ext, counter) / 8) + extern const char bnxt_driver_version[]; typedef void (*bnxt_doorbell_tx)(void *, uint16_t idx); typedef void (*bnxt_doorbell_rx)(void *, uint16_t idx); @@ -910,6 +919,20 @@ struct bnxt_softc { struct tx_port_stats_ext *tx_port_stats_ext; struct rx_port_stats_ext *rx_port_stats_ext; + uint16_t fw_rx_stats_ext_size; + uint16_t fw_tx_stats_ext_size; + uint16_t hw_ring_stats_size; + + uint8_t tx_pri2cos_idx[8]; + uint8_t rx_pri2cos_idx[8]; + bool pri2cos_valid; + + uint64_t tx_bytes_pri[8]; + uint64_t tx_packets_pri[8]; + uint64_t rx_bytes_pri[8]; + uint64_t rx_packets_pri[8]; + + uint8_t port_count; int num_cp_rings; struct bnxt_cp_ring *nq_rings; diff --git a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c index 07834aeca363..677869484ace 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c @@ -47,6 +47,38 @@ static void bnxt_hwrm_set_eee(struct bnxt_softc *softc, /* NVRam stuff has a five minute timeout */ #define BNXT_NVM_TIMEO (5 * 60 * 1000) +#define BNXT_RX_STATS_PRI_ENTRY(counter, n) \ + BNXT_RX_STATS_EXT_OFFSET(counter##_cos0) + +#define BNXT_TX_STATS_PRI_ENTRY(counter, n) \ + BNXT_TX_STATS_EXT_OFFSET(counter##_cos0) + +#define BNXT_RX_STATS_PRI_ENTRIES(counter) \ + BNXT_RX_STATS_PRI_ENTRY(counter, 0), \ + BNXT_RX_STATS_PRI_ENTRY(counter, 1), \ + BNXT_RX_STATS_PRI_ENTRY(counter, 2), \ + BNXT_RX_STATS_PRI_ENTRY(counter, 3), \ + BNXT_RX_STATS_PRI_ENTRY(counter, 4), \ + BNXT_RX_STATS_PRI_ENTRY(counter, 5), \ + BNXT_RX_STATS_PRI_ENTRY(counter, 6), \ + BNXT_RX_STATS_PRI_ENTRY(counter, 7) + +#define BNXT_TX_STATS_PRI_ENTRIES(counter) \ + BNXT_TX_STATS_PRI_ENTRY(counter, 0), \ + BNXT_TX_STATS_PRI_ENTRY(counter, 1), \ + BNXT_TX_STATS_PRI_ENTRY(counter, 2), \ + BNXT_TX_STATS_PRI_ENTRY(counter, 3), \ + BNXT_TX_STATS_PRI_ENTRY(counter, 4), \ + BNXT_TX_STATS_PRI_ENTRY(counter, 5), \ + BNXT_TX_STATS_PRI_ENTRY(counter, 6), \ + BNXT_TX_STATS_PRI_ENTRY(counter, 7) + + +long bnxt_rx_bytes_pri_arr_base_off[] = {BNXT_RX_STATS_PRI_ENTRIES(rx_bytes)}; +long bnxt_rx_pkts_pri_arr_base_off[] = {BNXT_RX_STATS_PRI_ENTRIES(rx_packets)}; +long bnxt_tx_bytes_pri_arr_base_off[] = {BNXT_TX_STATS_PRI_ENTRIES(tx_bytes)}; +long bnxt_tx_pkts_pri_arr_base_off[] = {BNXT_TX_STATS_PRI_ENTRIES(tx_packets)}; + static int bnxt_hwrm_err_map(uint16_t err) { @@ -1734,25 +1766,142 @@ bnxt_hwrm_port_qstats(struct bnxt_softc *softc) return rc; } +static int bnxt_hwrm_pri2cos_idx(struct bnxt_softc *softc, uint32_t path_dir) +{ + struct hwrm_queue_pri2cos_qcfg_input req = {0}; + struct hwrm_queue_pri2cos_qcfg_output *resp; + uint8_t *pri2cos_idx, *q_ids, max_q; + int rc, i, j; + uint8_t *pri2cos; -void + bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_QUEUE_PRI2COS_QCFG); + resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; + + req.flags = htole32(HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_IVLAN | + path_dir); + rc = hwrm_send_message(softc, &req, sizeof(req)); + + if (rc) + return rc; + + if (path_dir == HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_TX) { + pri2cos_idx = softc->tx_pri2cos_idx; + q_ids = softc->tx_q_ids; + max_q = softc->tx_max_q; + } else { + pri2cos_idx = softc->rx_pri2cos_idx; + q_ids = softc->rx_q_ids; + max_q = softc->rx_max_q; + } + + pri2cos = &resp->pri0_cos_queue_id; + + for (i = 0; i < BNXT_MAX_QUEUE; i++) { + uint8_t queue_id = pri2cos[i]; + uint8_t queue_idx; + + /* Per port queue IDs start from 0, 10, 20, etc */ + queue_idx = queue_id % 10; + if (queue_idx > BNXT_MAX_QUEUE) { + softc->pri2cos_valid = false; + rc = -EINVAL; + return rc; + } + + for (j = 0; j < max_q; j++) { + if (q_ids[j] == queue_id) + pri2cos_idx[i] = queue_idx; + } + } + + softc->pri2cos_valid = true; + + return rc; +} + +int bnxt_hwrm_port_qstats_ext(struct bnxt_softc *softc) { struct hwrm_port_qstats_ext_input req = {0}; + struct hwrm_port_qstats_ext_output *resp; + int rc = 0, i; + uint32_t tx_stat_size; bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_PORT_QSTATS_EXT); + resp = (void *)softc->hwrm_cmd_resp.idi_vaddr; + tx_stat_size = sizeof(struct tx_port_stats_ext); req.port_id = htole16(softc->pf.port_id); - req.tx_stat_size = htole16(sizeof(struct tx_port_stats_ext)); + req.tx_stat_size = htole16(tx_stat_size); req.rx_stat_size = htole16(sizeof(struct rx_port_stats_ext)); req.rx_stat_host_addr = htole64(softc->hw_rx_port_stats_ext.idi_paddr); req.tx_stat_host_addr = htole64(softc->hw_tx_port_stats_ext.idi_paddr); - BNXT_HWRM_LOCK(softc); - _hwrm_send_message(softc, &req, sizeof(req)); - BNXT_HWRM_UNLOCK(softc); + rc = hwrm_send_message(softc, &req, sizeof(req)); - return; + if (!rc) { + softc->fw_rx_stats_ext_size = + le16toh(resp->rx_stat_size) / 8; + if (BNXT_FW_MAJ(softc) < 220 && + softc->fw_rx_stats_ext_size > BNXT_RX_STATS_EXT_NUM_LEGACY) + softc->fw_rx_stats_ext_size = BNXT_RX_STATS_EXT_NUM_LEGACY; + + softc->fw_tx_stats_ext_size = tx_stat_size ? + le16toh(resp->tx_stat_size) / 8 : 0; + } else { + softc->fw_rx_stats_ext_size = 0; + softc->fw_tx_stats_ext_size = 0; + } + + if (softc->fw_tx_stats_ext_size <= + offsetof(struct tx_port_stats_ext, pfc_pri0_tx_duration_us) / 8) { + softc->pri2cos_valid = false; + return rc; + } + + rc = bnxt_hwrm_pri2cos_idx(softc, HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_TX); + if (rc) + return rc; + + if (softc->is_asym_q) { + rc = bnxt_hwrm_pri2cos_idx(softc, HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_RX); + if (rc) + return rc; + } else { + memcpy(softc->rx_pri2cos_idx, softc->tx_pri2cos_idx, sizeof(softc->rx_pri2cos_idx)); + } + + u64 *rx_port_stats_ext = (u64 *)softc->hw_rx_port_stats_ext.idi_vaddr; + u64 *tx_port_stats_ext = (u64 *)softc->hw_tx_port_stats_ext.idi_vaddr; + + if (softc->pri2cos_valid) { + for (i = 0; i < 8; i++) { + long n = bnxt_rx_bytes_pri_arr_base_off[i] + + softc->rx_pri2cos_idx[i]; + + softc->rx_bytes_pri[i] = *(rx_port_stats_ext + n); + } + for (i = 0; i < 8; i++) { + long n = bnxt_rx_pkts_pri_arr_base_off[i] + + softc->rx_pri2cos_idx[i]; + + softc->rx_packets_pri[i] = *(rx_port_stats_ext + n); + } + for (i = 0; i < 8; i++) { + long n = bnxt_tx_bytes_pri_arr_base_off[i] + + softc->tx_pri2cos_idx[i]; + + softc->tx_bytes_pri[i] = *(tx_port_stats_ext + n); + } + for (i = 0; i < 8; i++) { + long n = bnxt_tx_pkts_pri_arr_base_off[i] + + softc->tx_pri2cos_idx[i]; + + softc->tx_packets_pri[i] = *(tx_port_stats_ext + n); + } + } + + return rc; } int diff --git a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.h b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.h index 35a974fe3438..766556f9904c 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.h @@ -66,7 +66,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt_softc *softc, struct bnxt_cp_ring *cpr, uint64_t paddr); int bnxt_hwrm_stat_ctx_free(struct bnxt_softc *softc, struct bnxt_cp_ring *cpr); int bnxt_hwrm_port_qstats(struct bnxt_softc *softc); -void bnxt_hwrm_port_qstats_ext(struct bnxt_softc *softc); +int bnxt_hwrm_port_qstats_ext(struct bnxt_softc *softc); int bnxt_hwrm_ring_grp_alloc(struct bnxt_softc *softc, struct bnxt_grp_info *grp); int bnxt_hwrm_ring_grp_free(struct bnxt_softc *softc, struct bnxt_grp_info *gr); diff --git a/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c b/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c index e00cb225fd49..fdc54ab34511 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_sysctl.c @@ -598,6 +598,55 @@ bnxt_create_port_stats_sysctls(struct bnxt_softc *softc) "tx_packets_cos7", CTLFLAG_RD, &softc->tx_port_stats_ext->tx_packets_cos7, "Transmitted packets count cos7"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_bytes_pri0", CTLFLAG_RD, + &softc->tx_bytes_pri[0], "Transmitted bytes count pri0"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_packets_pri0", CTLFLAG_RD, + &softc->tx_packets_pri[0], "Transmitted packets count pri0"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_bytes_pri1", CTLFLAG_RD, + &softc->tx_bytes_pri[1], "Transmitted bytes count pri1"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_packets_pri1", CTLFLAG_RD, + &softc->tx_packets_pri[1], "Transmitted packets count pri1"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_bytes_pri2", CTLFLAG_RD, + &softc->tx_bytes_pri[2], "Transmitted bytes count pri2"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_packets_pri2", CTLFLAG_RD, + &softc->tx_packets_pri[2], "Transmitted packets count pri2"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_bytes_pri3", CTLFLAG_RD, + &softc->tx_bytes_pri[3], "Transmitted bytes count pri3"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_packets_pri3", CTLFLAG_RD, + &softc->tx_packets_pri[3], "Transmitted packets count pri3"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_bytes_pri4", CTLFLAG_RD, + &softc->tx_bytes_pri[4], "Transmitted bytes count pri4"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_packets_pri4", CTLFLAG_RD, + &softc->tx_packets_pri[4], "Transmitted packets count pri4"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_bytes_pri5", CTLFLAG_RD, + &softc->tx_bytes_pri[5], "Transmitted bytes count pri5"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_packets_pri5", CTLFLAG_RD, + &softc->tx_packets_pri[5], "Transmitted packets count pri5"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_bytes_pri6", CTLFLAG_RD, + &softc->tx_bytes_pri[6], "Transmitted bytes count pri6"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_packets_pri6", CTLFLAG_RD, + &softc->tx_packets_pri[6], "Transmitted packets count pri6"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_bytes_pri7", CTLFLAG_RD, + &softc->tx_bytes_pri[7], "Transmitted bytes count pri7"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "tx_packets_pri7", CTLFLAG_RD, + &softc->tx_packets_pri[7], "Transmitted packets count pri7"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, "pfc_pri0_tx_duration_us", CTLFLAG_RD, &softc->tx_port_stats_ext->pfc_pri0_tx_duration_us, "Time duration between" @@ -731,6 +780,55 @@ bnxt_create_port_stats_sysctls(struct bnxt_softc *softc) "rx_packets_cos7", CTLFLAG_RD, &softc->rx_port_stats_ext->rx_packets_cos7, "Received packets count cos7"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_bytes_pri0", CTLFLAG_RD, + &softc->rx_bytes_pri[0], "Received bytes count pri0"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_packets_pri0", CTLFLAG_RD, + &softc->rx_packets_pri[0], "Received packets count pri0"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_bytes_pri1", CTLFLAG_RD, + &softc->rx_bytes_pri[1], "Received bytes count pri1"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_packets_pri1", CTLFLAG_RD, + &softc->rx_packets_pri[1], "Received packets count pri1"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_bytes_pri2", CTLFLAG_RD, + &softc->rx_bytes_pri[2], "Received bytes count pri2"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_packets_pri2", CTLFLAG_RD, + &softc->rx_packets_pri[2], "Received packets count pri2"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_bytes_pri3", CTLFLAG_RD, + &softc->rx_bytes_pri[3], "Received bytes count pri3"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_packets_pri3", CTLFLAG_RD, + &softc->rx_packets_pri[3], "Received packets count pri3"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_bytes_pri4", CTLFLAG_RD, + &softc->rx_bytes_pri[4], "Received bytes count pri4"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_packets_pri4", CTLFLAG_RD, + &softc->rx_packets_pri[4], "Received packets count pri4"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_bytes_pri5", CTLFLAG_RD, + &softc->rx_bytes_pri[5], "Received bytes count pri5"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_packets_pri5", CTLFLAG_RD, + &softc->rx_packets_pri[5], "Received packets count pri5"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_bytes_pri6", CTLFLAG_RD, + &softc->rx_bytes_pri[6], "Received bytes count pri6"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_packets_pri6", CTLFLAG_RD, + &softc->rx_packets_pri[6], "Received packets count pri6"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_bytes_pri7", CTLFLAG_RD, + &softc->rx_bytes_pri[7], "Received bytes count pri7"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, + "rx_packets_pri7", CTLFLAG_RD, + &softc->rx_packets_pri[7], "Received packets count pri7"); + SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, "pfc_pri0_rx_duration_us", CTLFLAG_RD, &softc->rx_port_stats_ext->pfc_pri0_rx_duration_us, "Time duration in receiving"