get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 17110,
    "url": "https://patches.dpdk.org/api/patches/17110/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1479740470-6723-15-git-send-email-arybchenko@solarflare.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": "<1479740470-6723-15-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1479740470-6723-15-git-send-email-arybchenko@solarflare.com",
    "date": "2016-11-21T15:00:28",
    "name": "[dpdk-dev,14/56] net/sfc: import libefx software per-queue statistics support",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "a63bb4a81652de7827c02dcb128ca25346b709f2",
    "submitter": {
        "id": 607,
        "url": "https://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.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/1479740470-6723-15-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/17110/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/17110/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 6A43F58C5;\n\tMon, 21 Nov 2016 16:02:34 +0100 (CET)",
            "from nbfkord-smmo02.seg.att.com (nbfkord-smmo02.seg.att.com\n\t[209.65.160.78]) by dpdk.org (Postfix) with ESMTP id 00AD3376D\n\tfor <dev@dpdk.org>; Mon, 21 Nov 2016 16:01:28 +0100 (CET)",
            "from unknown [12.187.104.26]\n\tby nbfkord-smmo02.seg.att.com(mxl_mta-7.2.4-7) with SMTP id\n\t84c03385.0.1541294.00-2307.3424180.nbfkord-smmo02.seg.att.com\n\t(envelope-from <arybchenko@solarflare.com>); \n\tMon, 21 Nov 2016 15:01:29 +0000 (UTC)",
            "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1044.25; Mon, 21 Nov 2016 07:01:21 -0800",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1044.25 via Frontend Transport; Mon, 21 Nov 2016 07:01:21 -0800",
            "from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com\n\t[10.17.10.10])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tuALF1Kw9007140 for <dev@dpdk.org>; Mon, 21 Nov 2016 15:01:20 GMT",
            "from uklogin.uk.solarflarecom.com (localhost.localdomain\n\t[127.0.0.1])\n\tby uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tuALF1J35006765 for <dev@dpdk.org>; Mon, 21 Nov 2016 15:01:19 GMT"
        ],
        "X-MXL-Hash": "58330c49283c5c14-22ef3814c3d30c62a1b7dd8060397efcf5f09d71",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "Date": "Mon, 21 Nov 2016 15:00:28 +0000",
        "Message-ID": "<1479740470-6723-15-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.2.3",
        "In-Reply-To": "<1479740470-6723-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1479740470-6723-1-git-send-email-arybchenko@solarflare.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-AnalysisOut": [
            "[v=2.1 cv=UI/baXry c=1 sm=1 tr=0 a=8BlWFWvVlq5taO8ncb8nKg==]",
            "[:17 a=L24OOQBejmoA:10 a=zRKbQ67AAAAA:8 a=c9JIjMtgX33JgOjHd]",
            "[YYA:9 a=9ryRj7BNDcSUwMkt:21 a=PA03WX8tBzeizutn5_OT:22]"
        ],
        "X-Spam": "[F=0.4883210455; CM=0.500; S=0.488(2015072901)]",
        "X-MAIL-FROM": "<arybchenko@solarflare.com>",
        "X-SOURCE-IP": "[12.187.104.26]",
        "Subject": "[dpdk-dev] [PATCH 14/56] net/sfc: import libefx software per-queue\n\tstatistics support",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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": "EFSYS_OPT_QSTATS should be enabled to use it.\n\nFrom Solarflare Communications Inc.\n\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n drivers/net/sfc/efx/base/ef10_ev.c   |  25 ++++++++\n drivers/net/sfc/efx/base/ef10_impl.h |  16 +++++\n drivers/net/sfc/efx/base/ef10_tx.c   |  26 ++++++++\n drivers/net/sfc/efx/base/efx.h       |  97 ++++++++++++++++++++++++++++++\n drivers/net/sfc/efx/base/efx_check.h |   7 +++\n drivers/net/sfc/efx/base/efx_ev.c    | 112 +++++++++++++++++++++++++++++++++++\n drivers/net/sfc/efx/base/efx_impl.h  |  13 ++++\n drivers/net/sfc/efx/base/efx_tx.c    |  80 +++++++++++++++++++++++++\n 8 files changed, 376 insertions(+)",
    "diff": "diff --git a/drivers/net/sfc/efx/base/ef10_ev.c b/drivers/net/sfc/efx/base/ef10_ev.c\nindex 46ecd42..b4fe9a7 100644\n--- a/drivers/net/sfc/efx/base/ef10_ev.c\n+++ b/drivers/net/sfc/efx/base/ef10_ev.c\n@@ -33,7 +33,15 @@\n \n #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD\n \n+#if EFSYS_OPT_QSTATS\n+#define\tEFX_EV_QSTAT_INCR(_eep, _stat)\t\t\t\t\t\\\n+\tdo {\t\t\t\t\t\t\t\t\\\n+\t\t(_eep)->ee_stat[_stat]++;\t\t\t\t\\\n+\t_NOTE(CONSTANTCONDITION)\t\t\t\t\t\\\n+\t} while (B_FALSE)\n+#else\n #define\tEFX_EV_QSTAT_INCR(_eep, _stat)\n+#endif\n \n /*\n  * Non-interrupting event queue requires interrrupting event queue to\n@@ -731,6 +739,23 @@ ef10_ev_qmoderate(\n }\n \n \n+#if EFSYS_OPT_QSTATS\n+\t\t\tvoid\n+ef10_ev_qstats_update(\n+\t__in\t\t\t\tefx_evq_t *eep,\n+\t__inout_ecount(EV_NQSTATS)\tefsys_stat_t *stat)\n+{\n+\tunsigned int id;\n+\n+\tfor (id = 0; id < EV_NQSTATS; id++) {\n+\t\tefsys_stat_t *essp = &stat[id];\n+\n+\t\tEFSYS_STAT_INCR(essp, eep->ee_stat[id]);\n+\t\teep->ee_stat[id] = 0;\n+\t}\n+}\n+#endif /* EFSYS_OPT_QSTATS */\n+\n static\t__checkReturn\tboolean_t\n ef10_ev_rx(\n \t__in\t\tefx_evq_t *eep,\ndiff --git a/drivers/net/sfc/efx/base/ef10_impl.h b/drivers/net/sfc/efx/base/ef10_impl.h\nindex 5cbe6b1..e1d2903 100644\n--- a/drivers/net/sfc/efx/base/ef10_impl.h\n+++ b/drivers/net/sfc/efx/base/ef10_impl.h\n@@ -105,6 +105,13 @@ ef10_ev_qmoderate(\n \t__in\t\tefx_evq_t *eep,\n \t__in\t\tunsigned int us);\n \n+#if EFSYS_OPT_QSTATS\n+\t\t\tvoid\n+ef10_ev_qstats_update(\n+\t__in\t\t\t\tefx_evq_t *eep,\n+\t__inout_ecount(EV_NQSTATS)\tefsys_stat_t *stat);\n+#endif /* EFSYS_OPT_QSTATS */\n+\n \t\tvoid\n ef10_ev_rxlabel_init(\n \t__in\t\tefx_evq_t *eep,\n@@ -490,6 +497,15 @@ ef10_tx_qdesc_vlantci_create(\n \t__out\tefx_desc_t *edp);\n \n \n+#if EFSYS_OPT_QSTATS\n+\n+extern\t\t\tvoid\n+ef10_tx_qstats_update(\n+\t__in\t\t\t\tefx_txq_t *etp,\n+\t__inout_ecount(TX_NQSTATS)\tefsys_stat_t *stat);\n+\n+#endif /* EFSYS_OPT_QSTATS */\n+\n typedef uint32_t\tefx_piobuf_handle_t;\n \n #define\tEFX_PIOBUF_HANDLE_INVALID\t((efx_piobuf_handle_t) -1)\ndiff --git a/drivers/net/sfc/efx/base/ef10_tx.c b/drivers/net/sfc/efx/base/ef10_tx.c\nindex 59343a3..aa19cce 100644\n--- a/drivers/net/sfc/efx/base/ef10_tx.c\n+++ b/drivers/net/sfc/efx/base/ef10_tx.c\n@@ -34,7 +34,15 @@\n \n #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD\n \n+#if EFSYS_OPT_QSTATS\n+#define\tEFX_TX_QSTAT_INCR(_etp, _stat)\t\t\t\t\t\\\n+\tdo {\t\t\t\t\t\t\t\t\\\n+\t\t(_etp)->et_stat[_stat]++;\t\t\t\t\\\n+\t_NOTE(CONSTANTCONDITION)\t\t\t\t\t\\\n+\t} while (B_FALSE)\n+#else\n #define\tEFX_TX_QSTAT_INCR(_etp, _stat)\n+#endif\n \n static\t__checkReturn\tefx_rc_t\n efx_mcdi_init_txq(\n@@ -680,4 +688,22 @@ ef10_tx_qenable(\n \t/* FIXME */\n }\n \n+#if EFSYS_OPT_QSTATS\n+\t\t\tvoid\n+ef10_tx_qstats_update(\n+\t__in\t\t\t\tefx_txq_t *etp,\n+\t__inout_ecount(TX_NQSTATS)\tefsys_stat_t *stat)\n+{\n+\tunsigned int id;\n+\n+\tfor (id = 0; id < TX_NQSTATS; id++) {\n+\t\tefsys_stat_t *essp = &stat[id];\n+\n+\t\tEFSYS_STAT_INCR(essp, etp->et_stat[id]);\n+\t\tetp->et_stat[id] = 0;\n+\t}\n+}\n+\n+#endif /* EFSYS_OPT_QSTATS */\n+\n #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */\ndiff --git a/drivers/net/sfc/efx/base/efx.h b/drivers/net/sfc/efx/base/efx.h\nindex 15faf9d..c2587ca 100644\n--- a/drivers/net/sfc/efx/base/efx.h\n+++ b/drivers/net/sfc/efx/base/efx.h\n@@ -823,6 +823,54 @@ efx_sram_buf_tbl_clear(\n \n typedef struct efx_evq_s\tefx_evq_t;\n \n+#if EFSYS_OPT_QSTATS\n+\n+/* START MKCONFIG GENERATED EfxHeaderEventQueueBlock 6f3843f5fe7cc843 */\n+typedef enum efx_ev_qstat_e {\n+\tEV_ALL,\n+\tEV_RX,\n+\tEV_RX_OK,\n+\tEV_RX_FRM_TRUNC,\n+\tEV_RX_TOBE_DISC,\n+\tEV_RX_PAUSE_FRM_ERR,\n+\tEV_RX_BUF_OWNER_ID_ERR,\n+\tEV_RX_IPV4_HDR_CHKSUM_ERR,\n+\tEV_RX_TCP_UDP_CHKSUM_ERR,\n+\tEV_RX_ETH_CRC_ERR,\n+\tEV_RX_IP_FRAG_ERR,\n+\tEV_RX_MCAST_PKT,\n+\tEV_RX_MCAST_HASH_MATCH,\n+\tEV_RX_TCP_IPV4,\n+\tEV_RX_TCP_IPV6,\n+\tEV_RX_UDP_IPV4,\n+\tEV_RX_UDP_IPV6,\n+\tEV_RX_OTHER_IPV4,\n+\tEV_RX_OTHER_IPV6,\n+\tEV_RX_NON_IP,\n+\tEV_RX_BATCH,\n+\tEV_TX,\n+\tEV_TX_WQ_FF_FULL,\n+\tEV_TX_PKT_ERR,\n+\tEV_TX_PKT_TOO_BIG,\n+\tEV_TX_UNEXPECTED,\n+\tEV_GLOBAL,\n+\tEV_GLOBAL_MNT,\n+\tEV_DRIVER,\n+\tEV_DRIVER_SRM_UPD_DONE,\n+\tEV_DRIVER_TX_DESCQ_FLS_DONE,\n+\tEV_DRIVER_RX_DESCQ_FLS_DONE,\n+\tEV_DRIVER_RX_DESCQ_FLS_FAILED,\n+\tEV_DRIVER_RX_DSC_ERROR,\n+\tEV_DRIVER_TX_DSC_ERROR,\n+\tEV_DRV_GEN,\n+\tEV_MCDI_RESPONSE,\n+\tEV_NQSTATS\n+} efx_ev_qstat_t;\n+\n+/* END MKCONFIG GENERATED EfxHeaderEventQueueBlock */\n+\n+#endif\t/* EFSYS_OPT_QSTATS */\n+\n extern\t__checkReturn\tefx_rc_t\n efx_ev_init(\n \t__in\t\tefx_nic_t *enp);\n@@ -1014,6 +1062,24 @@ efx_ev_qprime(\n \t__in\t\tefx_evq_t *eep,\n \t__in\t\tunsigned int count);\n \n+#if EFSYS_OPT_QSTATS\n+\n+#if EFSYS_OPT_NAMES\n+\n+extern\t\tconst char *\n+efx_ev_qstat_name(\n+\t__in\tefx_nic_t *enp,\n+\t__in\tunsigned int id);\n+\n+#endif\t/* EFSYS_OPT_NAMES */\n+\n+extern\t\t\t\t\tvoid\n+efx_ev_qstats_update(\n+\t__in\t\t\t\tefx_evq_t *eep,\n+\t__inout_ecount(EV_NQSTATS)\tefsys_stat_t *stat);\n+\n+#endif\t/* EFSYS_OPT_QSTATS */\n+\n extern\t\tvoid\n efx_ev_qdestroy(\n \t__in\tefx_evq_t *eep);\n@@ -1106,6 +1172,19 @@ efx_rx_qdestroy(\n \n typedef struct efx_txq_s\tefx_txq_t;\n \n+#if EFSYS_OPT_QSTATS\n+\n+/* START MKCONFIG GENERATED EfxHeaderTransmitQueueBlock 12dff8778598b2db */\n+typedef enum efx_tx_qstat_e {\n+\tTX_POST,\n+\tTX_POST_PIO,\n+\tTX_NQSTATS\n+} efx_tx_qstat_t;\n+\n+/* END MKCONFIG GENERATED EfxHeaderTransmitQueueBlock */\n+\n+#endif\t/* EFSYS_OPT_QSTATS */\n+\n extern\t__checkReturn\tefx_rc_t\n efx_tx_init(\n \t__in\t\tefx_nic_t *enp);\n@@ -1234,6 +1313,24 @@ efx_tx_qdesc_vlantci_create(\n \t__in\tuint16_t tci,\n \t__out\tefx_desc_t *edp);\n \n+#if EFSYS_OPT_QSTATS\n+\n+#if EFSYS_OPT_NAMES\n+\n+extern\t\tconst char *\n+efx_tx_qstat_name(\n+\t__in\tefx_nic_t *etp,\n+\t__in\tunsigned int id);\n+\n+#endif\t/* EFSYS_OPT_NAMES */\n+\n+extern\t\t\t\t\tvoid\n+efx_tx_qstats_update(\n+\t__in\t\t\t\tefx_txq_t *etp,\n+\t__inout_ecount(TX_NQSTATS)\tefsys_stat_t *stat);\n+\n+#endif\t/* EFSYS_OPT_QSTATS */\n+\n extern\t\tvoid\n efx_tx_qdestroy(\n \t__in\tefx_txq_t *etp);\ndiff --git a/drivers/net/sfc/efx/base/efx_check.h b/drivers/net/sfc/efx/base/efx_check.h\nindex c78c5b6..6f0c216 100644\n--- a/drivers/net/sfc/efx/base/efx_check.h\n+++ b/drivers/net/sfc/efx/base/efx_check.h\n@@ -198,6 +198,13 @@\n # error \"PHY_TXC43128 is obsolete and is not supported.\"\n #endif\n \n+#if EFSYS_OPT_QSTATS\n+/* Support EVQ/RXQ/TXQ statistics */\n+# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)\n+#  error \"QSTATS requires SIENA or HUNTINGTON or MEDFORD\"\n+# endif\n+#endif /* EFSYS_OPT_QSTATS */\n+\n #ifdef EFSYS_OPT_RX_HDR_SPLIT\n # error \"RX_HDR_SPLIT is obsolete and is not supported\"\n #endif\ndiff --git a/drivers/net/sfc/efx/base/efx_ev.c b/drivers/net/sfc/efx/base/efx_ev.c\nindex 8cb78be..c7c5fa8 100644\n--- a/drivers/net/sfc/efx/base/efx_ev.c\n+++ b/drivers/net/sfc/efx/base/efx_ev.c\n@@ -31,7 +31,15 @@\n #include \"efx.h\"\n #include \"efx_impl.h\"\n \n+#if EFSYS_OPT_QSTATS\n+#define\tEFX_EV_QSTAT_INCR(_eep, _stat)\t\t\t\t\t\\\n+\tdo {\t\t\t\t\t\t\t\t\\\n+\t\t(_eep)->ee_stat[_stat]++;\t\t\t\t\\\n+\t_NOTE(CONSTANTCONDITION)\t\t\t\t\t\\\n+\t} while (B_FALSE)\n+#else\n #define\tEFX_EV_QSTAT_INCR(_eep, _stat)\n+#endif\n \n #define\tEFX_EV_PRESENT(_qword)\t\t\t\t\t\t\\\n \t(EFX_QWORD_FIELD((_qword), EFX_DWORD_0) != 0xffffffff &&\t\\\n@@ -79,6 +87,14 @@ siena_ev_qmoderate(\n \t__in\t\tefx_evq_t *eep,\n \t__in\t\tunsigned int us);\n \n+#if EFSYS_OPT_QSTATS\n+static\t\t\tvoid\n+siena_ev_qstats_update(\n+\t__in\t\t\t\tefx_evq_t *eep,\n+\t__inout_ecount(EV_NQSTATS)\tefsys_stat_t *stat);\n+\n+#endif\n+\n #endif /* EFSYS_OPT_SIENA */\n \n #if EFSYS_OPT_SIENA\n@@ -90,6 +106,9 @@ static const efx_ev_ops_t\t__efx_ev_siena_ops = {\n \tsiena_ev_qprime,\t\t\t/* eevo_qprime */\n \tsiena_ev_qpost,\t\t\t\t/* eevo_qpost */\n \tsiena_ev_qmoderate,\t\t\t/* eevo_qmoderate */\n+#if EFSYS_OPT_QSTATS\n+\tsiena_ev_qstats_update,\t\t\t/* eevo_qstats_update */\n+#endif\n };\n #endif /* EFSYS_OPT_SIENA */\n \n@@ -102,6 +121,9 @@ static const efx_ev_ops_t\t__efx_ev_ef10_ops = {\n \tef10_ev_qprime,\t\t\t\t/* eevo_qprime */\n \tef10_ev_qpost,\t\t\t\t/* eevo_qpost */\n \tef10_ev_qmoderate,\t\t\t/* eevo_qmoderate */\n+#if EFSYS_OPT_QSTATS\n+\tef10_ev_qstats_update,\t\t\t/* eevo_qstats_update */\n+#endif\n };\n #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */\n \n@@ -524,6 +546,22 @@ efx_ev_qmoderate(\n \treturn (rc);\n }\n \n+#if EFSYS_OPT_QSTATS\n+\t\t\t\t\tvoid\n+efx_ev_qstats_update(\n+\t__in\t\t\t\tefx_evq_t *eep,\n+\t__inout_ecount(EV_NQSTATS)\tefsys_stat_t *stat)\n+\n+{\tefx_nic_t *enp = eep->ee_enp;\n+\tconst efx_ev_ops_t *eevop = enp->en_eevop;\n+\n+\tEFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC);\n+\n+\teevop->eevo_qstats_update(eep, stat);\n+}\n+\n+#endif\t/* EFSYS_OPT_QSTATS */\n+\n #if EFSYS_OPT_SIENA\n \n static\t__checkReturn\tefx_rc_t\n@@ -1220,8 +1258,82 @@ siena_ev_qcreate(\n \n #endif /* EFSYS_OPT_SIENA */\n \n+#if EFSYS_OPT_QSTATS\n+#if EFSYS_OPT_NAMES\n+/* START MKCONFIG GENERATED EfxEventQueueStatNamesBlock c0f3bc5083b40532 */\n+static const char * const __efx_ev_qstat_name[] = {\n+\t\"all\",\n+\t\"rx\",\n+\t\"rx_ok\",\n+\t\"rx_frm_trunc\",\n+\t\"rx_tobe_disc\",\n+\t\"rx_pause_frm_err\",\n+\t\"rx_buf_owner_id_err\",\n+\t\"rx_ipv4_hdr_chksum_err\",\n+\t\"rx_tcp_udp_chksum_err\",\n+\t\"rx_eth_crc_err\",\n+\t\"rx_ip_frag_err\",\n+\t\"rx_mcast_pkt\",\n+\t\"rx_mcast_hash_match\",\n+\t\"rx_tcp_ipv4\",\n+\t\"rx_tcp_ipv6\",\n+\t\"rx_udp_ipv4\",\n+\t\"rx_udp_ipv6\",\n+\t\"rx_other_ipv4\",\n+\t\"rx_other_ipv6\",\n+\t\"rx_non_ip\",\n+\t\"rx_batch\",\n+\t\"tx\",\n+\t\"tx_wq_ff_full\",\n+\t\"tx_pkt_err\",\n+\t\"tx_pkt_too_big\",\n+\t\"tx_unexpected\",\n+\t\"global\",\n+\t\"global_mnt\",\n+\t\"driver\",\n+\t\"driver_srm_upd_done\",\n+\t\"driver_tx_descq_fls_done\",\n+\t\"driver_rx_descq_fls_done\",\n+\t\"driver_rx_descq_fls_failed\",\n+\t\"driver_rx_dsc_error\",\n+\t\"driver_tx_dsc_error\",\n+\t\"drv_gen\",\n+\t\"mcdi_response\",\n+};\n+/* END MKCONFIG GENERATED EfxEventQueueStatNamesBlock */\n+\n+\t\tconst char *\n+efx_ev_qstat_name(\n+\t__in\tefx_nic_t *enp,\n+\t__in\tunsigned int id)\n+{\n+\tEFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);\n+\tEFSYS_ASSERT3U(id, <, EV_NQSTATS);\n+\n+\treturn (__efx_ev_qstat_name[id]);\n+}\n+#endif\t/* EFSYS_OPT_NAMES */\n+#endif\t/* EFSYS_OPT_QSTATS */\n+\n #if EFSYS_OPT_SIENA\n \n+#if EFSYS_OPT_QSTATS\n+static\t\t\t\t\tvoid\n+siena_ev_qstats_update(\n+\t__in\t\t\t\tefx_evq_t *eep,\n+\t__inout_ecount(EV_NQSTATS)\tefsys_stat_t *stat)\n+{\n+\tunsigned int id;\n+\n+\tfor (id = 0; id < EV_NQSTATS; id++) {\n+\t\tefsys_stat_t *essp = &stat[id];\n+\n+\t\tEFSYS_STAT_INCR(essp, eep->ee_stat[id]);\n+\t\teep->ee_stat[id] = 0;\n+\t}\n+}\n+#endif\t/* EFSYS_OPT_QSTATS */\n+\n static\t\tvoid\n siena_ev_qdestroy(\n \t__in\tefx_evq_t *eep)\ndiff --git a/drivers/net/sfc/efx/base/efx_impl.h b/drivers/net/sfc/efx/base/efx_impl.h\nindex a6853b3..f776656 100644\n--- a/drivers/net/sfc/efx/base/efx_impl.h\n+++ b/drivers/net/sfc/efx/base/efx_impl.h\n@@ -97,6 +97,9 @@ typedef struct efx_ev_ops_s {\n \tefx_rc_t\t(*eevo_qprime)(efx_evq_t *, unsigned int);\n \tvoid\t\t(*eevo_qpost)(efx_evq_t *, uint16_t);\n \tefx_rc_t\t(*eevo_qmoderate)(efx_evq_t *, unsigned int);\n+#if EFSYS_OPT_QSTATS\n+\tvoid\t\t(*eevo_qstats_update)(efx_evq_t *, efsys_stat_t *);\n+#endif\n } efx_ev_ops_t;\n \n typedef struct efx_tx_ops_s {\n@@ -136,6 +139,10 @@ typedef struct efx_tx_ops_s {\n \t\t\t\t\t\tefx_desc_t *, int);\n \tvoid\t\t(*etxo_qdesc_vlantci_create)(efx_txq_t *, uint16_t,\n \t\t\t\t\t\tefx_desc_t *);\n+#if EFSYS_OPT_QSTATS\n+\tvoid\t\t(*etxo_qstats_update)(efx_txq_t *,\n+\t\t\t\t\t      efsys_stat_t *);\n+#endif\n } efx_tx_ops_t;\n \n typedef struct efx_rx_ops_s {\n@@ -479,6 +486,9 @@ struct efx_evq_s {\n \tunsigned int\t\t\tee_index;\n \tunsigned int\t\t\tee_mask;\n \tefsys_mem_t\t\t\t*ee_esmp;\n+#if EFSYS_OPT_QSTATS\n+\tuint32_t\t\t\tee_stat[EV_NQSTATS];\n+#endif\t/* EFSYS_OPT_QSTATS */\n \n \tefx_ev_handler_t\t\tee_rx;\n \tefx_ev_handler_t\t\tee_tx;\n@@ -523,6 +533,9 @@ struct efx_txq_s {\n \tuint32_t\t\t\tet_pio_offset;\n \tsize_t\t\t\t\tet_pio_size;\n #endif\n+#if EFSYS_OPT_QSTATS\n+\tuint32_t\t\t\tet_stat[TX_NQSTATS];\n+#endif\t/* EFSYS_OPT_QSTATS */\n };\n \n #define\tEFX_TXQ_MAGIC\t0x05092005\ndiff --git a/drivers/net/sfc/efx/base/efx_tx.c b/drivers/net/sfc/efx/base/efx_tx.c\nindex 16834af..0d47390 100644\n--- a/drivers/net/sfc/efx/base/efx_tx.c\n+++ b/drivers/net/sfc/efx/base/efx_tx.c\n@@ -31,7 +31,15 @@\n #include \"efx.h\"\n #include \"efx_impl.h\"\n \n+#if EFSYS_OPT_QSTATS\n+#define\tEFX_TX_QSTAT_INCR(_etp, _stat)\t\t\t\t\t\\\n+\tdo {\t\t\t\t\t\t\t\t\\\n+\t\t(_etp)->et_stat[_stat]++;\t\t\t\t\\\n+\t_NOTE(CONSTANTCONDITION)\t\t\t\t\t\\\n+\t} while (B_FALSE)\n+#else\n #define\tEFX_TX_QSTAT_INCR(_etp, _stat)\n+#endif\n \n #if EFSYS_OPT_SIENA\n \n@@ -103,6 +111,13 @@ siena_tx_qdesc_dma_create(\n \t__in\tboolean_t eop,\n \t__out\tefx_desc_t *edp);\n \n+#if EFSYS_OPT_QSTATS\n+static\t\t\tvoid\n+siena_tx_qstats_update(\n+\t__in\t\t\t\tefx_txq_t *etp,\n+\t__inout_ecount(TX_NQSTATS)\tefsys_stat_t *stat);\n+#endif\n+\n #endif /* EFSYS_OPT_SIENA */\n \n \n@@ -126,6 +141,9 @@ static const efx_tx_ops_t\t__efx_tx_siena_ops = {\n \tNULL,\t\t\t\t\t/* etxo_qdesc_tso_create */\n \tNULL,\t\t\t\t\t/* etxo_qdesc_tso2_create */\n \tNULL,\t\t\t\t\t/* etxo_qdesc_vlantci_create */\n+#if EFSYS_OPT_QSTATS\n+\tsiena_tx_qstats_update,\t\t\t/* etxo_qstats_update */\n+#endif\n };\n #endif /* EFSYS_OPT_SIENA */\n \n@@ -149,6 +167,9 @@ static const efx_tx_ops_t\t__efx_tx_hunt_ops = {\n \tef10_tx_qdesc_tso_create,\t\t/* etxo_qdesc_tso_create */\n \tef10_tx_qdesc_tso2_create,\t\t/* etxo_qdesc_tso2_create */\n \tef10_tx_qdesc_vlantci_create,\t\t/* etxo_qdesc_vlantci_create */\n+#if EFSYS_OPT_QSTATS\n+\tef10_tx_qstats_update,\t\t\t/* etxo_qstats_update */\n+#endif\n };\n #endif /* EFSYS_OPT_HUNTINGTON */\n \n@@ -172,6 +193,9 @@ static const efx_tx_ops_t\t__efx_tx_medford_ops = {\n \tNULL,\t\t\t\t\t/* etxo_qdesc_tso_create */\n \tef10_tx_qdesc_tso2_create,\t\t/* etxo_qdesc_tso2_create */\n \tef10_tx_qdesc_vlantci_create,\t\t/* etxo_qdesc_vlantci_create */\n+#if EFSYS_OPT_QSTATS\n+\tef10_tx_qstats_update,\t\t\t/* etxo_qstats_update */\n+#endif\n };\n #endif /* EFSYS_OPT_MEDFORD */\n \n@@ -619,6 +643,22 @@ efx_tx_qdesc_vlantci_create(\n }\n \n \n+#if EFSYS_OPT_QSTATS\n+\t\t\tvoid\n+efx_tx_qstats_update(\n+\t__in\t\t\t\tefx_txq_t *etp,\n+\t__inout_ecount(TX_NQSTATS)\tefsys_stat_t *stat)\n+{\n+\tefx_nic_t *enp = etp->et_enp;\n+\tconst efx_tx_ops_t *etxop = enp->en_etxop;\n+\n+\tEFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);\n+\n+\tetxop->etxo_qstats_update(etp, stat);\n+}\n+#endif\n+\n+\n #if EFSYS_OPT_SIENA\n \n static\t__checkReturn\tefx_rc_t\n@@ -983,8 +1023,48 @@ siena_tx_qdesc_dma_create(\n \n #endif /* EFSYS_OPT_SIENA */\n \n+#if EFSYS_OPT_QSTATS\n+#if EFSYS_OPT_NAMES\n+/* START MKCONFIG GENERATED EfxTransmitQueueStatNamesBlock 2866874ecd7a363b */\n+static const char * const __efx_tx_qstat_name[] = {\n+\t\"post\",\n+\t\"post_pio\",\n+};\n+/* END MKCONFIG GENERATED EfxTransmitQueueStatNamesBlock */\n+\n+\t\tconst char *\n+efx_tx_qstat_name(\n+\t__in\tefx_nic_t *enp,\n+\t__in\tunsigned int id)\n+{\n+\t_NOTE(ARGUNUSED(enp))\n+\tEFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);\n+\tEFSYS_ASSERT3U(id, <, TX_NQSTATS);\n+\n+\treturn (__efx_tx_qstat_name[id]);\n+}\n+#endif\t/* EFSYS_OPT_NAMES */\n+#endif /* EFSYS_OPT_QSTATS */\n+\n #if EFSYS_OPT_SIENA\n \n+#if EFSYS_OPT_QSTATS\n+static\t\t\t\t\tvoid\n+siena_tx_qstats_update(\n+\t__in\t\t\t\tefx_txq_t *etp,\n+\t__inout_ecount(TX_NQSTATS)\tefsys_stat_t *stat)\n+{\n+\tunsigned int id;\n+\n+\tfor (id = 0; id < TX_NQSTATS; id++) {\n+\t\tefsys_stat_t *essp = &stat[id];\n+\n+\t\tEFSYS_STAT_INCR(essp, etp->et_stat[id]);\n+\t\tetp->et_stat[id] = 0;\n+\t}\n+}\n+#endif\t/* EFSYS_OPT_QSTATS */\n+\n static\t\tvoid\n siena_tx_qdestroy(\n \t__in\tefx_txq_t *etp)\n",
    "prefixes": [
        "dpdk-dev",
        "14/56"
    ]
}