get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8520,
    "url": "https://patches.dpdk.org/api/patches/8520/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446459547-1754-7-git-send-email-harry.van.haaren@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": "<1446459547-1754-7-git-send-email-harry.van.haaren@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446459547-1754-7-git-send-email-harry.van.haaren@intel.com",
    "date": "2015-11-02T10:19:03",
    "name": "[dpdk-dev,v5,06/10] ixgbe: add extended statistic strings",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "fbcd2dfa8e5e5a1be57e941b96996f457ec755f9",
    "submitter": {
        "id": 317,
        "url": "https://patches.dpdk.org/api/people/317/?format=api",
        "name": "Van Haaren, Harry",
        "email": "harry.van.haaren@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1446459547-1754-7-git-send-email-harry.van.haaren@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8520/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8520/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 900248E8A;\n\tMon,  2 Nov 2015 11:19:27 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 99A748E9D\n\tfor <dev@dpdk.org>; Mon,  2 Nov 2015 11:19:25 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP; 02 Nov 2015 02:19:25 -0800",
            "from sie-lab-212-222.ir.intel.com (HELO\n\tsilpixa00366884.ir.intel.com) ([10.237.212.222])\n\tby orsmga002.jf.intel.com with ESMTP; 02 Nov 2015 02:19:22 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,234,1444719600\"; d=\"scan'208\";a=\"840505429\"",
        "From": "Harry van Haaren <harry.van.haaren@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon,  2 Nov 2015 10:19:03 +0000",
        "Message-Id": "<1446459547-1754-7-git-send-email-harry.van.haaren@intel.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1446459547-1754-1-git-send-email-harry.van.haaren@intel.com>",
        "References": "<1446204998-17151-2-git-send-email-harry.van.haaren@intel.com>\n\t<1446459547-1754-1-git-send-email-harry.van.haaren@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v5 06/10] ixgbe: add extended statistic strings",
        "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": "Added and updated statistic strings as used by xstats_get(),\nexposed extended queue statistics.\n\nSigned-off-by: Harry van Haaren <harry.van.haaren@intel.com>\n---\n drivers/net/ixgbe/ixgbe_ethdev.c | 203 +++++++++++++++++++++++++++++++++------\n 1 file changed, 172 insertions(+), 31 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex 4373661..c657955 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -510,33 +510,95 @@ struct rte_ixgbe_xstats_name_off {\n };\n \n static const struct rte_ixgbe_xstats_name_off rte_ixgbe_stats_strings[] = {\n-\t{\"rx_illegal_byte_err\", offsetof(struct ixgbe_hw_stats, errbc)},\n-\t{\"rx_len_err\", offsetof(struct ixgbe_hw_stats, rlec)},\n-\t{\"rx_undersize_count\", offsetof(struct ixgbe_hw_stats, ruc)},\n-\t{\"rx_oversize_count\", offsetof(struct ixgbe_hw_stats, roc)},\n-\t{\"rx_fragment_count\", offsetof(struct ixgbe_hw_stats, rfc)},\n-\t{\"rx_jabber_count\", offsetof(struct ixgbe_hw_stats, rjc)},\n-\t{\"l3_l4_xsum_error\", offsetof(struct ixgbe_hw_stats, xec)},\n-\t{\"mac_local_fault\", offsetof(struct ixgbe_hw_stats, mlfc)},\n-\t{\"mac_remote_fault\", offsetof(struct ixgbe_hw_stats, mrfc)},\n-\t{\"mac_short_pkt_discard\", offsetof(struct ixgbe_hw_stats, mspdc)},\n-\t{\"fccrc_error\", offsetof(struct ixgbe_hw_stats, fccrc)},\n-\t{\"fcoe_drop\", offsetof(struct ixgbe_hw_stats, fcoerpdc)},\n-\t{\"fc_last_error\", offsetof(struct ixgbe_hw_stats, fclast)},\n-\t{\"rx_broadcast_packets\", offsetof(struct ixgbe_hw_stats, bprc)},\n-\t{\"rx_phy_multicast_packets\", offsetof(struct ixgbe_hw_stats, mprc)},\n-\t{\"mgmt_pkts_dropped\", offsetof(struct ixgbe_hw_stats, mngpdc)},\n \t{\"rx_crc_errors\", offsetof(struct ixgbe_hw_stats, crcerrs)},\n-\t{\"fdir_match\", offsetof(struct ixgbe_hw_stats, fdirmatch)},\n-\t{\"fdir_miss\", offsetof(struct ixgbe_hw_stats, fdirmiss)},\n-\t{\"tx_flow_control_xon\", offsetof(struct ixgbe_hw_stats, lxontxc)},\n-\t{\"rx_flow_control_xon\", offsetof(struct ixgbe_hw_stats, lxonrxc)},\n-\t{\"tx_flow_control_xoff\", offsetof(struct ixgbe_hw_stats, lxofftxc)},\n-\t{\"rx_flow_control_xoff\", offsetof(struct ixgbe_hw_stats, lxoffrxc)},\n+\t{\"rx_illegal_byte_errors\", offsetof(struct ixgbe_hw_stats, illerrc)},\n+\t{\"rx_error_bytes\", offsetof(struct ixgbe_hw_stats, errbc)},\n+\t{\"mac_local_errors\", offsetof(struct ixgbe_hw_stats, mlfc)},\n+\t{\"mac_remote_errors\", offsetof(struct ixgbe_hw_stats, mrfc)},\n+\t{\"rx_length_errors\", offsetof(struct ixgbe_hw_stats, rlec)},\n+\t{\"tx_xon_packets\", offsetof(struct ixgbe_hw_stats, lxontxc)},\n+\t{\"rx_xon_packets\", offsetof(struct ixgbe_hw_stats, lxonrxc)},\n+\t{\"tx_xoff_packets\", offsetof(struct ixgbe_hw_stats, lxofftxc)},\n+\t{\"rx_xoff_packets\", offsetof(struct ixgbe_hw_stats, lxoffrxc)},\n+\t{\"rx_size_64_packets\", offsetof(struct ixgbe_hw_stats, prc64)},\n+\t{\"rx_size_65_to_127_packets\", offsetof(struct ixgbe_hw_stats, prc127)},\n+\t{\"rx_size_128_to_255_packets\", offsetof(struct ixgbe_hw_stats, prc255)},\n+\t{\"rx_size_256_to_511_packets\", offsetof(struct ixgbe_hw_stats, prc511)},\n+\t{\"rx_size_512_to_1023_packets\", offsetof(struct ixgbe_hw_stats,\n+\t\tprc1023)},\n+\t{\"rx_size_1024_to_max_packets\", offsetof(struct ixgbe_hw_stats,\n+\t\tprc1522)},\n+\t{\"rx_broadcast_packets\", offsetof(struct ixgbe_hw_stats, bprc)},\n+\t{\"rx_multicast_packets\", offsetof(struct ixgbe_hw_stats, mprc)},\n+\t{\"rx_fragment_errors\", offsetof(struct ixgbe_hw_stats, rfc)},\n+\t{\"rx_undersize_errors\", offsetof(struct ixgbe_hw_stats, ruc)},\n+\t{\"rx_oversize_errors\", offsetof(struct ixgbe_hw_stats, roc)},\n+\t{\"rx_jabber_errors\", offsetof(struct ixgbe_hw_stats, rjc)},\n+\t{\"rx_managment_packets\", offsetof(struct ixgbe_hw_stats, mngprc)},\n+\t{\"rx_managment_dropped\", offsetof(struct ixgbe_hw_stats, mngpdc)},\n+\t{\"tx_managment_packets\", offsetof(struct ixgbe_hw_stats, mngptc)},\n+\t{\"rx_total_packets\", offsetof(struct ixgbe_hw_stats, tpr)},\n+\t{\"rx_total_bytes\", offsetof(struct ixgbe_hw_stats, tor)},\n+\t{\"tx_total_packets\", offsetof(struct ixgbe_hw_stats, tpt)},\n+\t{\"tx_size_64_packets\", offsetof(struct ixgbe_hw_stats, ptc64)},\n+\t{\"tx_size_65_to_127_packets\", offsetof(struct ixgbe_hw_stats, ptc127)},\n+\t{\"tx_size_128_to_255_packets\", offsetof(struct ixgbe_hw_stats, ptc255)},\n+\t{\"tx_size_256_to_511_packets\", offsetof(struct ixgbe_hw_stats, ptc511)},\n+\t{\"tx_size_512_to_1023_packets\", offsetof(struct ixgbe_hw_stats,\n+\t\tptc1023)},\n+\t{\"tx_size_1024_to_max_packets\", offsetof(struct ixgbe_hw_stats,\n+\t\tptc1522)},\n+\t{\"tx_multicast_packets\", offsetof(struct ixgbe_hw_stats, mptc)},\n+\t{\"tx_broadcast_packets\", offsetof(struct ixgbe_hw_stats, bptc)},\n+\t{\"rx_mac_short_packet_dropped\", offsetof(struct ixgbe_hw_stats, mspdc)},\n+\t{\"rx_l3_l4_xsum_error\", offsetof(struct ixgbe_hw_stats, xec)},\n+\n+\t{\"flow_director_added_filters\", offsetof(struct ixgbe_hw_stats,\n+\t\tfdirustat_add)},\n+\t{\"flow_director_removed_filters\", offsetof(struct ixgbe_hw_stats,\n+\t\tfdirustat_remove)},\n+\t{\"flow_director_filter_add_errors\", offsetof(struct ixgbe_hw_stats,\n+\t\tfdirfstat_fadd)},\n+\t{\"flow_director_filter_remove_errors\", offsetof(struct ixgbe_hw_stats,\n+\t\tfdirfstat_fremove)},\n+\t{\"flow_director_matched_filters\", offsetof(struct ixgbe_hw_stats,\n+\t\tfdirmatch)},\n+\t{\"flow_director_missed_filters\", offsetof(struct ixgbe_hw_stats,\n+\t\tfdirmiss)},\n+\n+\t{\"rx_fcoe_crc_errors\", offsetof(struct ixgbe_hw_stats, fccrc)},\n+\t{\"rx_fcoe_dropped\", offsetof(struct ixgbe_hw_stats, fcoerpdc)},\n+\t{\"rx_fcoe_mbuf_allocation_errors\", offsetof(struct ixgbe_hw_stats,\n+\t\tfclast)},\n+\t{\"rx_fcoe_packets\", offsetof(struct ixgbe_hw_stats, fcoeprc)},\n+\t{\"tx_fcoe_packets\", offsetof(struct ixgbe_hw_stats, fcoeptc)},\n+\t{\"rx_fcoe_bytes\", offsetof(struct ixgbe_hw_stats, fcoedwrc)},\n+\t{\"tx_fcoe_bytes\", offsetof(struct ixgbe_hw_stats, fcoedwtc)},\n+\t{\"rx_fcoe_no_direct_data_placement\", offsetof(struct ixgbe_hw_stats,\n+\t\tfcoe_noddp)},\n+\t{\"rx_fcoe_no_direct_data_placement_ext_buff\",\n+\t\toffsetof(struct ixgbe_hw_stats, fcoe_noddp_ext_buff)},\n+\n+\t{\"tx_flow_control_xon_packets\", offsetof(struct ixgbe_hw_stats,\n+\t\tlxontxc)},\n+\t{\"rx_flow_control_xon_packets\", offsetof(struct ixgbe_hw_stats,\n+\t\tlxonrxc)},\n+\t{\"tx_flow_control_xoff_packets\", offsetof(struct ixgbe_hw_stats,\n+\t\tlxofftxc)},\n+\t{\"rx_flow_control_xoff_packets\", offsetof(struct ixgbe_hw_stats,\n+\t\tlxoffrxc)},\n+\t{\"rx_total_missed_packets\", offsetof(struct ixgbe_hw_stats, mpctotal)},\n };\n \n-#define IXGBE_NB_XSTATS (sizeof(rte_ixgbe_stats_strings) /\t\\\n-\t\tsizeof(rte_ixgbe_stats_strings[0]))\n+#define IXGBE_NB_HW_STATS (sizeof(rte_ixgbe_stats_strings) / \\\n+\t\t\t   sizeof(rte_ixgbe_stats_strings[0]))\n+\n+/* Per-queue statistics */\n+#define IXBGE_NB_8_PER_Q_STATS (8 * 7)\n+#define IXBGE_NB_16_PER_Q_STATS (16 * 5)\n+#define IXGBE_NB_Q_STATS (IXBGE_NB_8_PER_Q_STATS + IXBGE_NB_16_PER_Q_STATS)\n+\n+#define IXGBE_NB_XSTATS (IXGBE_NB_HW_STATS + IXGBE_NB_Q_STATS)\n \n /**\n  * Atomically reads the link status information from global\n@@ -2257,7 +2319,7 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstats *xstats,\n \ttotal_qprdc = 0;\n \n \tixgbe_read_stats_registers(hw, hw_stats, &total_missed_rx, &total_qbrc,\n-\t\t\t\t\t\t\t   &total_qprc, &total_qprdc);\n+\t\t\t\t   &total_qprc, &total_qprdc);\n \n \t/* If this is a reset xstats is NULL, and we have cleared the\n \t * registers by reading them.\n@@ -2265,12 +2327,91 @@ ixgbe_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstats *xstats,\n \tif (!xstats)\n \t\treturn 0;\n \n-\t/* Extended stats */\n-\tfor (i = 0; i < IXGBE_NB_XSTATS; i++) {\n-\t\tsnprintf(xstats[i].name, sizeof(xstats[i].name),\n-\t\t\t\t\"%s\", rte_ixgbe_stats_strings[i].name);\n-\t\txstats[i].value = *(uint64_t *)(((char *)hw_stats) +\n-\t\t\t\t\t\t\trte_ixgbe_stats_strings[i].offset);\n+\t/* Extended stats from ixgbe_hw_stats */\n+\tcount = 0;\n+\tfor (i = 0; i < IXGBE_NB_HW_STATS; i++) {\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name), \"%s\",\n+\t\t\t rte_ixgbe_stats_strings[i].name);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\trte_ixgbe_stats_strings[i].offset);\n+\t\tcount++;\n+\t}\n+\n+\t/* Per-Q stats, with 8 queues available */\n+\tfor (i = 0; i < 8; i++) {\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"rx_q%u_mbuf_allocation_errors\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, rnbc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"rx_q%u_missed_packets\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, mpc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"rx_q%u_xon_priority_packets\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, pxonrxc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"tx_q%u_xon_priority_packets\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, pxontxc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"rx_q%u_xoff_priority_packets\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, pxoffrxc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"tx_q%u_xoff_priority_packets\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, pxofftxc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"xx_q%u_xon_to_xoff_priority_packets\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, pxon2offc[i]));\n+\t\tcount++;\n+\t}\n+\n+\tfor (i = 0; i < 16; i++) {\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"rx_q%u_packets\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, qprc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"rx_q%u_bytes\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, qbrc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"tx_q%u_packets\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, qptc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"tx_q%u_bytes\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, qbtc[i]));\n+\t\tcount++;\n+\n+\t\tsnprintf(xstats[count].name, sizeof(xstats[count].name),\n+\t\t\t \"rx_q%u_dropped\", i);\n+\t\txstats[count].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\toffsetof(struct ixgbe_hw_stats, qprdc[i]));\n+\t\tcount++;\n \t}\n \n \treturn count;\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "06/10"
    ]
}