get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 27136,
    "url": "http://patches.dpdk.org/api/patches/27136/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1500891015-21625-3-git-send-email-rasesh.mody@cavium.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1500891015-21625-3-git-send-email-rasesh.mody@cavium.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1500891015-21625-3-git-send-email-rasesh.mody@cavium.com",
    "date": "2017-07-24T10:10:11",
    "name": "[dpdk-dev,INTERNAL,REVIEW,3/7] net/qede/base: fix for adapter specific stats",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a8f8aaa726cfba127518e27701ac39fceafb8188",
    "submitter": {
        "id": 569,
        "url": "http://patches.dpdk.org/api/people/569/?format=api",
        "name": "Mody, Rasesh",
        "email": "rasesh.mody@cavium.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1500891015-21625-3-git-send-email-rasesh.mody@cavium.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/27136/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/27136/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id DEEAE7CD6;\n\tMon, 24 Jul 2017 12:10:39 +0200 (CEST)",
            "from NAM02-BL2-obe.outbound.protection.outlook.com\n\t(mail-bl2nam02on0040.outbound.protection.outlook.com [104.47.38.40])\n\tby dpdk.org (Postfix) with ESMTP id AF3677CD1\n\tfor <dev@dpdk.org>; Mon, 24 Jul 2017 12:10:35 +0200 (CEST)",
            "from DM5PR07CA0047.namprd07.prod.outlook.com (10.168.109.33) by\n\tSN1PR07MB2190.namprd07.prod.outlook.com (10.164.47.24) with Microsoft\n\tSMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n\t15.1.1282.10; Mon, 24 Jul 2017 10:10:33 +0000",
            "from BY2FFO11FD023.protection.gbl (2a01:111:f400:7c0c::153) by\n\tDM5PR07CA0047.outlook.office365.com (2603:10b6:3:16::33) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n\t15.1.1282.10 via Frontend Transport; Mon, 24 Jul 2017 10:10:33 +0000",
            "from CAEXCH02.caveonetworks.com (50.232.66.26) by\n\tBY2FFO11FD023.mail.protection.outlook.com (10.1.15.212) with\n\tMicrosoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id\n\t15.1.1240.9 via Frontend Transport; Mon, 24 Jul 2017 10:10:32 +0000",
            "from avsmtprelay01.qlc.com (10.1.112.194) by\n\tCAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id\n\t14.2.347.0; Mon, 24 Jul 2017 03:10:31 -0700",
            "from avluser05.qlc.com (avluser05.qlc.com [10.1.113.115])\tby\n\tavsmtprelay01.qlc.com (Postfix) with ESMTP id 121338BF705FE;\n\tMon, 24 Jul 2017 03:10:31 -0700 (PDT)",
            "(from rmody@localhost)\tby avluser05.qlc.com (8.14.4/8.14.4/Submit)\n\tid v6OAAVSH021673;\tMon, 24 Jul 2017 03:10:31 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=LK1STbZrlb1YYxYyfK46K+dpm2V3EA42xb9VwuwVUtE=;\n\tb=j8d4gvCi6dV/N4EI7Tj3oZw6sw2suws6VUFWvX4u+2qOBVpvomLuIPFVgqpBVPBJG9HF6GClHC0e8uno9mBvvQnEygPuZBpZFSz09Q6Ql4DLSuU/rDqmGeGVJNDF5bGP4s+CdZ4KZkNmbwPG6IcXxkDKXl1aVy/ZNPLednImH0s=",
        "Authentication-Results": "spf=none (sender IP is 50.232.66.26)\n\tsmtp.mailfrom=cavium.com; dpdk.org; dkim=none (message not signed)\n\theader.d=none; dpdk.org; dmarc=none action=none header.from=cavium.com;",
        "Received-SPF": "None (protection.outlook.com: cavium.com does not designate\n\tpermitted sender hosts)",
        "X-Authentication-Warning": "avluser05.qlc.com: rmody set sender to\n\trasesh.mody@cavium.com using -f",
        "From": "Rasesh Mody <rasesh.mody@cavium.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Rasesh Mody <rasesh.mody@cavium.com>, <Dept-EngDPDKDev@cavium.com>",
        "Date": "Mon, 24 Jul 2017 03:10:11 -0700",
        "Message-ID": "<1500891015-21625-3-git-send-email-rasesh.mody@cavium.com>",
        "X-Mailer": "git-send-email 1.7.10.3",
        "In-Reply-To": "<1500891015-21625-1-git-send-email-rasesh.mody@cavium.com>",
        "References": "<1500891015-21625-1-git-send-email-rasesh.mody@cavium.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-EOPAttributedMessage": "0",
        "X-Forefront-Antispam-Report": "CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI;\n\tSFV:NSPM;\n\tSFS:(10009020)(6009001)(39840400002)(39450400003)(39400400002)(39850400002)(39410400002)(2980300002)(428002)(189002)(199003)(36756003)(48376002)(50466002)(8676002)(8936002)(50226002)(356003)(69596002)(87636003)(38730400002)(575784001)(107886003)(110136004)(86362001)(53946003)(478600001)(54906002)(5003940100001)(626005)(6666003)(2950100002)(6916009)(305945005)(50986999)(76176999)(189998001)(33646002)(101416001)(4720700003)(47776003)(81166006)(81156014)(2906002)(4326008)(5660300001)(72206003)(105586002)(2351001)(42186005)(106466001)(217873001);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2190;\n\tH:CAEXCH02.caveonetworks.com; \n\tFPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1;\n\tA:1; LANG:en; ",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; BY2FFO11FD023;\n\t1:cSo/8w4eQmhy68rtEB6Aanug/BstkhF1tqAdUPdiXGLaQsMsec3rWM5O++eMrT5eqoE67Uh1/5QhXBgGqC6LW1EEAP6uZZ6gd+xVxQRFzBYTUPXMqS5EeEg5RbO4nUUaWr/1IattwNKLpi8eVhaDplCw7bc9YZLFSGKB7S4StMJo9xu7w1pm36i2nzxzGHa3D162jucNjcyFQgPHaX+LL1CFFc6ZHaiof/qpjUwqKktyoKZyGCH/sBOrMLczIOoynhKs7yQ74CUX061z76maIRVilzLXhIyckqj/o7i+5mWaCId2v2HMRjVPWIdhRtv5uKgPll2Jdj6gk2K5WTGwq1K4pTKhKKvFtP9+U6iwM2xfvYwsQ5nm4ZX2r4KOZztReLdYlaklAjAb0CRj8GHe+4VoIqH1bJt1/0r/1cD3QMO3JDKRx6RIy+rJQGZChUI/rsfQZc5S9Jf5yLUB36EicgFpEz7ZgLMa6q4mmUNPPUqe0do9mQK9Y2DyJE5VUajZC4d1f059MnEzxynucf0D4FQmzX0CM/Q7UV5RztHC7vPeYN+PTTPLTPOtdZcbXMHfrcxOvH4C9E7hpKKmvCjH03Wc2iOWh10smM5uxMVu0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GovJ4Gk;\n\t24:DtkU9Rf4qiyxbJrWPfA2X0BWlWJdirM0yWXriMyViU1H8YWuzfIh9SuWHrq+OjFhSjW/eBIB9P80cSOWmLoG+9HsVqfvldSKDUZK00Cjcp4=",
            "1; SN1PR07MB2190;\n\t7:a/pLazTLBaog6k0hrGnGMPoGtq1k+PTsdRRjfadrjWoKzfRrzEjVGA2CDHhcE4zaX6eNahUYU0yi6QQ2a8OTVC1sOKHLUBAT/gjA3NSasQRdLzAwzm3p5MkE8mwNfqvTak/IGYdHNS5ifRV5FcBU4/b0rdRFLwVY8cLZPjyHR/9SJqv4Zztee1IAcnujE3t+T5CBe095OAhHWx1PtJkO2yJGXG6lxzGJbpSluVulq9Txuv1KOWdlKpX1+ceY0KDbcw0VwVOK7cT5zrOpO2Atcrnml1NC1aM+ivllRpzQnvZIyc8lYa5RMkbBiSVv87P+/AVAdovAHU48SkAQd4yeV7LOpEK6enBpy1RzisLMd3L3w9pHq9IA62euw8iSP4rJQdZv8Nja1etv7UQZMbDfeJk4a9ZDKHT0+LjV+wiVCFJ9pU+laqvQ0sOMkJCiR3Ls4GSicX7E3+ToJb28cAi56L0fAArQ7obTZcPNX+SksyOMFOVWa/B/5thuN8S07kqEq8dx9Ifbcnnjnoq4MGXI1Oz7y54aRxvjsQafn72svi5GsEB0i2annGFCvvwCV6iWGoGvssBH4Ix4mr0TVjqOc5cnSyJ/1lKJ6jTSTzrsk2VxCXqNAH0fwK0B4ab15aEMR6yW3YB0AP3Utt79EfAbrZV+HGoYy6Uop0+OiSbzG7GMKqYy5Kw9GJeZsKhXBrNVgpGQVx0HEHicTYJQc/0WdNXwKsjrF2nfMNioDjN3H33ITCe6jbmc5JXIWArIL/lUfsdKVioiUOOPqLFmVxIzao/hGPJr9Gj26AFMB12uo/0="
        ],
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "dfa01f0a-e74a-44bf-2015-08d4d27c3886",
        "X-Microsoft-Antispam": "UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:SN1PR07MB2190; ",
        "X-MS-TrafficTypeDiagnostic": "SN1PR07MB2190:",
        "X-Exchange-Antispam-Report-Test": "UriScan:;",
        "X-Microsoft-Antispam-PRVS": "<SN1PR07MB21909B2BA30DEE1AD9D9B0149FBB0@SN1PR07MB2190.namprd07.prod.outlook.com>",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13016025)(5005006)(13018025)(8121501046)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6041248)(20161123562025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:SN1PR07MB2190; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:SN1PR07MB2190; ",
        "X-Forefront-PRVS": "0378F1E47A",
        "SpamDiagnosticOutput": "1:99",
        "SpamDiagnosticMetadata": "NSPM",
        "X-OriginatorOrg": "cavium.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "24 Jul 2017 10:10:32.9990\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-Id": "711e4ccf-2e9b-4bcf-a551-4094005b6194",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194;\n\tIp=[50.232.66.26]; \n\tHelo=[CAEXCH02.caveonetworks.com]",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SN1PR07MB2190",
        "Subject": "[dpdk-dev] [INTERNAL REVIEW 3/7] net/qede/base: fix for adapter\n\tspecific stats",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Handle different MAC statistic fields between two chip variants by\nreading the MAC counters from the adapter suitable statistics bins.\n\nFixes: ec94dbc57362 (\"qede: add base driver\")\n\nSigned-off-by: Rasesh Mody <rasesh.mody@cavium.com>\n---\n drivers/net/qede/base/bcm_osal.c      |    7 +-\n drivers/net/qede/base/ecore_dev_api.h |   40 +++--\n drivers/net/qede/base/ecore_l2.c      |  188 ++++++++++++--------\n drivers/net/qede/base/mcp_public.h    |   58 ++++--\n drivers/net/qede/qede_ethdev.c        |  312 ++++++++++++++++++++++-----------\n 5 files changed, 400 insertions(+), 205 deletions(-)",
    "diff": "diff --git a/drivers/net/qede/base/bcm_osal.c b/drivers/net/qede/base/bcm_osal.c\nindex 968fb76..2603a8b 100644\n--- a/drivers/net/qede/base/bcm_osal.c\n+++ b/drivers/net/qede/base/bcm_osal.c\n@@ -249,8 +249,11 @@ u32 qede_unzip_data(struct ecore_hwfn *p_hwfn, u32 input_len,\n \n \tif (type == ECORE_MCP_LAN_STATS) {\n \t\tecore_get_vport_stats(edev, &lan_stats);\n-\t\tstats->lan_stats.ucast_rx_pkts = lan_stats.rx_ucast_pkts;\n-\t\tstats->lan_stats.ucast_tx_pkts = lan_stats.tx_ucast_pkts;\n+\n+\t\t/* @DPDK */\n+\t\tstats->lan_stats.ucast_rx_pkts = lan_stats.common.rx_ucast_pkts;\n+\t\tstats->lan_stats.ucast_tx_pkts = lan_stats.common.tx_ucast_pkts;\n+\n \t\tstats->lan_stats.fcs_err = -1;\n \t} else {\n \t\tDP_INFO(edev, \"Statistics request type %d not supported\\n\",\ndiff --git a/drivers/net/qede/base/ecore_dev_api.h b/drivers/net/qede/base/ecore_dev_api.h\nindex eea22e0..9126cf9 100644\n--- a/drivers/net/qede/base/ecore_dev_api.h\n+++ b/drivers/net/qede/base/ecore_dev_api.h\n@@ -241,7 +241,7 @@ void ecore_ptt_release(struct ecore_hwfn *p_hwfn,\n \t\t       struct ecore_ptt *p_ptt);\n \n #ifndef __EXTRACT__LINUX__\n-struct ecore_eth_stats {\n+struct ecore_eth_stats_common {\n \tu64 no_buff_discards;\n \tu64 packet_too_big_discard;\n \tu64 ttl0_discard;\n@@ -273,11 +273,6 @@ struct ecore_eth_stats {\n \tu64 rx_256_to_511_byte_packets;\n \tu64 rx_512_to_1023_byte_packets;\n \tu64 rx_1024_to_1518_byte_packets;\n-\tu64 rx_1519_to_1522_byte_packets;\n-\tu64 rx_1519_to_2047_byte_packets;\n-\tu64 rx_2048_to_4095_byte_packets;\n-\tu64 rx_4096_to_9216_byte_packets;\n-\tu64 rx_9217_to_16383_byte_packets;\n \tu64 rx_crc_errors;\n \tu64 rx_mac_crtl_frames;\n \tu64 rx_pause_frames;\n@@ -294,14 +289,8 @@ struct ecore_eth_stats {\n \tu64 tx_256_to_511_byte_packets;\n \tu64 tx_512_to_1023_byte_packets;\n \tu64 tx_1024_to_1518_byte_packets;\n-\tu64 tx_1519_to_2047_byte_packets;\n-\tu64 tx_2048_to_4095_byte_packets;\n-\tu64 tx_4096_to_9216_byte_packets;\n-\tu64 tx_9217_to_16383_byte_packets;\n \tu64 tx_pause_frames;\n \tu64 tx_pfc_frames;\n-\tu64 tx_lpi_entry_count;\n-\tu64 tx_total_collisions;\n \tu64 brb_truncates;\n \tu64 brb_discards;\n \tu64 rx_mac_bytes;\n@@ -315,6 +304,33 @@ struct ecore_eth_stats {\n \tu64 tx_mac_bc_packets;\n \tu64 tx_mac_ctrl_frames;\n };\n+\n+struct ecore_eth_stats_bb {\n+\tu64 rx_1519_to_1522_byte_packets;\n+\tu64 rx_1519_to_2047_byte_packets;\n+\tu64 rx_2048_to_4095_byte_packets;\n+\tu64 rx_4096_to_9216_byte_packets;\n+\tu64 rx_9217_to_16383_byte_packets;\n+\tu64 tx_1519_to_2047_byte_packets;\n+\tu64 tx_2048_to_4095_byte_packets;\n+\tu64 tx_4096_to_9216_byte_packets;\n+\tu64 tx_9217_to_16383_byte_packets;\n+\tu64 tx_lpi_entry_count;\n+\tu64 tx_total_collisions;\n+};\n+\n+struct ecore_eth_stats_ah {\n+\tu64 rx_1519_to_max_byte_packets;\n+\tu64 tx_1519_to_max_byte_packets;\n+};\n+\n+struct ecore_eth_stats {\n+\tstruct ecore_eth_stats_common common;\n+\tunion {\n+\t\tstruct ecore_eth_stats_bb bb;\n+\t\tstruct ecore_eth_stats_ah ah;\n+\t};\n+};\n #endif\n \n enum ecore_dmae_address_type_t {\ndiff --git a/drivers/net/qede/base/ecore_l2.c b/drivers/net/qede/base/ecore_l2.c\nindex 4ab8fd5..e58b8fa 100644\n--- a/drivers/net/qede/base/ecore_l2.c\n+++ b/drivers/net/qede/base/ecore_l2.c\n@@ -1714,13 +1714,20 @@ static void __ecore_get_vport_pstats(struct ecore_hwfn *p_hwfn,\n \tOSAL_MEMSET(&pstats, 0, sizeof(pstats));\n \tecore_memcpy_from(p_hwfn, p_ptt, &pstats, pstats_addr, pstats_len);\n \n-\tp_stats->tx_ucast_bytes += HILO_64_REGPAIR(pstats.sent_ucast_bytes);\n-\tp_stats->tx_mcast_bytes += HILO_64_REGPAIR(pstats.sent_mcast_bytes);\n-\tp_stats->tx_bcast_bytes += HILO_64_REGPAIR(pstats.sent_bcast_bytes);\n-\tp_stats->tx_ucast_pkts += HILO_64_REGPAIR(pstats.sent_ucast_pkts);\n-\tp_stats->tx_mcast_pkts += HILO_64_REGPAIR(pstats.sent_mcast_pkts);\n-\tp_stats->tx_bcast_pkts += HILO_64_REGPAIR(pstats.sent_bcast_pkts);\n-\tp_stats->tx_err_drop_pkts += HILO_64_REGPAIR(pstats.error_drop_pkts);\n+\tp_stats->common.tx_ucast_bytes +=\n+\t\tHILO_64_REGPAIR(pstats.sent_ucast_bytes);\n+\tp_stats->common.tx_mcast_bytes +=\n+\t\tHILO_64_REGPAIR(pstats.sent_mcast_bytes);\n+\tp_stats->common.tx_bcast_bytes +=\n+\t\tHILO_64_REGPAIR(pstats.sent_bcast_bytes);\n+\tp_stats->common.tx_ucast_pkts +=\n+\t\tHILO_64_REGPAIR(pstats.sent_ucast_pkts);\n+\tp_stats->common.tx_mcast_pkts +=\n+\t\tHILO_64_REGPAIR(pstats.sent_mcast_pkts);\n+\tp_stats->common.tx_bcast_pkts +=\n+\t\tHILO_64_REGPAIR(pstats.sent_bcast_pkts);\n+\tp_stats->common.tx_err_drop_pkts +=\n+\t\tHILO_64_REGPAIR(pstats.error_drop_pkts);\n }\n \n static void __ecore_get_vport_tstats(struct ecore_hwfn *p_hwfn,\n@@ -1746,10 +1753,10 @@ static void __ecore_get_vport_tstats(struct ecore_hwfn *p_hwfn,\n \tOSAL_MEMSET(&tstats, 0, sizeof(tstats));\n \tecore_memcpy_from(p_hwfn, p_ptt, &tstats, tstats_addr, tstats_len);\n \n-\tp_stats->mftag_filter_discards +=\n-\t    HILO_64_REGPAIR(tstats.mftag_filter_discard);\n-\tp_stats->mac_filter_discards +=\n-\t    HILO_64_REGPAIR(tstats.eth_mac_filter_discard);\n+\tp_stats->common.mftag_filter_discards +=\n+\t\tHILO_64_REGPAIR(tstats.mftag_filter_discard);\n+\tp_stats->common.mac_filter_discards +=\n+\t\tHILO_64_REGPAIR(tstats.eth_mac_filter_discard);\n }\n \n static void __ecore_get_vport_ustats_addrlen(struct ecore_hwfn *p_hwfn,\n@@ -1783,12 +1790,18 @@ static void __ecore_get_vport_ustats(struct ecore_hwfn *p_hwfn,\n \tOSAL_MEMSET(&ustats, 0, sizeof(ustats));\n \tecore_memcpy_from(p_hwfn, p_ptt, &ustats, ustats_addr, ustats_len);\n \n-\tp_stats->rx_ucast_bytes += HILO_64_REGPAIR(ustats.rcv_ucast_bytes);\n-\tp_stats->rx_mcast_bytes += HILO_64_REGPAIR(ustats.rcv_mcast_bytes);\n-\tp_stats->rx_bcast_bytes += HILO_64_REGPAIR(ustats.rcv_bcast_bytes);\n-\tp_stats->rx_ucast_pkts += HILO_64_REGPAIR(ustats.rcv_ucast_pkts);\n-\tp_stats->rx_mcast_pkts += HILO_64_REGPAIR(ustats.rcv_mcast_pkts);\n-\tp_stats->rx_bcast_pkts += HILO_64_REGPAIR(ustats.rcv_bcast_pkts);\n+\tp_stats->common.rx_ucast_bytes +=\n+\t\tHILO_64_REGPAIR(ustats.rcv_ucast_bytes);\n+\tp_stats->common.rx_mcast_bytes +=\n+\t\tHILO_64_REGPAIR(ustats.rcv_mcast_bytes);\n+\tp_stats->common.rx_bcast_bytes +=\n+\t\tHILO_64_REGPAIR(ustats.rcv_bcast_bytes);\n+\tp_stats->common.rx_ucast_pkts +=\n+\t\tHILO_64_REGPAIR(ustats.rcv_ucast_pkts);\n+\tp_stats->common.rx_mcast_pkts +=\n+\t\tHILO_64_REGPAIR(ustats.rcv_mcast_pkts);\n+\tp_stats->common.rx_bcast_pkts +=\n+\t\tHILO_64_REGPAIR(ustats.rcv_bcast_pkts);\n }\n \n static void __ecore_get_vport_mstats_addrlen(struct ecore_hwfn *p_hwfn,\n@@ -1822,23 +1835,27 @@ static void __ecore_get_vport_mstats(struct ecore_hwfn *p_hwfn,\n \tOSAL_MEMSET(&mstats, 0, sizeof(mstats));\n \tecore_memcpy_from(p_hwfn, p_ptt, &mstats, mstats_addr, mstats_len);\n \n-\tp_stats->no_buff_discards += HILO_64_REGPAIR(mstats.no_buff_discard);\n-\tp_stats->packet_too_big_discard +=\n-\t    HILO_64_REGPAIR(mstats.packet_too_big_discard);\n-\tp_stats->ttl0_discard += HILO_64_REGPAIR(mstats.ttl0_discard);\n-\tp_stats->tpa_coalesced_pkts +=\n-\t    HILO_64_REGPAIR(mstats.tpa_coalesced_pkts);\n-\tp_stats->tpa_coalesced_events +=\n-\t    HILO_64_REGPAIR(mstats.tpa_coalesced_events);\n-\tp_stats->tpa_aborts_num += HILO_64_REGPAIR(mstats.tpa_aborts_num);\n-\tp_stats->tpa_coalesced_bytes +=\n-\t    HILO_64_REGPAIR(mstats.tpa_coalesced_bytes);\n+\tp_stats->common.no_buff_discards +=\n+\t\tHILO_64_REGPAIR(mstats.no_buff_discard);\n+\tp_stats->common.packet_too_big_discard +=\n+\t\tHILO_64_REGPAIR(mstats.packet_too_big_discard);\n+\tp_stats->common.ttl0_discard +=\n+\t\tHILO_64_REGPAIR(mstats.ttl0_discard);\n+\tp_stats->common.tpa_coalesced_pkts +=\n+\t\tHILO_64_REGPAIR(mstats.tpa_coalesced_pkts);\n+\tp_stats->common.tpa_coalesced_events +=\n+\t\tHILO_64_REGPAIR(mstats.tpa_coalesced_events);\n+\tp_stats->common.tpa_aborts_num +=\n+\t\tHILO_64_REGPAIR(mstats.tpa_aborts_num);\n+\tp_stats->common.tpa_coalesced_bytes +=\n+\t\tHILO_64_REGPAIR(mstats.tpa_coalesced_bytes);\n }\n \n static void __ecore_get_vport_port_stats(struct ecore_hwfn *p_hwfn,\n \t\t\t\t\t struct ecore_ptt *p_ptt,\n \t\t\t\t\t struct ecore_eth_stats *p_stats)\n {\n+\tstruct ecore_eth_stats_common *p_common = &p_stats->common;\n \tstruct port_stats port_stats;\n \tint j;\n \n@@ -1849,54 +1866,75 @@ static void __ecore_get_vport_port_stats(struct ecore_hwfn *p_hwfn,\n \t\t\t  OFFSETOF(struct public_port, stats),\n \t\t\t  sizeof(port_stats));\n \n-\tp_stats->rx_64_byte_packets += port_stats.eth.r64;\n-\tp_stats->rx_65_to_127_byte_packets += port_stats.eth.r127;\n-\tp_stats->rx_128_to_255_byte_packets += port_stats.eth.r255;\n-\tp_stats->rx_256_to_511_byte_packets += port_stats.eth.r511;\n-\tp_stats->rx_512_to_1023_byte_packets += port_stats.eth.r1023;\n-\tp_stats->rx_1024_to_1518_byte_packets += port_stats.eth.r1518;\n-\tp_stats->rx_1519_to_1522_byte_packets += port_stats.eth.r1522;\n-\tp_stats->rx_1519_to_2047_byte_packets += port_stats.eth.r2047;\n-\tp_stats->rx_2048_to_4095_byte_packets += port_stats.eth.r4095;\n-\tp_stats->rx_4096_to_9216_byte_packets += port_stats.eth.r9216;\n-\tp_stats->rx_9217_to_16383_byte_packets += port_stats.eth.r16383;\n-\tp_stats->rx_crc_errors += port_stats.eth.rfcs;\n-\tp_stats->rx_mac_crtl_frames += port_stats.eth.rxcf;\n-\tp_stats->rx_pause_frames += port_stats.eth.rxpf;\n-\tp_stats->rx_pfc_frames += port_stats.eth.rxpp;\n-\tp_stats->rx_align_errors += port_stats.eth.raln;\n-\tp_stats->rx_carrier_errors += port_stats.eth.rfcr;\n-\tp_stats->rx_oversize_packets += port_stats.eth.rovr;\n-\tp_stats->rx_jabbers += port_stats.eth.rjbr;\n-\tp_stats->rx_undersize_packets += port_stats.eth.rund;\n-\tp_stats->rx_fragments += port_stats.eth.rfrg;\n-\tp_stats->tx_64_byte_packets += port_stats.eth.t64;\n-\tp_stats->tx_65_to_127_byte_packets += port_stats.eth.t127;\n-\tp_stats->tx_128_to_255_byte_packets += port_stats.eth.t255;\n-\tp_stats->tx_256_to_511_byte_packets += port_stats.eth.t511;\n-\tp_stats->tx_512_to_1023_byte_packets += port_stats.eth.t1023;\n-\tp_stats->tx_1024_to_1518_byte_packets += port_stats.eth.t1518;\n-\tp_stats->tx_1519_to_2047_byte_packets += port_stats.eth.t2047;\n-\tp_stats->tx_2048_to_4095_byte_packets += port_stats.eth.t4095;\n-\tp_stats->tx_4096_to_9216_byte_packets += port_stats.eth.t9216;\n-\tp_stats->tx_9217_to_16383_byte_packets += port_stats.eth.t16383;\n-\tp_stats->tx_pause_frames += port_stats.eth.txpf;\n-\tp_stats->tx_pfc_frames += port_stats.eth.txpp;\n-\tp_stats->tx_lpi_entry_count += port_stats.eth.tlpiec;\n-\tp_stats->tx_total_collisions += port_stats.eth.tncl;\n-\tp_stats->rx_mac_bytes += port_stats.eth.rbyte;\n-\tp_stats->rx_mac_uc_packets += port_stats.eth.rxuca;\n-\tp_stats->rx_mac_mc_packets += port_stats.eth.rxmca;\n-\tp_stats->rx_mac_bc_packets += port_stats.eth.rxbca;\n-\tp_stats->rx_mac_frames_ok += port_stats.eth.rxpok;\n-\tp_stats->tx_mac_bytes += port_stats.eth.tbyte;\n-\tp_stats->tx_mac_uc_packets += port_stats.eth.txuca;\n-\tp_stats->tx_mac_mc_packets += port_stats.eth.txmca;\n-\tp_stats->tx_mac_bc_packets += port_stats.eth.txbca;\n-\tp_stats->tx_mac_ctrl_frames += port_stats.eth.txcf;\n+\tp_common->rx_64_byte_packets += port_stats.eth.r64;\n+\tp_common->rx_65_to_127_byte_packets += port_stats.eth.r127;\n+\tp_common->rx_128_to_255_byte_packets += port_stats.eth.r255;\n+\tp_common->rx_256_to_511_byte_packets += port_stats.eth.r511;\n+\tp_common->rx_512_to_1023_byte_packets += port_stats.eth.r1023;\n+\tp_common->rx_1024_to_1518_byte_packets += port_stats.eth.r1518;\n+\tp_common->rx_crc_errors += port_stats.eth.rfcs;\n+\tp_common->rx_mac_crtl_frames += port_stats.eth.rxcf;\n+\tp_common->rx_pause_frames += port_stats.eth.rxpf;\n+\tp_common->rx_pfc_frames += port_stats.eth.rxpp;\n+\tp_common->rx_align_errors += port_stats.eth.raln;\n+\tp_common->rx_carrier_errors += port_stats.eth.rfcr;\n+\tp_common->rx_oversize_packets += port_stats.eth.rovr;\n+\tp_common->rx_jabbers += port_stats.eth.rjbr;\n+\tp_common->rx_undersize_packets += port_stats.eth.rund;\n+\tp_common->rx_fragments += port_stats.eth.rfrg;\n+\tp_common->tx_64_byte_packets += port_stats.eth.t64;\n+\tp_common->tx_65_to_127_byte_packets += port_stats.eth.t127;\n+\tp_common->tx_128_to_255_byte_packets += port_stats.eth.t255;\n+\tp_common->tx_256_to_511_byte_packets += port_stats.eth.t511;\n+\tp_common->tx_512_to_1023_byte_packets += port_stats.eth.t1023;\n+\tp_common->tx_1024_to_1518_byte_packets += port_stats.eth.t1518;\n+\tp_common->tx_pause_frames += port_stats.eth.txpf;\n+\tp_common->tx_pfc_frames += port_stats.eth.txpp;\n+\tp_common->rx_mac_bytes += port_stats.eth.rbyte;\n+\tp_common->rx_mac_uc_packets += port_stats.eth.rxuca;\n+\tp_common->rx_mac_mc_packets += port_stats.eth.rxmca;\n+\tp_common->rx_mac_bc_packets += port_stats.eth.rxbca;\n+\tp_common->rx_mac_frames_ok += port_stats.eth.rxpok;\n+\tp_common->tx_mac_bytes += port_stats.eth.tbyte;\n+\tp_common->tx_mac_uc_packets += port_stats.eth.txuca;\n+\tp_common->tx_mac_mc_packets += port_stats.eth.txmca;\n+\tp_common->tx_mac_bc_packets += port_stats.eth.txbca;\n+\tp_common->tx_mac_ctrl_frames += port_stats.eth.txcf;\n \tfor (j = 0; j < 8; j++) {\n-\t\tp_stats->brb_truncates += port_stats.brb.brb_truncate[j];\n-\t\tp_stats->brb_discards += port_stats.brb.brb_discard[j];\n+\t\tp_common->brb_truncates += port_stats.brb.brb_truncate[j];\n+\t\tp_common->brb_discards += port_stats.brb.brb_discard[j];\n+\t}\n+\n+\tif (ECORE_IS_BB(p_hwfn->p_dev)) {\n+\t\tstruct ecore_eth_stats_bb *p_bb = &p_stats->bb;\n+\n+\t\tp_bb->rx_1519_to_1522_byte_packets +=\n+\t\t\tport_stats.eth.u0.bb0.r1522;\n+\t\tp_bb->rx_1519_to_2047_byte_packets +=\n+\t\t\tport_stats.eth.u0.bb0.r2047;\n+\t\tp_bb->rx_2048_to_4095_byte_packets +=\n+\t\t\tport_stats.eth.u0.bb0.r4095;\n+\t\tp_bb->rx_4096_to_9216_byte_packets +=\n+\t\t\tport_stats.eth.u0.bb0.r9216;\n+\t\tp_bb->rx_9217_to_16383_byte_packets +=\n+\t\t\tport_stats.eth.u0.bb0.r16383;\n+\t\tp_bb->tx_1519_to_2047_byte_packets +=\n+\t\t\tport_stats.eth.u1.bb1.t2047;\n+\t\tp_bb->tx_2048_to_4095_byte_packets +=\n+\t\t\tport_stats.eth.u1.bb1.t4095;\n+\t\tp_bb->tx_4096_to_9216_byte_packets +=\n+\t\t\tport_stats.eth.u1.bb1.t9216;\n+\t\tp_bb->tx_9217_to_16383_byte_packets +=\n+\t\t\tport_stats.eth.u1.bb1.t16383;\n+\t\tp_bb->tx_lpi_entry_count += port_stats.eth.u2.bb2.tlpiec;\n+\t\tp_bb->tx_total_collisions += port_stats.eth.u2.bb2.tncl;\n+\t} else {\n+\t\tstruct ecore_eth_stats_ah *p_ah = &p_stats->ah;\n+\n+\t\tp_ah->rx_1519_to_max_byte_packets +=\n+\t\t\tport_stats.eth.u0.ah0.r1519_to_max;\n+\t\tp_ah->tx_1519_to_max_byte_packets =\n+\t\t\tport_stats.eth.u1.ah1.t1519_to_max;\n \t}\n }\n \ndiff --git a/drivers/net/qede/base/mcp_public.h b/drivers/net/qede/base/mcp_public.h\nindex fcf9847..1ad8a96 100644\n--- a/drivers/net/qede/base/mcp_public.h\n+++ b/drivers/net/qede/base/mcp_public.h\n@@ -132,13 +132,28 @@ struct eth_stats {\n \tu64 r1023; /* 0x04 (Offset 0x20 ) RX 512 to 1023 byte frame counter*/\n /* 0x05 (Offset 0x28 ) RX 1024 to 1518 byte frame counter */\n \tu64 r1518;\n+\tunion {\n+\t\tstruct { /* bb */\n /* 0x06 (Offset 0x30 ) RX 1519 to 1522 byte VLAN-tagged frame counter */\n-\tu64 r1522;\n-\tu64 r2047; /* 0x07 (Offset 0x38 ) RX 1519 to 2047 byte frame counter*/\n-\tu64 r4095; /* 0x08 (Offset 0x40 ) RX 2048 to 4095 byte frame counter*/\n-\tu64 r9216; /* 0x09 (Offset 0x48 ) RX 4096 to 9216 byte frame counter*/\n+\t\t\tu64 r1522;\n+/* 0x07 (Offset 0x38 ) RX 1519 to 2047 byte frame counter*/\n+\t\t\tu64 r2047;\n+/* 0x08 (Offset 0x40 ) RX 2048 to 4095 byte frame counter*/\n+\t\t\tu64 r4095;\n+/* 0x09 (Offset 0x48 ) RX 4096 to 9216 byte frame counter*/\n+\t\t\tu64 r9216;\n /* 0x0A (Offset 0x50 ) RX 9217 to 16383 byte frame counter */\n-\tu64 r16383;\n+\t\t\tu64 r16383;\n+\t\t} bb0;\n+\t\tstruct { /* ah */\n+\t\t\tu64 unused1;\n+/* 0x07 (Offset 0x38 ) RX 1519 to max byte frame counter*/\n+\t\t\tu64 r1519_to_max;\n+\t\t\tu64 unused2;\n+\t\t\tu64 unused3;\n+\t\t\tu64 unused4;\n+\t\t} ah0;\n+\t} u0;\n \tu64 rfcs;       /* 0x0F (Offset 0x58 ) RX FCS error frame counter*/\n \tu64 rxcf;       /* 0x10 (Offset 0x60 ) RX control frame counter*/\n \tu64 rxpf;       /* 0x11 (Offset 0x68 ) RX pause frame counter*/\n@@ -156,19 +171,40 @@ struct eth_stats {\n \tu64 t1023; /* 0x44 (Offset 0xc8 ) TX 512 to 1023 byte frame counter*/\n /* 0x45 (Offset 0xd0 ) TX 1024 to 1518 byte frame counter */\n \tu64 t1518;\n+\tunion {\n+\t\tstruct { /* bb */\n /* 0x47 (Offset 0xd8 ) TX 1519 to 2047 byte frame counter */\n-\tu64 t2047;\n+\t\t\tu64 t2047;\n /* 0x48 (Offset 0xe0 ) TX 2048 to 4095 byte frame counter */\n-\tu64 t4095;\n+\t\t\tu64 t4095;\n /* 0x49 (Offset 0xe8 ) TX 4096 to 9216 byte frame counter */\n-\tu64 t9216;\n+\t\t\tu64 t9216;\n /* 0x4A (Offset 0xf0 ) TX 9217 to 16383 byte frame counter */\n-\tu64 t16383;\n+\t\t\tu64 t16383;\n+\t\t} bb1;\n+\t\tstruct { /* ah */\n+/* 0x47 (Offset 0xd8 ) TX 1519 to max byte frame counter */\n+\t\t\tu64 t1519_to_max;\n+\t\t\tu64 unused6;\n+\t\t\tu64 unused7;\n+\t\t\tu64 unused8;\n+\t\t} ah1;\n+\t} u1;\n \tu64 txpf;       /* 0x50 (Offset 0xf8 ) TX pause frame counter */\n \tu64 txpp;       /* 0x51 (Offset 0x100) TX PFC frame counter */\n /* 0x6C (Offset 0x108) Transmit Logical Type LLFC message counter */\n-\tu64 tlpiec;\n-\tu64 tncl; /* 0x6E (Offset 0x110) Transmit Total Collision Counter */\n+\tunion {\n+\t\tstruct { /* bb */\n+/* 0x6C (Offset 0x108) Transmit Logical Type LLFC message counter */\n+\t\t\tu64 tlpiec;\n+/* 0x6E (Offset 0x110) Transmit Total Collision Counter */\n+\t\t\tu64 tncl;\n+\t\t} bb2;\n+\t\tstruct { /* ah */\n+\t\t\tu64 unused9;\n+\t\t\tu64 unused10;\n+\t\t} ah2;\n+\t} u2;\n \tu64 rbyte;      /* 0x3d (Offset 0x118) RX byte counter */\n \tu64 rxuca;      /* 0x0c (Offset 0x120) RX UC frame counter */\n \tu64 rxmca;      /* 0x0d (Offset 0x128) RX MC frame counter */\ndiff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c\nindex a0616a4..ac58ae5 100644\n--- a/drivers/net/qede/qede_ethdev.c\n+++ b/drivers/net/qede/qede_ethdev.c\n@@ -125,143 +125,199 @@ struct rte_qede_xstats_name_off {\n };\n \n static const struct rte_qede_xstats_name_off qede_xstats_strings[] = {\n-\t{\"rx_unicast_bytes\", offsetof(struct ecore_eth_stats, rx_ucast_bytes)},\n+\t{\"rx_unicast_bytes\",\n+\t\toffsetof(struct ecore_eth_stats_common, rx_ucast_bytes)},\n \t{\"rx_multicast_bytes\",\n-\t\toffsetof(struct ecore_eth_stats, rx_mcast_bytes)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_mcast_bytes)},\n \t{\"rx_broadcast_bytes\",\n-\t\toffsetof(struct ecore_eth_stats, rx_bcast_bytes)},\n-\t{\"rx_unicast_packets\", offsetof(struct ecore_eth_stats, rx_ucast_pkts)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_bcast_bytes)},\n+\t{\"rx_unicast_packets\",\n+\t\toffsetof(struct ecore_eth_stats_common, rx_ucast_pkts)},\n \t{\"rx_multicast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_mcast_pkts)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_mcast_pkts)},\n \t{\"rx_broadcast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_bcast_pkts)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_bcast_pkts)},\n \n-\t{\"tx_unicast_bytes\", offsetof(struct ecore_eth_stats, tx_ucast_bytes)},\n+\t{\"tx_unicast_bytes\",\n+\t\toffsetof(struct ecore_eth_stats_common, tx_ucast_bytes)},\n \t{\"tx_multicast_bytes\",\n-\t\toffsetof(struct ecore_eth_stats, tx_mcast_bytes)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_mcast_bytes)},\n \t{\"tx_broadcast_bytes\",\n-\t\toffsetof(struct ecore_eth_stats, tx_bcast_bytes)},\n-\t{\"tx_unicast_packets\", offsetof(struct ecore_eth_stats, tx_ucast_pkts)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_bcast_bytes)},\n+\t{\"tx_unicast_packets\",\n+\t\toffsetof(struct ecore_eth_stats_common, tx_ucast_pkts)},\n \t{\"tx_multicast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_mcast_pkts)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_mcast_pkts)},\n \t{\"tx_broadcast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_bcast_pkts)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_bcast_pkts)},\n \n \t{\"rx_64_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_64_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_64_byte_packets)},\n \t{\"rx_65_to_127_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_65_to_127_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t rx_65_to_127_byte_packets)},\n \t{\"rx_128_to_255_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_128_to_255_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t rx_128_to_255_byte_packets)},\n \t{\"rx_256_to_511_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_256_to_511_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t rx_256_to_511_byte_packets)},\n \t{\"rx_512_to_1023_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_512_to_1023_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t rx_512_to_1023_byte_packets)},\n \t{\"rx_1024_to_1518_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_1024_to_1518_byte_packets)},\n-\t{\"rx_1519_to_1522_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_1519_to_1522_byte_packets)},\n-\t{\"rx_1519_to_2047_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_1519_to_2047_byte_packets)},\n-\t{\"rx_2048_to_4095_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_2048_to_4095_byte_packets)},\n-\t{\"rx_4096_to_9216_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_4096_to_9216_byte_packets)},\n-\t{\"rx_9217_to_16383_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats,\n-\t\t\t rx_9217_to_16383_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t rx_1024_to_1518_byte_packets)},\n \t{\"tx_64_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_64_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_64_byte_packets)},\n \t{\"tx_65_to_127_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_65_to_127_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t tx_65_to_127_byte_packets)},\n \t{\"tx_128_to_255_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_128_to_255_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t tx_128_to_255_byte_packets)},\n \t{\"tx_256_to_511_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_256_to_511_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t tx_256_to_511_byte_packets)},\n \t{\"tx_512_to_1023_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_512_to_1023_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t tx_512_to_1023_byte_packets)},\n \t{\"tx_1024_to_1518_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_1024_to_1518_byte_packets)},\n-\t{\"trx_1519_to_1522_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_1519_to_2047_byte_packets)},\n-\t{\"tx_2048_to_4095_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_2048_to_4095_byte_packets)},\n-\t{\"tx_4096_to_9216_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_4096_to_9216_byte_packets)},\n-\t{\"tx_9217_to_16383_byte_packets\",\n-\t\toffsetof(struct ecore_eth_stats,\n-\t\t\t tx_9217_to_16383_byte_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t tx_1024_to_1518_byte_packets)},\n \n \t{\"rx_mac_crtl_frames\",\n-\t\toffsetof(struct ecore_eth_stats, rx_mac_crtl_frames)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_mac_crtl_frames)},\n \t{\"tx_mac_control_frames\",\n-\t\toffsetof(struct ecore_eth_stats, tx_mac_ctrl_frames)},\n-\t{\"rx_pause_frames\", offsetof(struct ecore_eth_stats, rx_pause_frames)},\n-\t{\"tx_pause_frames\", offsetof(struct ecore_eth_stats, tx_pause_frames)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_mac_ctrl_frames)},\n+\t{\"rx_pause_frames\",\n+\t\toffsetof(struct ecore_eth_stats_common, rx_pause_frames)},\n+\t{\"tx_pause_frames\",\n+\t\toffsetof(struct ecore_eth_stats_common, tx_pause_frames)},\n \t{\"rx_priority_flow_control_frames\",\n-\t\toffsetof(struct ecore_eth_stats, rx_pfc_frames)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_pfc_frames)},\n \t{\"tx_priority_flow_control_frames\",\n-\t\toffsetof(struct ecore_eth_stats, tx_pfc_frames)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_pfc_frames)},\n \n-\t{\"rx_crc_errors\", offsetof(struct ecore_eth_stats, rx_crc_errors)},\n-\t{\"rx_align_errors\", offsetof(struct ecore_eth_stats, rx_align_errors)},\n+\t{\"rx_crc_errors\",\n+\t\toffsetof(struct ecore_eth_stats_common, rx_crc_errors)},\n+\t{\"rx_align_errors\",\n+\t\toffsetof(struct ecore_eth_stats_common, rx_align_errors)},\n \t{\"rx_carrier_errors\",\n-\t\toffsetof(struct ecore_eth_stats, rx_carrier_errors)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_carrier_errors)},\n \t{\"rx_oversize_packet_errors\",\n-\t\toffsetof(struct ecore_eth_stats, rx_oversize_packets)},\n-\t{\"rx_jabber_errors\", offsetof(struct ecore_eth_stats, rx_jabbers)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_oversize_packets)},\n+\t{\"rx_jabber_errors\",\n+\t\toffsetof(struct ecore_eth_stats_common, rx_jabbers)},\n \t{\"rx_undersize_packet_errors\",\n-\t\toffsetof(struct ecore_eth_stats, rx_undersize_packets)},\n-\t{\"rx_fragments\", offsetof(struct ecore_eth_stats, rx_fragments)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_undersize_packets)},\n+\t{\"rx_fragments\", offsetof(struct ecore_eth_stats_common, rx_fragments)},\n \t{\"rx_host_buffer_not_available\",\n-\t\toffsetof(struct ecore_eth_stats, no_buff_discards)},\n+\t\toffsetof(struct ecore_eth_stats_common, no_buff_discards)},\n \t/* Number of packets discarded because they are bigger than MTU */\n \t{\"rx_packet_too_big_discards\",\n-\t\toffsetof(struct ecore_eth_stats, packet_too_big_discard)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t packet_too_big_discard)},\n \t{\"rx_ttl_zero_discards\",\n-\t\toffsetof(struct ecore_eth_stats, ttl0_discard)},\n+\t\toffsetof(struct ecore_eth_stats_common, ttl0_discard)},\n \t{\"rx_multi_function_tag_filter_discards\",\n-\t\toffsetof(struct ecore_eth_stats, mftag_filter_discards)},\n+\t\toffsetof(struct ecore_eth_stats_common, mftag_filter_discards)},\n \t{\"rx_mac_filter_discards\",\n-\t\toffsetof(struct ecore_eth_stats, mac_filter_discards)},\n+\t\toffsetof(struct ecore_eth_stats_common, mac_filter_discards)},\n \t{\"rx_hw_buffer_truncates\",\n-\t\toffsetof(struct ecore_eth_stats, brb_truncates)},\n+\t\toffsetof(struct ecore_eth_stats_common, brb_truncates)},\n \t{\"rx_hw_buffer_discards\",\n-\t\toffsetof(struct ecore_eth_stats, brb_discards)},\n-\t{\"tx_lpi_entry_count\",\n-\t\toffsetof(struct ecore_eth_stats, tx_lpi_entry_count)},\n-\t{\"tx_total_collisions\",\n-\t\toffsetof(struct ecore_eth_stats, tx_total_collisions)},\n+\t\toffsetof(struct ecore_eth_stats_common, brb_discards)},\n \t{\"tx_error_drop_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_err_drop_pkts)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_err_drop_pkts)},\n \n-\t{\"rx_mac_bytes\", offsetof(struct ecore_eth_stats, rx_mac_bytes)},\n+\t{\"rx_mac_bytes\", offsetof(struct ecore_eth_stats_common, rx_mac_bytes)},\n \t{\"rx_mac_unicast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_mac_uc_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_mac_uc_packets)},\n \t{\"rx_mac_multicast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_mac_mc_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_mac_mc_packets)},\n \t{\"rx_mac_broadcast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, rx_mac_bc_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_mac_bc_packets)},\n \t{\"rx_mac_frames_ok\",\n-\t\toffsetof(struct ecore_eth_stats, rx_mac_frames_ok)},\n-\t{\"tx_mac_bytes\", offsetof(struct ecore_eth_stats, tx_mac_bytes)},\n+\t\toffsetof(struct ecore_eth_stats_common, rx_mac_frames_ok)},\n+\t{\"tx_mac_bytes\", offsetof(struct ecore_eth_stats_common, tx_mac_bytes)},\n \t{\"tx_mac_unicast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_mac_uc_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_mac_uc_packets)},\n \t{\"tx_mac_multicast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_mac_mc_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_mac_mc_packets)},\n \t{\"tx_mac_broadcast_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tx_mac_bc_packets)},\n+\t\toffsetof(struct ecore_eth_stats_common, tx_mac_bc_packets)},\n \n \t{\"lro_coalesced_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tpa_coalesced_pkts)},\n+\t\toffsetof(struct ecore_eth_stats_common, tpa_coalesced_pkts)},\n \t{\"lro_coalesced_events\",\n-\t\toffsetof(struct ecore_eth_stats, tpa_coalesced_events)},\n+\t\toffsetof(struct ecore_eth_stats_common, tpa_coalesced_events)},\n \t{\"lro_aborts_num\",\n-\t\toffsetof(struct ecore_eth_stats, tpa_aborts_num)},\n+\t\toffsetof(struct ecore_eth_stats_common, tpa_aborts_num)},\n \t{\"lro_not_coalesced_packets\",\n-\t\toffsetof(struct ecore_eth_stats, tpa_not_coalesced_pkts)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t tpa_not_coalesced_pkts)},\n \t{\"lro_coalesced_bytes\",\n-\t\toffsetof(struct ecore_eth_stats, tpa_coalesced_bytes)},\n+\t\toffsetof(struct ecore_eth_stats_common,\n+\t\t\t tpa_coalesced_bytes)},\n+};\n+\n+static const struct rte_qede_xstats_name_off qede_bb_xstats_strings[] = {\n+\t{\"rx_1519_to_1522_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb,\n+\t\t\t rx_1519_to_1522_byte_packets)},\n+\t{\"rx_1519_to_2047_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb,\n+\t\t\t rx_1519_to_2047_byte_packets)},\n+\t{\"rx_2048_to_4095_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb,\n+\t\t\t rx_2048_to_4095_byte_packets)},\n+\t{\"rx_4096_to_9216_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb,\n+\t\t\t rx_4096_to_9216_byte_packets)},\n+\t{\"rx_9217_to_16383_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb,\n+\t\t\t rx_9217_to_16383_byte_packets)},\n+\n+\t{\"tx_1519_to_2047_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb,\n+\t\t\t tx_1519_to_2047_byte_packets)},\n+\t{\"tx_2048_to_4095_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb,\n+\t\t\t tx_2048_to_4095_byte_packets)},\n+\t{\"tx_4096_to_9216_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb,\n+\t\t\t tx_4096_to_9216_byte_packets)},\n+\t{\"tx_9217_to_16383_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb,\n+\t\t\t tx_9217_to_16383_byte_packets)},\n+\n+\t{\"tx_lpi_entry_count\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb, tx_lpi_entry_count)},\n+\t{\"tx_total_collisions\",\n+\t\toffsetof(struct ecore_eth_stats, bb) +\n+\t\toffsetof(struct ecore_eth_stats_bb, tx_total_collisions)},\n+};\n+\n+static const struct rte_qede_xstats_name_off qede_ah_xstats_strings[] = {\n+\t{\"rx_1519_to_max_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, ah) +\n+\t\toffsetof(struct ecore_eth_stats_ah,\n+\t\t\t rx_1519_to_max_byte_packets)},\n+\t{\"tx_1519_to_max_byte_packets\",\n+\t\toffsetof(struct ecore_eth_stats, ah) +\n+\t\toffsetof(struct ecore_eth_stats_ah,\n+\t\t\t tx_1519_to_max_byte_packets)},\n };\n \n static const struct rte_qede_xstats_name_off qede_rxq_xstats_strings[] = {\n@@ -1416,32 +1472,33 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)\n \tecore_get_vport_stats(edev, &stats);\n \n \t/* RX Stats */\n-\teth_stats->ipackets = stats.rx_ucast_pkts +\n-\t    stats.rx_mcast_pkts + stats.rx_bcast_pkts;\n+\teth_stats->ipackets = stats.common.rx_ucast_pkts +\n+\t    stats.common.rx_mcast_pkts + stats.common.rx_bcast_pkts;\n \n-\teth_stats->ibytes = stats.rx_ucast_bytes +\n-\t    stats.rx_mcast_bytes + stats.rx_bcast_bytes;\n+\teth_stats->ibytes = stats.common.rx_ucast_bytes +\n+\t    stats.common.rx_mcast_bytes + stats.common.rx_bcast_bytes;\n \n-\teth_stats->ierrors = stats.rx_crc_errors +\n-\t    stats.rx_align_errors +\n-\t    stats.rx_carrier_errors +\n-\t    stats.rx_oversize_packets +\n-\t    stats.rx_jabbers + stats.rx_undersize_packets;\n+\teth_stats->ierrors = stats.common.rx_crc_errors +\n+\t    stats.common.rx_align_errors +\n+\t    stats.common.rx_carrier_errors +\n+\t    stats.common.rx_oversize_packets +\n+\t    stats.common.rx_jabbers + stats.common.rx_undersize_packets;\n \n-\teth_stats->rx_nombuf = stats.no_buff_discards;\n+\teth_stats->rx_nombuf = stats.common.no_buff_discards;\n \n-\teth_stats->imissed = stats.mftag_filter_discards +\n-\t    stats.mac_filter_discards +\n-\t    stats.no_buff_discards + stats.brb_truncates + stats.brb_discards;\n+\teth_stats->imissed = stats.common.mftag_filter_discards +\n+\t    stats.common.mac_filter_discards +\n+\t    stats.common.no_buff_discards +\n+\t    stats.common.brb_truncates + stats.common.brb_discards;\n \n \t/* TX stats */\n-\teth_stats->opackets = stats.tx_ucast_pkts +\n-\t    stats.tx_mcast_pkts + stats.tx_bcast_pkts;\n+\teth_stats->opackets = stats.common.tx_ucast_pkts +\n+\t    stats.common.tx_mcast_pkts + stats.common.tx_bcast_pkts;\n \n-\teth_stats->obytes = stats.tx_ucast_bytes +\n-\t    stats.tx_mcast_bytes + stats.tx_bcast_bytes;\n+\teth_stats->obytes = stats.common.tx_ucast_bytes +\n+\t    stats.common.tx_mcast_bytes + stats.common.tx_bcast_bytes;\n \n-\teth_stats->oerrors = stats.tx_err_drop_pkts;\n+\teth_stats->oerrors = stats.common.tx_err_drop_pkts;\n \n \t/* Queue stats */\n \trxq_stat_cntrs = RTE_MIN(QEDE_RSS_COUNT(qdev),\n@@ -1490,10 +1547,18 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)\n \n static unsigned\n qede_get_xstats_count(struct qede_dev *qdev) {\n-\treturn RTE_DIM(qede_xstats_strings) +\n-\t\t(RTE_DIM(qede_rxq_xstats_strings) *\n-\t\t RTE_MIN(QEDE_RSS_COUNT(qdev),\n-\t\t\t RTE_ETHDEV_QUEUE_STAT_CNTRS));\n+\tif (ECORE_IS_BB(&qdev->edev))\n+\t\treturn RTE_DIM(qede_xstats_strings) +\n+\t\t       RTE_DIM(qede_bb_xstats_strings) +\n+\t\t       (RTE_DIM(qede_rxq_xstats_strings) *\n+\t\t\tRTE_MIN(QEDE_RSS_COUNT(qdev),\n+\t\t\t\tRTE_ETHDEV_QUEUE_STAT_CNTRS));\n+\telse\n+\t\treturn RTE_DIM(qede_xstats_strings) +\n+\t\t       RTE_DIM(qede_ah_xstats_strings) +\n+\t\t       (RTE_DIM(qede_rxq_xstats_strings) *\n+\t\t\tRTE_MIN(QEDE_RSS_COUNT(qdev),\n+\t\t\t\tRTE_ETHDEV_QUEUE_STAT_CNTRS));\n }\n \n static int\n@@ -1502,6 +1567,7 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)\n \t\t      __rte_unused unsigned int limit)\n {\n \tstruct qede_dev *qdev = dev->data->dev_private;\n+\tstruct ecore_dev *edev = &qdev->edev;\n \tconst unsigned int stat_cnt = qede_get_xstats_count(qdev);\n \tunsigned int i, qid, stat_idx = 0;\n \tunsigned int rxq_stat_cntrs;\n@@ -1515,6 +1581,24 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)\n \t\t\tstat_idx++;\n \t\t}\n \n+\t\tif (ECORE_IS_BB(edev)) {\n+\t\t\tfor (i = 0; i < RTE_DIM(qede_bb_xstats_strings); i++) {\n+\t\t\t\tsnprintf(xstats_names[stat_idx].name,\n+\t\t\t\t\tsizeof(xstats_names[stat_idx].name),\n+\t\t\t\t\t\"%s\",\n+\t\t\t\t\tqede_bb_xstats_strings[i].name);\n+\t\t\t\tstat_idx++;\n+\t\t\t}\n+\t\t} else {\n+\t\t\tfor (i = 0; i < RTE_DIM(qede_ah_xstats_strings); i++) {\n+\t\t\t\tsnprintf(xstats_names[stat_idx].name,\n+\t\t\t\t\tsizeof(xstats_names[stat_idx].name),\n+\t\t\t\t\t\"%s\",\n+\t\t\t\t\tqede_ah_xstats_strings[i].name);\n+\t\t\t\tstat_idx++;\n+\t\t\t}\n+\t\t}\n+\n \t\trxq_stat_cntrs = RTE_MIN(QEDE_RSS_COUNT(qdev),\n \t\t\t\t\t RTE_ETHDEV_QUEUE_STAT_CNTRS);\n \t\tfor (qid = 0; qid < rxq_stat_cntrs; qid++) {\n@@ -1555,6 +1639,24 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)\n \t\tstat_idx++;\n \t}\n \n+\tif (ECORE_IS_BB(edev)) {\n+\t\tfor (i = 0; i < RTE_DIM(qede_bb_xstats_strings); i++) {\n+\t\t\txstats[stat_idx].value =\n+\t\t\t\t\t*(uint64_t *)(((char *)&stats) +\n+\t\t\t\t\tqede_bb_xstats_strings[i].offset);\n+\t\t\txstats[stat_idx].id = stat_idx;\n+\t\t\tstat_idx++;\n+\t\t}\n+\t} else {\n+\t\tfor (i = 0; i < RTE_DIM(qede_ah_xstats_strings); i++) {\n+\t\t\txstats[stat_idx].value =\n+\t\t\t\t\t*(uint64_t *)(((char *)&stats) +\n+\t\t\t\t\tqede_ah_xstats_strings[i].offset);\n+\t\t\txstats[stat_idx].id = stat_idx;\n+\t\t\tstat_idx++;\n+\t\t}\n+\t}\n+\n \trxq_stat_cntrs = RTE_MIN(QEDE_RSS_COUNT(qdev),\n \t\t\t\t RTE_ETHDEV_QUEUE_STAT_CNTRS);\n \tfor (qid = 0; qid < rxq_stat_cntrs; qid++) {\n",
    "prefixes": [
        "dpdk-dev",
        "INTERNAL",
        "REVIEW",
        "3/7"
    ]
}