get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/54651/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 54651,
    "url": "https://patches.dpdk.org/api/patches/54651/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1560246526-264797-4-git-send-email-andy.pei@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1560246526-264797-4-git-send-email-andy.pei@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1560246526-264797-4-git-send-email-andy.pei@intel.com",
    "date": "2019-06-11T09:48:46",
    "name": "[v2,4/4] net/ipn3ke: implementation of statistics",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dfa69b5658cd8c26f7367e4078aacb2aec0ebd51",
    "submitter": {
        "id": 1185,
        "url": "https://patches.dpdk.org/api/people/1185/?format=api",
        "name": "Pei, Andy",
        "email": "andy.pei@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1560246526-264797-4-git-send-email-andy.pei@intel.com/mbox/",
    "series": [
        {
            "id": 4978,
            "url": "https://patches.dpdk.org/api/series/4978/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4978",
            "date": "2019-06-11T09:48:43",
            "name": "[v2,1/4] net/ipn3ke: add new register address",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/4978/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/54651/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/54651/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9CB891C389;\n\tTue, 11 Jun 2019 11:55:15 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id AF97B1C365\n\tfor <dev@dpdk.org>; Tue, 11 Jun 2019 11:55:08 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Jun 2019 02:55:08 -0700",
            "from dipei-st-npg.sh.intel.com ([10.67.110.220])\n\tby FMSMGA003.fm.intel.com with ESMTP; 11 Jun 2019 02:55:06 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Andy Pei <andy.pei@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "andy.pei@intel.com,\n\trosen.xu@intel.com",
        "Date": "Tue, 11 Jun 2019 17:48:46 +0800",
        "Message-Id": "<1560246526-264797-4-git-send-email-andy.pei@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1560246526-264797-1-git-send-email-andy.pei@intel.com>",
        "References": "<1559543493-215042-2-git-send-email-andy.pei@intel.com>\n\t<1560246526-264797-1-git-send-email-andy.pei@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 4/4] net/ipn3ke: implementation of statistics",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch implemente statistics read and reset\nfunction for ipn3ke.\n\nFixes: 70d6b7f550f4 (\"net/ipn3ke: add representor\")\nCc: rosen.xu@intel.com\n\nSigned-off-by: Andy Pei <andy.pei@intel.com>\n---\n drivers/net/ipn3ke/ipn3ke_representor.c | 6118 ++++++++++++++++++++++++++++++-\n 1 file changed, 6110 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c\nindex b166b8f..5602ae2 100644\n--- a/drivers/net/ipn3ke/ipn3ke_representor.c\n+++ b/drivers/net/ipn3ke/ipn3ke_representor.c\n@@ -3,6 +3,7 @@\n  */\n \n #include <stdint.h>\n+#include <unistd.h>\n \n #include <rte_bus_pci.h>\n #include <rte_ethdev.h>\n@@ -297,31 +298,6132 @@\n {\n }\n \n+/* Statistics collected by each port, VSI, VEB, and S-channel */\n+struct ipn3ke_rpst_eth_stats {\n+\tuint64_t tx_bytes;               /* gotc */\n+\tuint64_t tx_multicast;           /* mptc */\n+\tuint64_t tx_broadcast;           /* bptc */\n+\tuint64_t tx_unicast;             /* uptc */\n+\tuint64_t tx_discards;            /* tdpc */\n+\tuint64_t tx_errors;              /* tepc */\n+\tuint64_t rx_bytes;               /* gorc */\n+\tuint64_t rx_multicast;           /* mprc */\n+\tuint64_t rx_broadcast;           /* bprc */\n+\tuint64_t rx_unicast;             /* uprc */\n+\tuint64_t rx_discards;            /* rdpc */\n+\tuint64_t rx_unknown_protocol;    /* rupp */\n+};\n+\n+/* store statistics names and its offset in stats structure */\n+struct ipn3ke_rpst_xstats_name_offset {\n+\tchar name[RTE_ETH_XSTATS_NAME_SIZE];\n+\tunsigned int offset;\n+};\n+\n+static const struct ipn3ke_rpst_xstats_name_offset\n+ipn3ke_rpst_stats_strings[] = {\n+\t{\"tx_multicast_packets\",          offsetof(struct ipn3ke_rpst_eth_stats,\n+\t\t\t\t\t\t\ttx_multicast)},\n+\t{\"tx_broadcast_packets\",          offsetof(struct ipn3ke_rpst_eth_stats,\n+\t\t\t\t\t\t\ttx_broadcast)},\n+\t{\"tx_unicast_packets\",            offsetof(struct ipn3ke_rpst_eth_stats,\n+\t\t\t\t\t\t\ttx_unicast)},\n+\t{\"tx_dropped\",                    offsetof(struct ipn3ke_rpst_eth_stats,\n+\t\t\t\t\t\t\ttx_discards)},\n+\t{\"rx_multicast_packets\",          offsetof(struct ipn3ke_rpst_eth_stats,\n+\t\t\t\t\t\t\trx_multicast)},\n+\t{\"rx_broadcast_packets\",          offsetof(struct ipn3ke_rpst_eth_stats,\n+\t\t\t\t\t\t\trx_broadcast)},\n+\t{\"rx_unicast_packets\",            offsetof(struct ipn3ke_rpst_eth_stats,\n+\t\t\t\t\t\t\trx_unicast)},\n+\t{\"rx_dropped\",                    offsetof(struct ipn3ke_rpst_eth_stats,\n+\t\t\t\t\t\t\trx_discards)},\n+\t{\"rx_unknown_protocol_packets\", offsetof(struct ipn3ke_rpst_eth_stats,\n+\t\t\t\t\t\t\trx_unknown_protocol)},\n+};\n+\n+#define IPN3KE_RPST_ETH_XSTATS_CNT (sizeof(ipn3ke_rpst_stats_strings) / \\\n+\t\tsizeof(ipn3ke_rpst_stats_strings[0]))\n+\n+#define IPN3KE_RPST_PRIO_XSTATS_CNT    8\n+\n+/* Statistics collected by the MAC */\n+struct ipn3ke_rpst_hw_port_stats {\n+\t/* eth stats collected by the port */\n+\tstruct ipn3ke_rpst_eth_stats eth;\n+\n+\t/* additional port specific stats */\n+\tuint64_t tx_dropped_link_down;\n+\tuint64_t crc_errors;\n+\tuint64_t illegal_bytes;\n+\tuint64_t error_bytes;\n+\tuint64_t mac_local_faults;\n+\tuint64_t mac_remote_faults;\n+\tuint64_t rx_length_errors;\n+\tuint64_t link_xon_rx;\n+\tuint64_t link_xoff_rx;\n+\tuint64_t priority_xon_rx[IPN3KE_RPST_PRIO_XSTATS_CNT];\n+\tuint64_t priority_xoff_rx[IPN3KE_RPST_PRIO_XSTATS_CNT];\n+\tuint64_t link_xon_tx;\n+\tuint64_t link_xoff_tx;\n+\tuint64_t priority_xon_tx[IPN3KE_RPST_PRIO_XSTATS_CNT];\n+\tuint64_t priority_xoff_tx[IPN3KE_RPST_PRIO_XSTATS_CNT];\n+\tuint64_t priority_xon_2_xoff[IPN3KE_RPST_PRIO_XSTATS_CNT];\n+\tuint64_t rx_size_64;\n+\tuint64_t rx_size_65_127;\n+\tuint64_t rx_size_128_255;\n+\tuint64_t rx_size_256_511;\n+\tuint64_t rx_size_512_1023;\n+\tuint64_t rx_size_1024_1518;\n+\tuint64_t rx_size_big;\n+\tuint64_t rx_undersize;\n+\tuint64_t rx_fragments;\n+\tuint64_t rx_oversize;\n+\tuint64_t rx_jabber;\n+\tuint64_t tx_size_64;\n+\tuint64_t tx_size_65_127;\n+\tuint64_t tx_size_128_255;\n+\tuint64_t tx_size_256_511;\n+\tuint64_t tx_size_512_1023;\n+\tuint64_t tx_size_1024_1518;\n+\tuint64_t tx_size_1519_to_max;\n+\tuint64_t mac_short_packet_dropped;\n+\tuint64_t checksum_error;\n+\t/* flow director stats */\n+\tuint64_t fd_atr_match;\n+\tuint64_t fd_sb_match;\n+\tuint64_t fd_atr_tunnel_match;\n+\tuint32_t fd_atr_status;\n+\tuint32_t fd_sb_status;\n+\t/* EEE LPI */\n+\tuint32_t tx_lpi_status;\n+\tuint32_t rx_lpi_status;\n+\tuint64_t tx_lpi_count;\n+\tuint64_t rx_lpi_count;\n+};\n+\n+static const struct ipn3ke_rpst_xstats_name_offset\n+ipn3ke_rpst_hw_port_strings[] = {\n+\t{\"tx_link_down_dropped\",      offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\ttx_dropped_link_down)},\n+\t{\"rx_crc_errors\",             offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\tcrc_errors)},\n+\t{\"rx_illegal_byte_errors\",    offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\tillegal_bytes)},\n+\t{\"rx_error_bytes\",            offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\terror_bytes)},\n+\t{\"mac_local_errors\",          offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\tmac_local_faults)},\n+\t{\"mac_remote_errors\",         offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\tmac_remote_faults)},\n+\t{\"rx_length_errors\",          offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\trx_length_errors)},\n+\t{\"tx_xon_packets\",            offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\tlink_xon_tx)},\n+\t{\"rx_xon_packets\",            offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\tlink_xon_rx)},\n+\t{\"tx_xoff_packets\",           offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\tlink_xoff_tx)},\n+\t{\"rx_xoff_packets\",           offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\tlink_xoff_rx)},\n+\t{\"rx_size_64_packets\",        offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\trx_size_64)},\n+\t{\"rx_size_65_to_127_packets\", offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t\trx_size_65_127)},\n+\t{\"rx_size_128_to_255_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t rx_size_128_255)},\n+\t{\"rx_size_256_to_511_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t rx_size_256_511)},\n+\t{\"rx_size_512_to_1023_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t rx_size_512_1023)},\n+\t{\"rx_size_1024_to_1518_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t rx_size_1024_1518)},\n+\t{\"rx_size_1519_to_max_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t rx_size_big)},\n+\t{\"rx_undersized_errors\",      offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       rx_undersize)},\n+\t{\"rx_oversize_errors\",        offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       rx_oversize)},\n+\t{\"rx_mac_short_dropped\",      offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       mac_short_packet_dropped)},\n+\t{\"rx_fragmented_errors\",      offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       rx_fragments)},\n+\t{\"rx_jabber_errors\",          offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       rx_jabber)},\n+\t{\"tx_size_64_packets\",        offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       tx_size_64)},\n+\t{\"tx_size_65_to_127_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t tx_size_65_127)},\n+\t{\"tx_size_128_to_255_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t tx_size_128_255)},\n+\t{\"tx_size_256_to_511_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t tx_size_256_511)},\n+\t{\"tx_size_512_to_1023_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t tx_size_512_1023)},\n+\t{\"tx_size_1024_to_1518_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t tx_size_1024_1518)},\n+\t{\"tx_size_1519_to_max_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t tx_size_1519_to_max)},\n+\t{\"rx_flow_director_atr_match_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t fd_atr_match)},\n+\t{\"rx_flow_director_sb_match_packets\",\n+\t\t\t\toffsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t fd_sb_match)},\n+\t{\"tx_low_power_idle_status\",  offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       tx_lpi_status)},\n+\t{\"rx_low_power_idle_status\",  offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       rx_lpi_status)},\n+\t{\"tx_low_power_idle_count\",   offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       tx_lpi_count)},\n+\t{\"rx_low_power_idle_count\",   offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       rx_lpi_count)},\n+};\n+\n+#define IPN3KE_RPST_HW_PORT_XSTATS_CNT (sizeof(ipn3ke_rpst_hw_port_strings) \\\n+\t\t/ sizeof(ipn3ke_rpst_hw_port_strings[0]))\n+\n+static const struct ipn3ke_rpst_xstats_name_offset\n+ipn3ke_rpst_rxq_prio_strings[] = {\n+\t{\"xon_packets\",               offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       priority_xon_rx)},\n+\t{\"xoff_packets\",              offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       priority_xoff_rx)},\n+};\n+\n+#define IPN3KE_RPST_RXQ_PRIO_XSTATS_CNT (sizeof(ipn3ke_rpst_rxq_prio_strings) \\\n+\t\t/ sizeof(ipn3ke_rpst_rxq_prio_strings[0]))\n+\n+static const struct ipn3ke_rpst_xstats_name_offset\n+ipn3ke_rpst_txq_prio_strings[] = {\n+\t{\"xon_packets\",               offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       priority_xon_tx)},\n+\t{\"xoff_packets\",              offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       priority_xoff_tx)},\n+\t{\"xon_to_xoff_packets\",       offsetof(struct ipn3ke_rpst_hw_port_stats,\n+\t\t\t\t\t       priority_xon_2_xoff)},\n+};\n+\n+#define IPN3KE_RPST_TXQ_PRIO_XSTATS_CNT (sizeof(ipn3ke_rpst_txq_prio_strings) \\\n+\t\t/ sizeof(ipn3ke_rpst_txq_prio_strings[0]))\n+\n+static uint32_t\n+ipn3ke_rpst_xstats_calc_num(void)\n+{\n+\treturn IPN3KE_RPST_ETH_XSTATS_CNT\n+\t\t+ IPN3KE_RPST_HW_PORT_XSTATS_CNT\n+\t\t+ (IPN3KE_RPST_RXQ_PRIO_XSTATS_CNT\n+\t\t\t* IPN3KE_RPST_PRIO_XSTATS_CNT)\n+\t\t+ (IPN3KE_RPST_TXQ_PRIO_XSTATS_CNT\n+\t\t\t* IPN3KE_RPST_PRIO_XSTATS_CNT);\n+}\n+\n+#if 0\n+\n static int\n-ipn3ke_rpst_stats_get(__rte_unused struct rte_eth_dev *ethdev,\n-\t__rte_unused struct rte_eth_stats *stats)\n+ipn3ke_read_25G_NICside_stats_registers\n+(struct ipn3ke_hw *hw,\n+uint16_t port_id,\n+struct ipn3ke_rpst_hw_port_stats *hw_stats)\n {\n+\tuint32_t tmp;\n+\tuint32_t statistics_lo;\n+\tuint32_t statistics_hi;\n+\tuint64_t statistics;\n+\n+\tmemset(hw_stats, 0, sizeof(*hw_stats));\n+\n+\t/*check Tx statistics is real time.\n+\t *if statistics has been paused, make it real time.\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\n+\tif (tmp & IPN3KE_25G_TX_STATISTICS_CONFIG_SHADOW_REQUEST_MASK) {\n+\t\ttmp &= 0xfffffffb;\n+\t\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\t}\n+\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_25G_TX_STATISTICS_STATUS,\n+\t\tport_id,\n+\t\t1);\n+\tif (tmp & IPN3KE_25G_TX_STATISTICS_STATUS_SHADOW_REQUEST_MASK) {\n+\t\ttmp = 0x00000000;\n+\t\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\t\ttmp &= 0xfffffffb;\n+\t\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\t}\n+\n+\t/*check Rx statistics is real time.\n+\t *if statistics has been paused, make it real time.\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tif (tmp & IPN3KE_25G_RX_STATISTICS_CONFIG_SHADOW_REQUEST_MASK) {\n+\t\ttmp &= 0xfffffffb;\n+\t\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\t}\n+\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_25G_RX_STATISTICS_STATUS,\n+\t\tport_id,\n+\t\t1);\n+\n+\tif (tmp & IPN3KE_25G_RX_STATISTICS_STATUS_SHADOW_REQUEST_MASK) {\n+\t\ttmp = 0x00000000;\n+\t\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\t\ttmp &= 0xfffffffb;\n+\t\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\t}\n+\n+\t/* pause Tx counter to read the statistics */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\tport_id,\n+\t\t1);\n+\ttmp |= 0x00000004;\n+\t(*hw->f_mac_write)(hw,\n+\t\ttmp,\n+\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\tport_id,\n+\t\t1);\n+\n+\t/* pause Rx counter to read the statistics */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\tport_id,\n+\t\t1);\n+\ttmp |= 0x00000004;\n+\t(*hw->f_mac_write)(hw,\n+\t\ttmp,\n+\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\tport_id,\n+\t\t1);\n+\n+\t/*Number of transmitted frames less than 64 bytes\n+\t *and reporting a CRC error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_FRAGMENTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_FRAGMENTS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\thw_stats->crc_errors += statistics;\n+\n+\t/*Number of transmitted oversized frames reporting a CRC error*/\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_JABBERS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_JABBERS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\thw_stats->crc_errors += statistics;\n+\n+\t/* Number of transmitted packets with FCS errors */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_FCS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_FCS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\thw_stats->checksum_error += statistics;\n+\n+\t/*Number of transmitted frames with a frame of length at\n+\t *least 64 reporting a CRC error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_CRCERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_CRCERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\thw_stats->crc_errors += statistics;\n+\n+\t/*Number of errored multicast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/*Number of errored broadcast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/*Number of errored unicast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/* Number of errored multicast control frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/* Number of errored broadcast control frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/* Number of errored unicast control frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/* Number of errored pause frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_PAUSE_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_PAUSE_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/*Number of 64-byte transmitted frames,\n+\t *including the CRC field but excluding the preamble\n+\t *and SFD bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_64B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_64B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_64 += statistics;\n+\n+\t/* Number of transmitted frames between 65 and 127 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_65_127B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_65_127B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_65_127 += statistics;\n+\n+\t/* Number of transmitted frames between 128 and 255 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_128_255B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_128_255B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_128_255 += statistics;\n+\n+\t/* Number of transmitted frames between 256 and 511 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_256_511B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_256_511B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_256_511 += statistics;\n+\n+\t/* Number of transmitted frames between 512 and 1023 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_512_1023B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_512_1023B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_512_1023 += statistics;\n+\n+\t/* Number of transmitted frames between 1024 and 1518 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_1024_1518B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_1024_1518B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_1024_1518 += statistics;\n+\n+\t/*Number of transmitted frames of size between 1519 bytes\n+\t *and the number of bytes specified in the MAX_TX_SIZE_CONFIG\n+\t *register\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_1519_MAXB_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_1519_MAXB_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_1519_to_max += statistics;\n+\n+\t/*Number of oversized frames (frames with more bytes than the\n+\t *number specified in the MAX_TX_SIZE_CONFIG register)\n+\t *transmitted\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_OVERSIZE_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_OVERSIZE_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of valid multicast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_multicast += statistics;\n+\n+\t/*Number of valid broadcast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_broadcast += statistics;\n+\n+\t/*Number of valid unicast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_unicast += statistics;\n+\n+\t/*Number of valid multicast frames transmitted,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_multicast += statistics;\n+\n+\t/*Number of valid broadcast frames transmitted,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_broadcast += statistics;\n+\n+\t/*Number of valid unicast frames transmitted,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_unicast += statistics;\n+\n+\t/* Number of valid pause frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_PAUSE_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_PAUSE_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of transmitted runt packets. The IP core does not\n+\t *transmit frames of length less than nine bytes.\n+\t *The IP core pads frames of length nine bytes to 64 bytes to\n+\t *extend them to 64 bytes. Therefore, this counter does not\n+\t *increment in normal operating conditions.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_RUNT_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_RUNT_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of transmitted payload bytes in frames with no FCS,\n+\t *undersized, oversized, or payload length errors.\n+\t *If VLAN detection is turned off for the TX MAC (bit[1]\n+\t *of the TX_MAC_CONTROL register at offset 0x40A has\n+\t *the value of 1), the IP core counts the VLAN header bytes\n+\t *(4 bytes for VLAN and 8 bytes for stacked VLAN)\n+\t *as payload bytes. This register is compliant with\n+\t *the requirements for aOctetsTransmittedOK in section\n+\t *5.2.2.1.8 of the IEEE Standard 802.3-2008.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_TX_PAYLOAD_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_TX_PAYLOAD_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_bytes += statistics;\n+\n+\t/*Number of transmitted bytes in frames with no FCS, undersized,\n+\t *oversized, or payload length errors. This register is\n+\t *compliant with the requirements for ifOutOctets in RFC3635\n+\t *(Managed Objects for Ethernet-like Interface Types)\n+\t *and TX etherStatsOctets in RFC2819(Remote Network Monitoring\n+\t *Management Information Base (RMON)).\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_TX_FRAME_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_TX_FRAME_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of received frames less than 64 bytes\n+\t *and reporting a CRC error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_FRAGMENTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_FRAGMENTS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\thw_stats->crc_errors += statistics;\n+\thw_stats->rx_length_errors += statistics;\n+\n+\t/* Number of received oversized frames reporting a CRC error */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_JABBERS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_JABBERS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\thw_stats->crc_errors += statistics;\n+\thw_stats->rx_length_errors += statistics;\n+\n+\t/*Number of received packets with FCS errors.\n+\t *This register maintains a count of the number of pulses\n+\t *on the \"l<n>_rx_fcs_error\" or \"rx_fcs_error\" output signal\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_FCS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_FCS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\thw_stats->checksum_error += statistics;\n+\n+\t/*Number of received frames with a frame of length at least 64\n+\t *with CRC error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_CRCERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_CRCERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\thw_stats->crc_errors += statistics;\n+\n+\t/*Number of errored multicast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/*Number of errored broadcast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/*Number of errored unicast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/* Number of errored multicast control frames received */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/* Number of errored broadcast control frames received */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/* Number of errored unicast control frames received */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/* Number of errored pause frames received */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_PAUSE_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_PAUSE_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/*Number of 64-byte received frames,\n+\t *including the CRC field but excluding the preamble\n+\t *and SFD bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_64B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_64B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_64 += statistics;\n+\n+\t/*Number of received frames between 65 and 127 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_65_127B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_65_127B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_65_127 += statistics;\n+\n+\t/*Number of received frames between 128 and 255 bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_128_255B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_128_255B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_128_255 += statistics;\n+\n+\t/*Number of received frames between 256 and 511 bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_256_511B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_256_511B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_256_511 += statistics;\n+\n+\t/*Number of received frames between 512 and 1023 bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_512_1023B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_512_1023B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_512_1023 += statistics;\n+\n+\t/*Number of received frames between 1024 and 1518 bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_1024_1518B_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_1024_1518B_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_1024_1518 += statistics;\n+\n+\t/*Number of received frames of size between 1519 bytes\n+\t *and the number of bytes specified in the MAX_TX_SIZE_CONFIG\n+\t *register\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_1519_MAXB_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_1519_MAXB_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_big += statistics;\n+\n+\t/*Number of oversized frames (frames with more bytes\n+\t *than the number specified in the MAX_TX_SIZE_CONFIG register)\n+\t *received\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_OVERSIZE_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_OVERSIZE_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_jabber += statistics;\n+\n+\t/*Number of valid multicast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_multicast += statistics;\n+\n+\t/*Number of valid broadcast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_broadcast += statistics;\n+\n+\t/*Number of valid unicast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_unicast += statistics;\n+\n+\t/*Number of valid multicast frames received,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_multicast += statistics;\n+\n+\t/*Number of valid broadcast frames received,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_broadcast += statistics;\n+\n+\t/*Number of valid unicast frames received,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_unicast += statistics;\n+\n+\t/*Number of received pause frames, with or without error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_PAUSE_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_PAUSE_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of received runt packets. A runt is a packet of size\n+\t *less than 64 bytes but greater than eight bytes.\n+\t *If a packet is eight bytes or smaller, it is considered\n+\t *a decoding error and not a runt frame, and the IP core\n+\t *does not flag it nor count it as a runt.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_RUNT_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_RUNT_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of received payload bytes in frames with no FCS,\n+\t *undersized, oversized, or payload length errors.\n+\t *If VLAN detection is turned off for the RX MAC (bit [1] of the\n+\t *\"RXMAC_CONTROL\" register at offset 0x50A has the value of 1),\n+\t *the IP core counts the VLAN header bytes (4 bytes for VLAN and\n+\t *8 bytes for stacked VLAN) as payload bytes.\n+\t *This register is compliant with the requirements for\n+\t *aOctetsReceivedOK in section 5.2.2.1.14 of the IEEE Standard\n+\t *802.3-2008\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_RX_PAYLOAD_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_RX_PAYLOAD_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_bytes += statistics;\n+\n+\t/*Number of received bytes in frames with no FCS, undersized,\n+\t *oversized, or payload length errors.\n+\t *This register is compliant with the requirements for\n+\t *ifInOctets in RFC3635 (Managed Objects for Ethernet-like\n+\t *Interface Types) and RX etherStatsOctets in RFC2819\n+\t *(Remote Network Monitoring Management Information Base\n+\t *(RMON)).\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_RX_FRAME_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_RX_FRAME_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*resume Tx counter to real time\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\ttmp &= 0xfffffffb;\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\n+\t/*resume Rx counter to real time\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\ttmp &= 0xfffffffb;\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\n \treturn 0;\n }\n \n+#endif\n+\n+static void\n+ipn3ke_rpst_25G_NICside_TX_stats_reset(struct ipn3ke_hw *hw,\n+uint16_t port_id)\n+{\n+\tuint32_t tmp = 0x00000001;\n+\t/* Bit[0]: Software can set this bit to the value of 1\n+\t * to reset all of the TX statistics registers at the same time.\n+\t * This bit is selfclearing.\n+\t */\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\n+\twhile (tmp & 0x00000001) {\n+\t\ttmp = 0x00000000;\n+\t\t(*hw->f_mac_read)(hw,\n+\t\t\t\t&tmp,\n+\t\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\t\tport_id,\n+\t\t\t\t1);\n+\t\tif (tmp & 0x00000001)\n+\t\t\tusleep(5);\n+\t\telse\n+\t\t\treturn;\n+\t}\n+}\n+\n+static void\n+ipn3ke_rpst_25G_NICside_RX_stats_reset(struct ipn3ke_hw *hw,\n+uint16_t port_id)\n+{\n+\tuint32_t tmp = 0x00000001;\n+\t/* Bit[0]: Software can set this bit to the value of 1\n+\t * to reset all of the RX statistics registers at the same time.\n+\t * This bit is selfclearing.\n+\t */\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t1);\n+\n+\twhile (tmp & 0x00000001) {\n+\t\ttmp = 0x00000000;\n+\t\t(*hw->f_mac_read)(hw,\n+\t\t\t\t&tmp,\n+\t\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\t\tport_id,\n+\t\t\t\t1);\n+\t\tif (tmp & 0x00000001)\n+\t\t\tusleep(5);\n+\t\telse\n+\t\t\treturn;\n+\t}\n+}\n+\n+#if 0\n+\n static int\n-ipn3ke_rpst_xstats_get(__rte_unused struct rte_eth_dev *dev,\n-\t__rte_unused struct rte_eth_xstat *xstats, __rte_unused unsigned int n)\n+ipn3ke_read_10G_NICside_stats_registers\n+(struct ipn3ke_hw *hw,\n+uint16_t port_id,\n+struct ipn3ke_rpst_hw_port_stats *hw_stats,\n+struct rte_eth_stats *stats)\n {\n+\tuint32_t statistics_lo = 0;\n+\tuint32_t statistics_hi = 0;\n+\tuint64_t statistics = 0;\n+\n+\tmemset(hw_stats, 0, sizeof(*hw_stats));\n+\tmemset(stats, 0, sizeof(*stats));\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *that are successfully transmitted, including control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->opackets = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *that are successfully received, including control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->ipackets = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *transmitted with error, including control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->oerrors = statistics;\n+\thw_stats->eth.tx_errors = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *received with error, including control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->ierrors = statistics;\n+\thw_stats->eth.rx_discards = statistics;\n+\n+\t/*36-bit statistics counter that collects the number\n+\t *of RX frames with CRC error.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_CRC_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_CRC_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->crc_errors = statistics;\n+\n+\t/*64-bit statistics counter that collects the payload length,\n+\t *including the bytes in control frames.\n+\t *The payload length is the number of data and padding bytes\n+\t *transmitted.\n+\t *If the tx_vlan_detection[0] register bit is set to 1,\n+\t *the VLAN and stacked VLAN tags are counted as part of\n+\t *the TX payload.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->obytes = statistics;\n+\thw_stats->eth.tx_bytes = statistics;\n+\n+\t/*64-bit statistics counter that collects the payload length,\n+\t *including the bytes in control frames.\n+\t *The payload length is the number of data and padding bytes\n+\t *received.\n+\t *If the rx_vlan_detection[0] register bit is set to 1,\n+\t *the VLAN and stacked VLAN tags are counted as part of\n+\t *the RX payload.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->ibytes = statistics;\n+\thw_stats->eth.rx_bytes = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid pause frames transmitted.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_PAUSE_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_PAUSE_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid pause frames received.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_PAUSE_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_PAUSE_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *transmitted that are invalid and with error.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_IF_ERRORS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_IF_ERRORS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *received that are invalid and with error.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_IF_ERRORS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_IF_ERRORS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good unicast frames transmitted,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_unicast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good unicast frames received,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_unicast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *unicast frames transmitted with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *unicast frames received with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good multicast frames transmitted,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_multicast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good multicast frames received,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_multicast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *multicast frames transmitted with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number\n+\t *of multicast frames received with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good broadcast frames transmitted,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_broadcast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good broadcast frames received,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_broadcast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number\n+\t *of broadcast frames transmitted with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *broadcast frames received with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*64-bit statistics counter that collects the total number of\n+\t *octets transmitted.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*64-bit statistics counter that collects the total number of\n+\t *octets received.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the total number of\n+\t *good, errored, and invalid frames transmitted.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the total number of\n+\t *good, errored, and invalid frames received.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *undersized TX frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_UNDER_SIZE_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_UNDER_SIZE_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *undersized RX frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_UNDER_SIZE_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_UNDER_SIZE_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_undersize = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames whose length exceeds the maximum frame length\n+\t *specified.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_OVER_SIZE_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_OVER_SIZE_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames whose length exceeds the maximum frame length\n+\t *specified.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_OVER_SIZE_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_OVER_SIZE_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_oversize = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *64-byte TX frames,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_64_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_64_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_64 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *64-byte RX frames,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_64_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_64_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_64 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 65 and 127 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_65_127_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_65_127_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_65_127 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 65 and 127 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_65_127_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_65_127_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_65_127 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 128 and 255 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_128_255_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_128_255_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_128_255 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 128 and 255 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_128_255_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_128_255_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_128_255 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 256 and 511 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_256_511_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_256_511_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_256_511 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 256 and 511 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_256_511_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_256_511_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_256_511 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 512 and 1023 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_512_1023_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_512_1023_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_512_1023 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 512 and 1023 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_512_1023_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_512_1023_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_512_1023 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 1024 and 1518 bytes,\n+\t *including the CRC field but\n+\t *excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&statistics_lo,\n+\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_1024_1518_OCTETS_LO,\n+\t\tport_id,\n+\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&statistics_hi,\n+\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_1024_1518_OCTETS_HI,\n+\t\tport_id,\n+\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_1024_1518 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 1024 and 1518 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&statistics_lo,\n+\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_1024_1518_OCTETS_LO,\n+\t\tport_id,\n+\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&statistics_hi,\n+\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_1024_1518_OCTETS_HI,\n+\t\tport_id,\n+\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_1024_1518 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames equal or more than the length of 1,519 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_1519_X_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_1519_X_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_1519_to_max = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames equal or more than the length of 1,519 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good,\n+\t *errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_1519_X_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_1519_X_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_big = statistics;\n+\n+\t/*36-bit statistics counter that collects the total number of\n+\t *RX frames with length less than 64 bytes and CRC error.\n+\t *The MAC does not drop these frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_FRAGMENTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_FRAGMENTS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *oversized RX frames with CRC error.\n+\t *The MAC does not drop these frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_JABBERS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_JABBERS_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames with CRC error,\n+\t *whose length is between 64 and the maximum frame length\n+\t *specified in the register.\n+\t *The MAC does not drop these frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_CRC_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_CRC_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid TX unicast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_unicast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid RX unicast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_unicast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid TX multicast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_multicast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid RX multicast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_multicast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid TX broadcast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_broadcast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid RX broadcast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_broadcast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid TX PFC frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_PFC_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_PFC_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid RX PFC frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_PFC_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_PFC_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n \treturn 0;\n }\n \n+#endif\n+\n+static void\n+ipn3ke_rpst_10G_NICside_TX_stats_reset(struct ipn3ke_hw *hw,\n+uint16_t port_id)\n+{\n+\tuint32_t tmp;\n+\n+\t/*Bit [0]: Set this register to 1 to clear all TX statistics\n+\t *counters.\n+\t *The IP core clears this bit when all counters are cleared.\n+\t *Bits [31:1]: Reserved.\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_10G_TX_STATS_CLR,\n+\t\tport_id,\n+\t\t1);\n+\ttmp |= 0x00000001;\n+\t(*hw->f_mac_write)(hw,\n+\t\ttmp,\n+\t\tIPN3KE_10G_TX_STATS_CLR,\n+\t\tport_id,\n+\t\t1);\n+}\n+\n+static void\n+ipn3ke_rpst_10G_NICside_RX_stats_reset(struct ipn3ke_hw *hw,\n+uint16_t port_id)\n+{\n+\tuint32_t tmp;\n+\n+\t/*Bit [0]: Set this register to 1 to clear all RX statistics\n+\t *counters.\n+\t *The IP core clears this bit when all counters are cleared.\n+\t *Bits [31:1]: Reserved\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_10G_RX_STATS_CLR,\n+\t\tport_id,\n+\t\t1);\n+\ttmp |= 0x00000001;\n+\t(*hw->f_mac_write)(hw,\n+\t\ttmp,\n+\t\tIPN3KE_10G_RX_STATS_CLR,\n+\t\tport_id,\n+\t\t1);\n+}\n+\n static int\n-ipn3ke_rpst_xstats_get_names(__rte_unused struct rte_eth_dev *dev,\n-\t\t__rte_unused struct rte_eth_xstat_name *xstats_names,\n-\t\t__rte_unused unsigned int limit)\n+ipn3ke_read_25G_Lineside_stats_registers\n+(struct ipn3ke_hw *hw,\n+uint16_t port_id,\n+struct ipn3ke_rpst_hw_port_stats *hw_stats)\n {\n+\tuint32_t tmp;\n+\tuint32_t statistics_lo;\n+\tuint32_t statistics_hi;\n+\tuint64_t statistics;\n+\n+\tmemset(hw_stats, 0, sizeof(*hw_stats));\n+\n+\t/*check Tx statistics is real time.\n+\t *if statistics has been paused, make it real time.\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\n+\tif (tmp & IPN3KE_25G_TX_STATISTICS_CONFIG_SHADOW_REQUEST_MASK) {\n+\t\ttmp &= 0xfffffffb;\n+\t\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\t}\n+\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_25G_TX_STATISTICS_STATUS,\n+\t\tport_id,\n+\t\t1);\n+\tif (tmp & IPN3KE_25G_TX_STATISTICS_STATUS_SHADOW_REQUEST_MASK) {\n+\t\ttmp = 0x00000000;\n+\t\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\t\ttmp &= 0xfffffffb;\n+\t\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\t}\n+\n+\t/*check Rx statistics is real time.\n+\t *if statistics has been paused, make it real time.\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tif (tmp & IPN3KE_25G_RX_STATISTICS_CONFIG_SHADOW_REQUEST_MASK) {\n+\t\ttmp &= 0xfffffffb;\n+\t\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\t}\n+\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_25G_RX_STATISTICS_STATUS,\n+\t\tport_id,\n+\t\t0);\n+\n+\tif (tmp & IPN3KE_25G_RX_STATISTICS_STATUS_SHADOW_REQUEST_MASK) {\n+\t\ttmp = 0x00000000;\n+\t\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\t\ttmp &= 0xfffffffb;\n+\t\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\t}\n+\n+\t/* pause Tx counter to read the statistics */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\tport_id,\n+\t\t0);\n+\ttmp |= 0x00000004;\n+\t(*hw->f_mac_write)(hw,\n+\t\ttmp,\n+\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\tport_id,\n+\t\t0);\n+\n+\t/* pause Rx counter to read the statistics */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\tport_id,\n+\t\t0);\n+\ttmp |= 0x00000004;\n+\t(*hw->f_mac_write)(hw,\n+\t\ttmp,\n+\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\tport_id,\n+\t\t0);\n+\n+\t/*Number of transmitted frames less than 64 bytes\n+\t *and reporting a CRC error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_FRAGMENTS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_FRAGMENTS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\thw_stats->crc_errors += statistics;\n+\n+\t/*Number of transmitted oversized frames reporting a CRC error*/\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_JABBERS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_JABBERS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\thw_stats->crc_errors += statistics;\n+\n+\t/* Number of transmitted packets with FCS errors */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_FCS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_FCS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\thw_stats->checksum_error += statistics;\n+\n+\t/*Number of transmitted frames with a frame of length at\n+\t *least 64 reporting a CRC error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_CRCERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_CRCERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\thw_stats->crc_errors += statistics;\n+\n+\t/*Number of errored multicast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/*Number of errored broadcast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/*Number of errored unicast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/* Number of errored multicast control frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/* Number of errored broadcast control frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/* Number of errored unicast control frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/* Number of errored pause frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_PAUSE_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_PAUSE_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_errors += statistics;\n+\n+\t/*Number of 64-byte transmitted frames,\n+\t *including the CRC field but excluding the preamble\n+\t *and SFD bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_64B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_64B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_64 += statistics;\n+\n+\t/* Number of transmitted frames between 65 and 127 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_65_127B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_65_127B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_65_127 += statistics;\n+\n+\t/* Number of transmitted frames between 128 and 255 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_128_255B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_128_255B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_128_255 += statistics;\n+\n+\t/* Number of transmitted frames between 256 and 511 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_256_511B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_256_511B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_256_511 += statistics;\n+\n+\t/* Number of transmitted frames between 512 and 1023 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_512_1023B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_512_1023B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_512_1023 += statistics;\n+\n+\t/* Number of transmitted frames between 1024 and 1518 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_1024_1518B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_1024_1518B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_1024_1518 += statistics;\n+\n+\t/*Number of transmitted frames of size between 1519 bytes\n+\t *and the number of bytes specified in the MAX_TX_SIZE_CONFIG\n+\t *register\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_1519_MAXB_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_1519_MAXB_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_1519_to_max += statistics;\n+\n+\t/*Number of oversized frames (frames with more bytes than the\n+\t *number specified in the MAX_TX_SIZE_CONFIG register)\n+\t *transmitted\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_OVERSIZE_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_OVERSIZE_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of valid multicast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_multicast += statistics;\n+\n+\t/*Number of valid broadcast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_broadcast += statistics;\n+\n+\t/*Number of valid unicast frames transmitted,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_unicast += statistics;\n+\n+\t/*Number of valid multicast frames transmitted,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_MCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_multicast += statistics;\n+\n+\t/*Number of valid broadcast frames transmitted,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_BCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_broadcast += statistics;\n+\n+\t/*Number of valid unicast frames transmitted,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_UCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_unicast += statistics;\n+\n+\t/* Number of valid pause frames transmitted */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_PAUSE_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_PAUSE_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of transmitted runt packets. The IP core does not\n+\t *transmit frames of length less than nine bytes.\n+\t *The IP core pads frames of length nine bytes to 64 bytes to\n+\t *extend them to 64 bytes. Therefore, this counter does not\n+\t *increment in normal operating conditions.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_TX_RUNT_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_TX_RUNT_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of transmitted payload bytes in frames with no FCS,\n+\t *undersized, oversized, or payload length errors.\n+\t *If VLAN detection is turned off for the TX MAC (bit[1]\n+\t *of the TX_MAC_CONTROL register at offset 0x40A has\n+\t *the value of 1), the IP core counts the VLAN header bytes\n+\t *(4 bytes for VLAN and 8 bytes for stacked VLAN)\n+\t *as payload bytes. This register is compliant with\n+\t *the requirements for aOctetsTransmittedOK in section\n+\t *5.2.2.1.8 of the IEEE Standard 802.3-2008.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_TX_PAYLOAD_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_TX_PAYLOAD_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_bytes += statistics;\n+\n+\t/*Number of transmitted bytes in frames with no FCS, undersized,\n+\t *oversized, or payload length errors. This register is\n+\t *compliant with the requirements for ifOutOctets in RFC3635\n+\t *(Managed Objects for Ethernet-like Interface Types)\n+\t *and TX etherStatsOctets in RFC2819(Remote Network Monitoring\n+\t *Management Information Base (RMON)).\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_TX_FRAME_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_TX_FRAME_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of received frames less than 64 bytes\n+\t *and reporting a CRC error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_FRAGMENTS_LO,\n+\t\t\tport_id,\n+\t\t\t1);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_FRAGMENTS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\thw_stats->crc_errors += statistics;\n+\thw_stats->rx_length_errors += statistics;\n+\n+\t/* Number of received oversized frames reporting a CRC error */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_JABBERS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_JABBERS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\thw_stats->crc_errors += statistics;\n+\thw_stats->rx_length_errors += statistics;\n+\n+\t/*Number of received packets with FCS errors.\n+\t *This register maintains a count of the number of pulses\n+\t *on the \"l<n>_rx_fcs_error\" or \"rx_fcs_error\" output signal\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_FCS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_FCS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\thw_stats->checksum_error += statistics;\n+\n+\t/*Number of received frames with a frame of length at least 64\n+\t *with CRC error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_CRCERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_CRCERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\thw_stats->crc_errors += statistics;\n+\n+\t/*Number of errored multicast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/*Number of errored broadcast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/*Number of errored unicast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_DATA_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_DATA_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/* Number of errored multicast control frames received */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/* Number of errored broadcast control frames received */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/* Number of errored unicast control frames received */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_CTRL_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_CTRL_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/* Number of errored pause frames received */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_PAUSE_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_PAUSE_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_discards += statistics;\n+\n+\t/*Number of 64-byte received frames,\n+\t *including the CRC field but excluding the preamble\n+\t *and SFD bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_64B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_64B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_64 += statistics;\n+\n+\t/*Number of received frames between 65 and 127 bytes */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_65_127B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_65_127B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_65_127 += statistics;\n+\n+\t/*Number of received frames between 128 and 255 bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_128_255B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_128_255B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_128_255 += statistics;\n+\n+\t/*Number of received frames between 256 and 511 bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_256_511B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_256_511B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_256_511 += statistics;\n+\n+\t/*Number of received frames between 512 and 1023 bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_512_1023B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_512_1023B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_512_1023 += statistics;\n+\n+\t/*Number of received frames between 1024 and 1518 bytes\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_1024_1518B_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_1024_1518B_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_1024_1518 += statistics;\n+\n+\t/*Number of received frames of size between 1519 bytes\n+\t *and the number of bytes specified in the MAX_TX_SIZE_CONFIG\n+\t *register\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_1519_MAXB_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_1519_MAXB_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_big += statistics;\n+\n+\t/*Number of oversized frames (frames with more bytes\n+\t *than the number specified in the MAX_TX_SIZE_CONFIG register)\n+\t *received\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_OVERSIZE_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_OVERSIZE_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_jabber += statistics;\n+\n+\t/*Number of valid multicast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_multicast += statistics;\n+\n+\t/*Number of valid broadcast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_broadcast += statistics;\n+\n+\t/*Number of valid unicast frames received,\n+\t *excluding control frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_DATA_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_DATA_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_unicast += statistics;\n+\n+\t/*Number of valid multicast frames received,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_MCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_multicast += statistics;\n+\n+\t/*Number of valid broadcast frames received,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_BCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_broadcast += statistics;\n+\n+\t/*Number of valid unicast frames received,\n+\t *excluding data frames\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_CTRL_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_UCAST_CTRL_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_unicast += statistics;\n+\n+\t/*Number of received pause frames, with or without error\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_PAUSE_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_PAUSE_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of received runt packets. A runt is a packet of size\n+\t *less than 64 bytes but greater than eight bytes.\n+\t *If a packet is eight bytes or smaller, it is considered\n+\t *a decoding error and not a runt frame, and the IP core\n+\t *does not flag it nor count it as a runt.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_CNTR_RX_RUNT_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_CNTR_RX_RUNT_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*Number of received payload bytes in frames with no FCS,\n+\t *undersized, oversized, or payload length errors.\n+\t *If VLAN detection is turned off for the RX MAC (bit [1] of the\n+\t *\"RXMAC_CONTROL\" register at offset 0x50A has the value of 1),\n+\t *the IP core counts the VLAN header bytes (4 bytes for VLAN and\n+\t *8 bytes for stacked VLAN) as payload bytes.\n+\t *This register is compliant with the requirements for\n+\t *aOctetsReceivedOK in section 5.2.2.1.14 of the IEEE Standard\n+\t *802.3-2008\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_RX_PAYLOAD_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_RX_PAYLOAD_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_bytes += statistics;\n+\n+\t/*Number of received bytes in frames with no FCS, undersized,\n+\t *oversized, or payload length errors.\n+\t *This register is compliant with the requirements for\n+\t *ifInOctets in RFC3635 (Managed Objects for Ethernet-like\n+\t *Interface Types) and RX etherStatsOctets in RFC2819\n+\t *(Remote Network Monitoring Management Information Base\n+\t *(RMON)).\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_25G_RX_FRAME_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_25G_RX_FRAME_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*resume Tx counter to real time\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\ttmp &= 0xfffffffb;\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\n+\t/*resume Rx counter to real time\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&tmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\ttmp &= 0xfffffffb;\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\n+\treturn 0;\n+}\n+\n+static void\n+ipn3ke_rpst_25G_Lineside_TX_stats_reset(struct ipn3ke_hw *hw,\n+uint16_t port_id)\n+{\n+\tuint32_t tmp = 0x00000001;\n+\t/* Bit[0]: Software can set this bit to the value of 1\n+\t * to reset all of the TX statistics registers at the same time.\n+\t * This bit is selfclearing.\n+\t */\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\n+\twhile (tmp & 0x00000001) {\n+\t\ttmp = 0x00000000;\n+\t\t(*hw->f_mac_read)(hw,\n+\t\t\t\t&tmp,\n+\t\t\t\tIPN3KE_25G_TX_STATISTICS_CONFIG,\n+\t\t\t\tport_id,\n+\t\t\t\t0);\n+\t\tif (tmp & 0x00000001)\n+\t\t\tusleep(5);\n+\t\telse\n+\t\t\treturn;\n+\t}\n+}\n+\n+static void\n+ipn3ke_rpst_25G_Lineside_RX_stats_reset(struct ipn3ke_hw *hw,\n+uint16_t port_id)\n+{\n+\tuint32_t tmp = 0x00000001;\n+\t/* Bit[0]: Software can set this bit to the value of 1\n+\t * to reset all of the RX statistics registers at the same time.\n+\t * This bit is selfclearing.\n+\t */\n+\t(*hw->f_mac_write)(hw,\n+\t\t\ttmp,\n+\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\tport_id,\n+\t\t\t0);\n+\n+\twhile (tmp & 0x00000001) {\n+\t\ttmp = 0x00000000;\n+\t\t(*hw->f_mac_read)(hw,\n+\t\t\t\t&tmp,\n+\t\t\t\tIPN3KE_25G_RX_STATISTICS_CONFIG,\n+\t\t\t\tport_id,\n+\t\t\t\t0);\n+\t\tif (tmp & 0x00000001)\n+\t\t\tusleep(5);\n+\t\telse\n+\t\t\treturn;\n+\t}\n+}\n+\n+static int\n+ipn3ke_read_10G_Lineside_stats_registers\n+(struct ipn3ke_hw *hw,\n+uint16_t port_id,\n+struct ipn3ke_rpst_hw_port_stats *hw_stats,\n+struct rte_eth_stats *stats)\n+{\n+\tuint32_t statistics_lo = 0;\n+\tuint32_t statistics_hi = 0;\n+\tuint64_t statistics = 0;\n+\n+\tmemset(hw_stats, 0, sizeof(*hw_stats));\n+\tmemset(stats, 0, sizeof(*stats));\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *that are successfully transmitted, including control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->opackets = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *that are successfully received, including control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->ipackets = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *transmitted with error, including control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->oerrors = statistics;\n+\thw_stats->eth.tx_errors = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *received with error, including control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->ierrors = statistics;\n+\thw_stats->eth.rx_discards = statistics;\n+\n+\t/*36-bit statistics counter that collects the number\n+\t *of RX frames with CRC error.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_CRC_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_FRAME_CRC_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->crc_errors = statistics;\n+\n+\t/*64-bit statistics counter that collects the payload length,\n+\t *including the bytes in control frames.\n+\t *The payload length is the number of data and padding bytes\n+\t *transmitted.\n+\t *If the tx_vlan_detection[0] register bit is set to 1,\n+\t *the VLAN and stacked VLAN tags are counted as part of\n+\t *the TX payload.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->obytes = statistics;\n+\thw_stats->eth.tx_bytes = statistics;\n+\n+\t/*64-bit statistics counter that collects the payload length,\n+\t *including the bytes in control frames.\n+\t *The payload length is the number of data and padding bytes\n+\t *received.\n+\t *If the rx_vlan_detection[0] register bit is set to 1,\n+\t *the VLAN and stacked VLAN tags are counted as part of\n+\t *the RX payload.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_OCTETS_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_OCTETS_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\tstats->ibytes = statistics;\n+\thw_stats->eth.rx_bytes = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid pause frames transmitted.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_PAUSE_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_PAUSE_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid pause frames received.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_PAUSE_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_PAUSE_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *transmitted that are invalid and with error.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_IF_ERRORS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_IF_ERRORS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of frames\n+\t *received that are invalid and with error.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_IF_ERRORS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_IF_ERRORS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good unicast frames transmitted,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_unicast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good unicast frames received,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_unicast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *unicast frames transmitted with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *unicast frames received with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good multicast frames transmitted,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_multicast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good multicast frames received,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_multicast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *multicast frames transmitted with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number\n+\t *of multicast frames received with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good broadcast frames transmitted,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_broadcast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *good broadcast frames received,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_FRAME_OK_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_FRAME_OK_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_broadcast = statistics;\n+\n+\t/*36-bit statistics counter that collects the number\n+\t *of broadcast frames transmitted with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *broadcast frames received with error,\n+\t *excluding control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_FRAME_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_FRAME_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*64-bit statistics counter that collects the total number of\n+\t *octets transmitted.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*64-bit statistics counter that collects the total number of\n+\t *octets received.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the total number of\n+\t *good, errored, and invalid frames transmitted.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the total number of\n+\t *good, errored, and invalid frames received.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *undersized TX frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_UNDER_SIZE_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_UNDER_SIZE_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *undersized RX frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_UNDER_SIZE_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_UNDER_SIZE_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_undersize = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames whose length exceeds the maximum frame length\n+\t *specified.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_OVER_SIZE_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_OVER_SIZE_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames whose length exceeds the maximum frame length\n+\t *specified.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_OVER_SIZE_PKTS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_OVER_SIZE_PKTS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_oversize = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *64-byte TX frames,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_64_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_64_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_64 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *64-byte RX frames,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_64_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_64_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_64 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 65 and 127 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_65_127_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_65_127_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_65_127 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 65 and 127 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_65_127_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_65_127_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_65_127 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 128 and 255 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_128_255_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_128_255_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_128_255 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 128 and 255 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_128_255_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_128_255_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_128_255 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 256 and 511 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_256_511_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_256_511_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_256_511 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 256 and 511 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_256_511_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_256_511_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_256_511 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 512 and 1023 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_512_1023_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_512_1023_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_512_1023 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 512 and 1023 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_512_1023_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_512_1023_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_512_1023 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames between the length of 1024 and 1518 bytes,\n+\t *including the CRC field but\n+\t *excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&statistics_lo,\n+\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_1024_1518_OCTETS_LO,\n+\t\tport_id,\n+\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&statistics_hi,\n+\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_1024_1518_OCTETS_HI,\n+\t\tport_id,\n+\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_1024_1518 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames between the length of 1024 and 1518 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&statistics_lo,\n+\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_1024_1518_OCTETS_LO,\n+\t\tport_id,\n+\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&statistics_hi,\n+\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_1024_1518_OCTETS_HI,\n+\t\tport_id,\n+\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_1024_1518 = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *TX frames equal or more than the length of 1,519 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good, errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_1519_X_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_ETHER_STATS_PKTS_1519_X_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->tx_size_1519_to_max = statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames equal or more than the length of 1,519 bytes,\n+\t *including the CRC field\n+\t *but excluding the preamble and SFD bytes.\n+\t *This count includes good,\n+\t *errored, and invalid frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_1519_X_OCTETS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_PKTS_1519_X_OCTETS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->rx_size_big = statistics;\n+\n+\t/*36-bit statistics counter that collects the total number of\n+\t *RX frames with length less than 64 bytes and CRC error.\n+\t *The MAC does not drop these frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_FRAGMENTS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_FRAGMENTS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *oversized RX frames with CRC error.\n+\t *The MAC does not drop these frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_JABBERS_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_JABBERS_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *RX frames with CRC error,\n+\t *whose length is between 64 and the maximum frame length\n+\t *specified in the register.\n+\t *The MAC does not drop these frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_CRC_ERR_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_ETHER_STATS_CRC_ERR_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid TX unicast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_UNICAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_unicast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid RX unicast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_UNICAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_unicast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid TX multicast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_MULTICAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_multicast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid RX multicast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_MULTICAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_multicast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid TX broadcast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_BROADCAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.tx_broadcast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid RX broadcast control frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_BROADCAST_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\thw_stats->eth.rx_broadcast += statistics;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid TX PFC frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_TX_STATS_PFC_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_TX_STATS_PFC_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n+\t/*36-bit statistics counter that collects the number of\n+\t *valid RX PFC frames.\n+\t */\n+\tstatistics_lo = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_lo,\n+\t\t\tIPN3KE_10G_RX_STATS_PFC_MAC_CTRL_FRAMES_LO,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t\t&statistics_hi,\n+\t\t\tIPN3KE_10G_RX_STATS_PFC_MAC_CTRL_FRAMES_HI,\n+\t\t\tport_id,\n+\t\t\t0);\n+\tstatistics_hi &= IPN3KE_10G_STATS_HI_VALID_MASK;\n+\tstatistics = 0x0000000000000000;\n+\tstatistics += statistics_hi;\n+\tstatistics = statistics << IPN3KE_REGISTER_WIDTH;\n+\tstatistics += statistics_lo;\n+\n \treturn 0;\n }\n \n static void\n-ipn3ke_rpst_stats_reset(__rte_unused struct rte_eth_dev *ethdev)\n+ipn3ke_rpst_10G_Lineside_TX_stats_reset(struct ipn3ke_hw *hw,\n+uint16_t port_id)\n+{\n+\tuint32_t tmp;\n+\n+\t/*Bit [0]: Set this register to 1 to clear all TX statistics\n+\t *counters.\n+\t *The IP core clears this bit when all counters are cleared.\n+\t *Bits [31:1]: Reserved.\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_10G_TX_STATS_CLR,\n+\t\tport_id,\n+\t\t0);\n+\ttmp |= 0x00000001;\n+\t(*hw->f_mac_write)(hw,\n+\t\ttmp,\n+\t\tIPN3KE_10G_TX_STATS_CLR,\n+\t\tport_id,\n+\t\t0);\n+}\n+\n+static void\n+ipn3ke_rpst_10G_Lineside_RX_stats_reset(struct ipn3ke_hw *hw,\n+uint16_t port_id)\n+{\n+\tuint32_t tmp;\n+\n+\t/*Bit [0]: Set this register to 1 to clear all RX statistics\n+\t *counters.\n+\t *The IP core clears this bit when all counters are cleared.\n+\t *Bits [31:1]: Reserved\n+\t */\n+\ttmp = 0x00000000;\n+\t(*hw->f_mac_read)(hw,\n+\t\t&tmp,\n+\t\tIPN3KE_10G_RX_STATS_CLR,\n+\t\tport_id,\n+\t\t0);\n+\ttmp |= 0x00000001;\n+\t(*hw->f_mac_write)(hw,\n+\t\ttmp,\n+\t\tIPN3KE_10G_RX_STATS_CLR,\n+\t\tport_id,\n+\t\t0);\n+}\n+\n+static void\n+ipn3ke_rpst_stats_reset(struct rte_eth_dev *ethdev)\n+{\n+\tuint16_t port_id = 0;\n+\tchar *ch;\n+\tint cnt = 0;\n+\tstruct rte_afu_device *afu_dev = NULL;\n+\tstruct ipn3ke_hw *hw = NULL;\n+\n+\tif (!ethdev) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"ethernet device to reset is NULL!\");\n+\t\treturn;\n+\t}\n+\n+\tafu_dev = RTE_ETH_DEV_TO_AFU(ethdev);\n+\tif (!afu_dev) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"afu device to reset is NULL!\");\n+\t\treturn;\n+\t}\n+\n+\tif (!afu_dev->shared.data) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"hardware data to reset is NULL!\");\n+\t\treturn;\n+\t}\n+\n+\thw = afu_dev->shared.data;\n+\n+\tch = ethdev->data->name;\n+\tif (!ch) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"ethdev name is NULL!\");\n+\t\treturn;\n+\t}\n+\twhile (ch) {\n+\t\tif (*ch == '_')\n+\t\t\tcnt++;\n+\t\tch++;\n+\t\tif (cnt == 3)\n+\t\t\tbreak;\n+\t}\n+\tif (!ch) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"Can not get port_id from ethdev name!\");\n+\t\treturn;\n+\t}\n+\tport_id = atoi(ch);\n+\n+\tif (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_25GE_25GAUI) {\n+\t\tipn3ke_rpst_25G_NICside_TX_stats_reset(hw, port_id);\n+\t\tipn3ke_rpst_25G_NICside_RX_stats_reset(hw, port_id);\n+\t\tipn3ke_rpst_25G_Lineside_TX_stats_reset(hw, port_id);\n+\t\tipn3ke_rpst_25G_Lineside_RX_stats_reset(hw, port_id);\n+\t} else if (hw->retimer.mac_type ==\n+\t\t\tIFPGA_RAWDEV_RETIMER_MAC_TYPE_10GE_XFI) {\n+\t\tipn3ke_rpst_10G_NICside_TX_stats_reset(hw, port_id);\n+\t\tipn3ke_rpst_10G_NICside_RX_stats_reset(hw, port_id);\n+\t\tipn3ke_rpst_10G_Lineside_TX_stats_reset(hw, port_id);\n+\t\tipn3ke_rpst_10G_Lineside_RX_stats_reset(hw, port_id);\n+\t}\n+}\n+\n+static int\n+ipn3ke_rpst_stats_get\n+(struct rte_eth_dev *ethdev, struct rte_eth_stats *stats)\n {\n+\tuint16_t port_id = 0;\n+\tchar *ch;\n+\tint cnt = 0;\n+\tint i = 0;\n+\tstruct rte_afu_device *afu_dev = NULL;\n+\tstruct ipn3ke_hw *hw = NULL;\n+\tstruct ipn3ke_rpst_hw_port_stats hw_stats;\n+\n+\tif (!ethdev) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"ethernet device to get statistics is NULL\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (!stats) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"Address to return statistics is NULL!\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tafu_dev = RTE_ETH_DEV_TO_AFU(ethdev);\n+\tif (!afu_dev) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"afu device to get statistics is NULL!\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (!afu_dev->shared.data) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"hardware data to get statistics is NULL!\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\thw = afu_dev->shared.data;\n+\n+\tch = ethdev->data->name;\n+\tif (!ch) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"ethdev name is NULL!\");\n+\t\treturn -EINVAL;\n+\t}\n+\twhile (ch) {\n+\t\tif (*ch == '_')\n+\t\t\tcnt++;\n+\t\tch++;\n+\t\tif (cnt == 3)\n+\t\t\tbreak;\n+\t}\n+\tif (!ch) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"Can not get port_id from ethdev name!\");\n+\t\treturn -EINVAL;\n+\t}\n+\tport_id = atoi(ch);\n+\n+\tif (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_25GE_25GAUI) {\n+\t\tipn3ke_read_25G_Lineside_stats_registers(hw,\n+\t\t\t\t\t\t\tport_id,\n+\t\t\t\t\t\t\t&hw_stats);\n+\n+\t\tstats->ipackets  = hw_stats.rx_size_64\n+\t\t\t\t\t+ hw_stats.rx_size_65_127\n+\t\t\t\t\t+ hw_stats.rx_size_128_255\n+\t\t\t\t\t+ hw_stats.rx_size_256_511\n+\t\t\t\t\t+ hw_stats.rx_size_512_1023\n+\t\t\t\t\t+ hw_stats.rx_size_1024_1518\n+\t\t\t\t\t+ hw_stats.rx_size_big\n+\t\t\t\t\t+ hw_stats.rx_undersize\n+\t\t\t\t\t+ hw_stats.rx_fragments\n+\t\t\t\t\t+ hw_stats.rx_oversize\n+\t\t\t\t\t+ hw_stats.rx_jabber;\n+\t\tstats->opackets  = hw_stats.tx_size_64\n+\t\t\t\t\t+ hw_stats.tx_size_65_127\n+\t\t\t\t\t+ hw_stats.tx_size_128_255\n+\t\t\t\t\t+ hw_stats.tx_size_256_511\n+\t\t\t\t\t+ hw_stats.tx_size_512_1023\n+\t\t\t\t\t+ hw_stats.tx_size_1024_1518\n+\t\t\t\t\t+ hw_stats.tx_size_1519_to_max;\n+\t\tstats->ibytes    = hw_stats.eth.rx_bytes;\n+\t\tstats->obytes    = hw_stats.eth.tx_bytes;\n+\t\tstats->imissed   = 0;\n+\t\tstats->ierrors   = hw_stats.eth.rx_discards\n+\t\t\t\t\t+ hw_stats.eth.rx_unknown_protocol;\n+\t\tstats->oerrors   = hw_stats.eth.tx_discards\n+\t\t\t\t\t+ hw_stats.eth.tx_errors;\n+\t\tstats->rx_nombuf = 0;\n+\t\tfor (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {\n+\t\t\tstats->q_ipackets[i] = 0;\n+\t\t\tstats->q_opackets[i] = 0;\n+\t\t\tstats->q_ibytes[i] = 0;\n+\t\t\tstats->q_obytes[i] = 0;\n+\t\t\tstats->q_errors[i] = 0;\n+\t\t}\n+\t} else {\n+\t\tipn3ke_read_10G_Lineside_stats_registers(hw,\n+\t\t\t\t\t\t\tport_id,\n+\t\t\t\t\t\t\t&hw_stats,\n+\t\t\t\t\t\t\tstats);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n+ipn3ke_rpst_xstats_get\n+(struct rte_eth_dev *ethdev, struct rte_eth_xstat *xstats, unsigned int n)\n+{\n+\tuint16_t port_id = 0;\n+\tchar *ch = NULL;\n+\tint cnt = 0;\n+\tunsigned int i, count, prio;\n+\tstruct rte_afu_device *afu_dev = NULL;\n+\tstruct ipn3ke_hw *hw = NULL;\n+\tstruct ipn3ke_rpst_hw_port_stats hw_stats;\n+\tstruct rte_eth_stats stats;\n+\n+\tif (!xstats)\n+\t\treturn 0;\n+\n+\tif (!ethdev) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"ethernet device to get statistics is NULL\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tafu_dev = RTE_ETH_DEV_TO_AFU(ethdev);\n+\tif (!afu_dev) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"afu device to get statistics is NULL!\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (!afu_dev->shared.data) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"hardware data to get statistics is NULL!\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\thw = afu_dev->shared.data;\n+\n+\tch = ethdev->data->name;\n+\tif (!ch) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"ethdev name is NULL!\");\n+\t\treturn -EINVAL;\n+\t}\n+\twhile (ch) {\n+\t\tif (*ch == '_')\n+\t\t\tcnt++;\n+\t\tch++;\n+\t\tif (cnt == 3)\n+\t\t\tbreak;\n+\t}\n+\tif (!ch) {\n+\t\tIPN3KE_AFU_PMD_ERR(\"Can not get port_id from ethdev name!\");\n+\t\treturn -EINVAL;\n+\t}\n+\tport_id = atoi(ch);\n+\n+\tcount = ipn3ke_rpst_xstats_calc_num();\n+\tif (n < count)\n+\t\treturn count;\n+\n+\tif (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_25GE_25GAUI) {\n+\t\tipn3ke_read_25G_Lineside_stats_registers(hw,\n+\t\t\t\t\t\t\tport_id,\n+\t\t\t\t\t\t\t&hw_stats);\n+\t} else {\n+\t\tipn3ke_read_10G_Lineside_stats_registers(hw,\n+\t\t\t\t\t\t\tport_id,\n+\t\t\t\t\t\t\t&hw_stats,\n+\t\t\t\t\t\t\t&stats);\n+\t}\n+\n+\tcount = 0;\n+\n+\t/* Get stats from ipn3ke_rpst_stats */\n+\tfor (i = 0; i < IPN3KE_RPST_ETH_XSTATS_CNT; i++) {\n+\t\txstats[count].value = *(uint64_t *)(((char *)&hw_stats.eth)\n+\t\t\t+ ipn3ke_rpst_stats_strings[i].offset);\n+\t\txstats[count].id = count;\n+\t\tcount++;\n+\t}\n+\n+\t/* Get individiual stats from ipn3ke_rpst_hw_port */\n+\tfor (i = 0; i < IPN3KE_RPST_HW_PORT_XSTATS_CNT; i++) {\n+\t\txstats[count].value = *(uint64_t *)(((char *)(&hw_stats)) +\n+\t\t\tipn3ke_rpst_hw_port_strings[i].offset);\n+\t\txstats[count].id = count;\n+\t\tcount++;\n+\t}\n+\n+\t/* Get individiual stats from ipn3ke_rpst_rxq_pri */\n+\tfor (i = 0; i < IPN3KE_RPST_RXQ_PRIO_XSTATS_CNT; i++) {\n+\t\tfor (prio = 0; prio < IPN3KE_RPST_PRIO_XSTATS_CNT; prio++) {\n+\t\t\txstats[count].value =\n+\t\t\t\t*(uint64_t *)(((char *)(&hw_stats)) +\n+\t\t\t\tipn3ke_rpst_rxq_prio_strings[i].offset +\n+\t\t\t\t(sizeof(uint64_t) * prio));\n+\t\t\txstats[count].id = count;\n+\t\t\tcount++;\n+\t\t}\n+\t}\n+\n+\t/* Get individiual stats from ipn3ke_rpst_txq_prio */\n+\tfor (i = 0; i < IPN3KE_RPST_TXQ_PRIO_XSTATS_CNT; i++) {\n+\t\tfor (prio = 0; prio < IPN3KE_RPST_PRIO_XSTATS_CNT; prio++) {\n+\t\t\txstats[count].value =\n+\t\t\t\t*(uint64_t *)(((char *)(&hw_stats)) +\n+\t\t\t\tipn3ke_rpst_txq_prio_strings[i].offset +\n+\t\t\t\t(sizeof(uint64_t) * prio));\n+\t\t\txstats[count].id = count;\n+\t\t\tcount++;\n+\t\t}\n+\t}\n+\n+\treturn count;\n+}\n+\n+static int\n+ipn3ke_rpst_xstats_get_names\n+(__rte_unused struct rte_eth_dev *dev,\n+struct rte_eth_xstat_name *xstats_names,\n+__rte_unused unsigned int limit)\n+{\n+\tunsigned int count = 0;\n+\tunsigned int i, prio;\n+\n+\tif (!xstats_names)\n+\t\treturn ipn3ke_rpst_xstats_calc_num();\n+\n+\t/* Note: limit checked in rte_eth_xstats_names() */\n+\n+\t/* Get stats from ipn3ke_rpst_stats */\n+\tfor (i = 0; i < IPN3KE_RPST_ETH_XSTATS_CNT; i++) {\n+\t\tsnprintf(xstats_names[count].name,\n+\t\t\t sizeof(xstats_names[count].name),\n+\t\t\t \"%s\",\n+\t\t\t ipn3ke_rpst_stats_strings[i].name);\n+\t\tcount++;\n+\t}\n+\n+\t/* Get individiual stats from ipn3ke_rpst_hw_port */\n+\tfor (i = 0; i < IPN3KE_RPST_HW_PORT_XSTATS_CNT; i++) {\n+\t\tsnprintf(xstats_names[count].name,\n+\t\t\t sizeof(xstats_names[count].name),\n+\t\t\t \"%s\",\n+\t\t\t ipn3ke_rpst_hw_port_strings[i].name);\n+\t\tcount++;\n+\t}\n+\n+\t/* Get individiual stats from ipn3ke_rpst_rxq_pri */\n+\tfor (i = 0; i < IPN3KE_RPST_RXQ_PRIO_XSTATS_CNT; i++) {\n+\t\tfor (prio = 0; prio < 8; prio++) {\n+\t\t\tsnprintf(xstats_names[count].name,\n+\t\t\t\t sizeof(xstats_names[count].name),\n+\t\t\t\t \"rx_priority%u_%s\",\n+\t\t\t\t prio,\n+\t\t\t\t ipn3ke_rpst_rxq_prio_strings[i].name);\n+\t\t\tcount++;\n+\t\t}\n+\t}\n+\n+\t/* Get individiual stats from ipn3ke_rpst_txq_prio */\n+\tfor (i = 0; i < IPN3KE_RPST_TXQ_PRIO_XSTATS_CNT; i++) {\n+\t\tfor (prio = 0; prio < 8; prio++) {\n+\t\t\tsnprintf(xstats_names[count].name,\n+\t\t\t\t sizeof(xstats_names[count].name),\n+\t\t\t\t \"tx_priority%u_%s\",\n+\t\t\t\t prio,\n+\t\t\t\t ipn3ke_rpst_txq_prio_strings[i].name);\n+\t\t\tcount++;\n+\t\t}\n+\t}\n+\treturn count;\n }\n \n static void\n",
    "prefixes": [
        "v2",
        "4/4"
    ]
}