get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 21283,
    "url": "https://patches.dpdk.org/api/patches/21283/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1488545672-5208-3-git-send-email-kubax.kozak@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": "<1488545672-5208-3-git-send-email-kubax.kozak@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1488545672-5208-3-git-send-email-kubax.kozak@intel.com",
    "date": "2017-03-03T12:54:30",
    "name": "[dpdk-dev,2/4] net/e1000: add grouping of xstats for e1000 driver",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5cc74ae46355f9554eca0e21bba46cdf80b83e7c",
    "submitter": {
        "id": 666,
        "url": "https://patches.dpdk.org/api/people/666/?format=api",
        "name": "Kuba Kozak",
        "email": "kubax.kozak@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1488545672-5208-3-git-send-email-kubax.kozak@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/21283/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/21283/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 2EB5E2A5E;\n\tFri,  3 Mar 2017 12:12:01 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id D0B4D952\n\tfor <dev@dpdk.org>; Fri,  3 Mar 2017 12:11:58 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Mar 2017 03:11:57 -0800",
            "from gklab-246-019.igk.intel.com (HELO intel.com) ([10.217.246.19])\n\tby fmsmga001.fm.intel.com with SMTP; 03 Mar 2017 03:11:55 -0800",
            "by intel.com (sSMTP sendmail emulation);\n\tFri, 03 Mar 2017 14:07:57 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.35,236,1484035200\"; d=\"scan'208\";\n\ta=\"1117973063\"",
        "From": "Kuba Kozak <kubax.kozak@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Jacek Piasecki <jacekx.piasecki@intel.com>,\n\tKuba Kozak <kubax.kozak@intel.com>",
        "Date": "Fri,  3 Mar 2017 13:54:30 +0100",
        "Message-Id": "<1488545672-5208-3-git-send-email-kubax.kozak@intel.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1488545672-5208-1-git-send-email-kubax.kozak@intel.com>",
        "References": "<1488545672-5208-1-git-send-email-kubax.kozak@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 2/4] net/e1000: add grouping of xstats for e1000\n\tdriver",
        "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": "From: Jacek Piasecki <jacekx.piasecki@intel.com>\n\nThis patch extends the 'rte_igb_xstats_name_off' structure\nwith additional field 'group_mask'. For each xstats there is now\nspecified group (e.g. TX_GROUP), one xstatistic can be in several groups.\nTo implement new functionality of retriving xstats by group\non driver level, there are two functions added:\neth_igb_xstats_get_by_group() and eth_igb_xstats_get_names_by_group()\n\nSigned-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>\nSigned-off-by: Kuba Kozak <kubax.kozak@intel.com>\n---\n drivers/net/e1000/igb_ethdev.c | 261 +++++++++++++++++++++++++++++++----------\n 1 file changed, 199 insertions(+), 62 deletions(-)",
    "diff": "diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c\nindex a112b38..28eced6 100644\n--- a/drivers/net/e1000/igb_ethdev.c\n+++ b/drivers/net/e1000/igb_ethdev.c\n@@ -115,9 +115,18 @@ static void eth_igb_stats_get(struct rte_eth_dev *dev,\n \t\t\t\tstruct rte_eth_stats *rte_stats);\n static int eth_igb_xstats_get(struct rte_eth_dev *dev,\n \t\t\t      struct rte_eth_xstat *xstats, unsigned n);\n+static\n+int eth_igb_xstats_get_by_group(struct rte_eth_dev *dev,\n+\t\tstruct rte_eth_xstat *xstats,\n+\t\tunsigned int n, uint64_t group_mask);\n static int eth_igb_xstats_get_names(struct rte_eth_dev *dev,\n \t\t\t\t    struct rte_eth_xstat_name *xstats_names,\n \t\t\t\t    unsigned limit);\n+static int\n+eth_igb_xstats_get_names_by_group(__rte_unused struct rte_eth_dev *dev,\n+\tstruct rte_eth_xstat_name *xstats_names,\n+\t__rte_unused unsigned int limit,\n+\tuint64_t group_mask);\n static void eth_igb_stats_reset(struct rte_eth_dev *dev);\n static void eth_igb_xstats_reset(struct rte_eth_dev *dev);\n static int eth_igb_fw_version_get(struct rte_eth_dev *dev,\n@@ -390,7 +399,9 @@ static void eth_igbvf_interrupt_handler(struct rte_intr_handle *handle,\n \t.link_update          = eth_igb_link_update,\n \t.stats_get            = eth_igb_stats_get,\n \t.xstats_get           = eth_igb_xstats_get,\n+\t.xstats_get_by_group  = eth_igb_xstats_get_by_group,\n \t.xstats_get_names     = eth_igb_xstats_get_names,\n+\t.xstats_get_names_by_group = eth_igb_xstats_get_names_by_group,\n \t.stats_reset          = eth_igb_stats_reset,\n \t.xstats_reset         = eth_igb_xstats_reset,\n \t.fw_version_get       = eth_igb_fw_version_get,\n@@ -473,78 +484,128 @@ static void eth_igbvf_interrupt_handler(struct rte_intr_handle *handle,\n struct rte_igb_xstats_name_off {\n \tchar name[RTE_ETH_XSTATS_NAME_SIZE];\n \tunsigned offset;\n+\tuint64_t group_mask;\n };\n \n static const struct rte_igb_xstats_name_off rte_igb_stats_strings[] = {\n-\t{\"rx_crc_errors\", offsetof(struct e1000_hw_stats, crcerrs)},\n-\t{\"rx_align_errors\", offsetof(struct e1000_hw_stats, algnerrc)},\n-\t{\"rx_symbol_errors\", offsetof(struct e1000_hw_stats, symerrs)},\n-\t{\"rx_missed_packets\", offsetof(struct e1000_hw_stats, mpc)},\n-\t{\"tx_single_collision_packets\", offsetof(struct e1000_hw_stats, scc)},\n-\t{\"tx_multiple_collision_packets\", offsetof(struct e1000_hw_stats, mcc)},\n+\t{\"rx_crc_errors\", offsetof(struct e1000_hw_stats, crcerrs),\n+\t\t\tRX_GROUP | ERR_GROUP},\n+\t{\"rx_align_errors\", offsetof(struct e1000_hw_stats, algnerrc),\n+\t\t\tRX_GROUP | ERR_GROUP},\n+\t{\"rx_symbol_errors\", offsetof(struct e1000_hw_stats, symerrs),\n+\t\t\tRX_GROUP | ERR_GROUP},\n+\t{\"rx_missed_packets\", offsetof(struct e1000_hw_stats, mpc),\n+\t\t\tRX_GROUP},\n+\t{\"tx_single_collision_packets\", offsetof(struct e1000_hw_stats, scc),\n+\t\t\tTX_GROUP},\n+\t{\"tx_multiple_collision_packets\", offsetof(struct e1000_hw_stats, mcc),\n+\t\t\tTX_GROUP},\n \t{\"tx_excessive_collision_packets\", offsetof(struct e1000_hw_stats,\n-\t\tecol)},\n-\t{\"tx_late_collisions\", offsetof(struct e1000_hw_stats, latecol)},\n-\t{\"tx_total_collisions\", offsetof(struct e1000_hw_stats, colc)},\n-\t{\"tx_deferred_packets\", offsetof(struct e1000_hw_stats, dc)},\n-\t{\"tx_no_carrier_sense_packets\", offsetof(struct e1000_hw_stats, tncrs)},\n-\t{\"rx_carrier_ext_errors\", offsetof(struct e1000_hw_stats, cexterr)},\n-\t{\"rx_length_errors\", offsetof(struct e1000_hw_stats, rlec)},\n-\t{\"rx_xon_packets\", offsetof(struct e1000_hw_stats, xonrxc)},\n-\t{\"tx_xon_packets\", offsetof(struct e1000_hw_stats, xontxc)},\n-\t{\"rx_xoff_packets\", offsetof(struct e1000_hw_stats, xoffrxc)},\n-\t{\"tx_xoff_packets\", offsetof(struct e1000_hw_stats, xofftxc)},\n+\t\tecol), TX_GROUP},\n+\t{\"tx_late_collisions\", offsetof(struct e1000_hw_stats, latecol),\n+\t\t\tTX_GROUP},\n+\t{\"tx_total_collisions\", offsetof(struct e1000_hw_stats, colc),\n+\t\t\tTX_GROUP},\n+\t{\"tx_deferred_packets\", offsetof(struct e1000_hw_stats, dc),\n+\t\t\tTX_GROUP},\n+\t{\"tx_no_carrier_sense_packets\", offsetof(struct e1000_hw_stats, tncrs),\n+\t\t\tTX_GROUP},\n+\t{\"rx_carrier_ext_errors\", offsetof(struct e1000_hw_stats, cexterr),\n+\t\t\tRX_GROUP | ERR_GROUP},\n+\t{\"rx_length_errors\", offsetof(struct e1000_hw_stats, rlec),\n+\t\t\tRX_GROUP | ERR_GROUP},\n+\t{\"rx_xon_packets\", offsetof(struct e1000_hw_stats, xonrxc),\n+\t\t\tRX_GROUP},\n+\t{\"tx_xon_packets\", offsetof(struct e1000_hw_stats, xontxc),\n+\t\t\tTX_GROUP},\n+\t{\"rx_xoff_packets\", offsetof(struct e1000_hw_stats, xoffrxc),\n+\t\t\tRX_GROUP},\n+\t{\"tx_xoff_packets\", offsetof(struct e1000_hw_stats, xofftxc),\n+\t\t\tTX_GROUP},\n \t{\"rx_flow_control_unsupported_packets\", offsetof(struct e1000_hw_stats,\n-\t\tfcruc)},\n-\t{\"rx_size_64_packets\", offsetof(struct e1000_hw_stats, prc64)},\n-\t{\"rx_size_65_to_127_packets\", offsetof(struct e1000_hw_stats, prc127)},\n-\t{\"rx_size_128_to_255_packets\", offsetof(struct e1000_hw_stats, prc255)},\n-\t{\"rx_size_256_to_511_packets\", offsetof(struct e1000_hw_stats, prc511)},\n+\t\tfcruc), RX_GROUP},\n+\t{\"rx_size_64_packets\", offsetof(struct e1000_hw_stats, prc64),\n+\t\t\tRX_GROUP},\n+\t{\"rx_size_65_to_127_packets\", offsetof(struct e1000_hw_stats, prc127),\n+\t\t\tRX_GROUP},\n+\t{\"rx_size_128_to_255_packets\", offsetof(struct e1000_hw_stats, prc255),\n+\t\t\tRX_GROUP},\n+\t{\"rx_size_256_to_511_packets\", offsetof(struct e1000_hw_stats, prc511),\n+\t\t\tRX_GROUP},\n \t{\"rx_size_512_to_1023_packets\", offsetof(struct e1000_hw_stats,\n-\t\tprc1023)},\n+\t\tprc1023), RX_GROUP},\n \t{\"rx_size_1024_to_max_packets\", offsetof(struct e1000_hw_stats,\n-\t\tprc1522)},\n-\t{\"rx_broadcast_packets\", offsetof(struct e1000_hw_stats, bprc)},\n-\t{\"rx_multicast_packets\", offsetof(struct e1000_hw_stats, mprc)},\n-\t{\"rx_undersize_errors\", offsetof(struct e1000_hw_stats, ruc)},\n-\t{\"rx_fragment_errors\", offsetof(struct e1000_hw_stats, rfc)},\n-\t{\"rx_oversize_errors\", offsetof(struct e1000_hw_stats, roc)},\n-\t{\"rx_jabber_errors\", offsetof(struct e1000_hw_stats, rjc)},\n-\t{\"rx_management_packets\", offsetof(struct e1000_hw_stats, mgprc)},\n-\t{\"rx_management_dropped\", offsetof(struct e1000_hw_stats, mgpdc)},\n-\t{\"tx_management_packets\", offsetof(struct e1000_hw_stats, mgptc)},\n-\t{\"rx_total_packets\", offsetof(struct e1000_hw_stats, tpr)},\n-\t{\"tx_total_packets\", offsetof(struct e1000_hw_stats, tpt)},\n-\t{\"rx_total_bytes\", offsetof(struct e1000_hw_stats, tor)},\n-\t{\"tx_total_bytes\", offsetof(struct e1000_hw_stats, tot)},\n-\t{\"tx_size_64_packets\", offsetof(struct e1000_hw_stats, ptc64)},\n-\t{\"tx_size_65_to_127_packets\", offsetof(struct e1000_hw_stats, ptc127)},\n-\t{\"tx_size_128_to_255_packets\", offsetof(struct e1000_hw_stats, ptc255)},\n-\t{\"tx_size_256_to_511_packets\", offsetof(struct e1000_hw_stats, ptc511)},\n+\t\tprc1522), RX_GROUP},\n+\t{\"rx_broadcast_packets\", offsetof(struct e1000_hw_stats, bprc),\n+\t\t\tRX_GROUP},\n+\t{\"rx_multicast_packets\", offsetof(struct e1000_hw_stats, mprc),\n+\t\t\tRX_GROUP},\n+\t{\"rx_undersize_errors\", offsetof(struct e1000_hw_stats, ruc),\n+\t\t\tRX_GROUP | ERR_GROUP},\n+\t{\"rx_fragment_errors\", offsetof(struct e1000_hw_stats, rfc),\n+\t\t\tRX_GROUP | ERR_GROUP},\n+\t{\"rx_oversize_errors\", offsetof(struct e1000_hw_stats, roc),\n+\t\t\tRX_GROUP | ERR_GROUP},\n+\t{\"rx_jabber_errors\", offsetof(struct e1000_hw_stats, rjc),\n+\t\t\tRX_GROUP | ERR_GROUP},\n+\t{\"rx_management_packets\", offsetof(struct e1000_hw_stats, mgprc),\n+\t\t\tRX_GROUP},\n+\t{\"rx_management_dropped\", offsetof(struct e1000_hw_stats, mgpdc),\n+\t\t\tRX_GROUP},\n+\t{\"tx_management_packets\", offsetof(struct e1000_hw_stats, mgptc),\n+\t\t\tTX_GROUP},\n+\t{\"rx_total_packets\", offsetof(struct e1000_hw_stats, tpr),\n+\t\t\tRX_GROUP},\n+\t{\"tx_total_packets\", offsetof(struct e1000_hw_stats, tpt),\n+\t\t\tTX_GROUP},\n+\t{\"rx_total_bytes\", offsetof(struct e1000_hw_stats, tor),\n+\t\t\tRX_GROUP},\n+\t{\"tx_total_bytes\", offsetof(struct e1000_hw_stats, tot),\n+\t\t\tTX_GROUP},\n+\t{\"tx_size_64_packets\", offsetof(struct e1000_hw_stats, ptc64),\n+\t\t\tTX_GROUP},\n+\t{\"tx_size_65_to_127_packets\", offsetof(struct e1000_hw_stats, ptc127),\n+\t\t\tTX_GROUP},\n+\t{\"tx_size_128_to_255_packets\", offsetof(struct e1000_hw_stats, ptc255),\n+\t\t\tTX_GROUP},\n+\t{\"tx_size_256_to_511_packets\", offsetof(struct e1000_hw_stats, ptc511),\n+\t\t\tTX_GROUP},\n \t{\"tx_size_512_to_1023_packets\", offsetof(struct e1000_hw_stats,\n-\t\tptc1023)},\n+\t\tptc1023), TX_GROUP},\n \t{\"tx_size_1023_to_max_packets\", offsetof(struct e1000_hw_stats,\n-\t\tptc1522)},\n-\t{\"tx_multicast_packets\", offsetof(struct e1000_hw_stats, mptc)},\n-\t{\"tx_broadcast_packets\", offsetof(struct e1000_hw_stats, bptc)},\n-\t{\"tx_tso_packets\", offsetof(struct e1000_hw_stats, tsctc)},\n-\t{\"tx_tso_errors\", offsetof(struct e1000_hw_stats, tsctfc)},\n-\t{\"rx_sent_to_host_packets\", offsetof(struct e1000_hw_stats, rpthc)},\n-\t{\"tx_sent_by_host_packets\", offsetof(struct e1000_hw_stats, hgptc)},\n-\t{\"rx_code_violation_packets\", offsetof(struct e1000_hw_stats, scvpc)},\n-\n-\t{\"interrupt_assert_count\", offsetof(struct e1000_hw_stats, iac)},\n+\t\tptc1522), TX_GROUP},\n+\t{\"tx_multicast_packets\", offsetof(struct e1000_hw_stats, mptc),\n+\t\t\tTX_GROUP},\n+\t{\"tx_broadcast_packets\", offsetof(struct e1000_hw_stats, bptc),\n+\t\t\tTX_GROUP},\n+\t{\"tx_tso_packets\", offsetof(struct e1000_hw_stats, tsctc),\n+\t\t\tTX_GROUP},\n+\t{\"tx_tso_errors\", offsetof(struct e1000_hw_stats, tsctfc),\n+\t\t\tTX_GROUP | ERR_GROUP},\n+\t{\"rx_sent_to_host_packets\", offsetof(struct e1000_hw_stats, rpthc),\n+\t\t\tRX_GROUP},\n+\t{\"tx_sent_by_host_packets\", offsetof(struct e1000_hw_stats, hgptc),\n+\t\t\tTX_GROUP},\n+\t{\"rx_code_violation_packets\", offsetof(struct e1000_hw_stats, scvpc),\n+\t\t\tTX_GROUP},\n+\t{\"interrupt_assert_count\", offsetof(struct e1000_hw_stats, iac),\n+\t\t\tRX_GROUP},\n };\n \n #define IGB_NB_XSTATS (sizeof(rte_igb_stats_strings) / \\\n \t\tsizeof(rte_igb_stats_strings[0]))\n \n static const struct rte_igb_xstats_name_off rte_igbvf_stats_strings[] = {\n-\t{\"rx_multicast_packets\", offsetof(struct e1000_vf_stats, mprc)},\n-\t{\"rx_good_loopback_packets\", offsetof(struct e1000_vf_stats, gprlbc)},\n-\t{\"tx_good_loopback_packets\", offsetof(struct e1000_vf_stats, gptlbc)},\n-\t{\"rx_good_loopback_bytes\", offsetof(struct e1000_vf_stats, gorlbc)},\n-\t{\"tx_good_loopback_bytes\", offsetof(struct e1000_vf_stats, gotlbc)},\n+\t{\"rx_multicast_packets\", offsetof(struct e1000_vf_stats, mprc),\n+\t\t\tRX_GROUP | VF_GROUP},\n+\t{\"rx_good_loopback_packets\", offsetof(struct e1000_vf_stats, gprlbc),\n+\t\t\tRX_GROUP | VF_GROUP},\n+\t{\"tx_good_loopback_packets\", offsetof(struct e1000_vf_stats, gptlbc),\n+\t\t\tTX_GROUP | VF_GROUP},\n+\t{\"rx_good_loopback_bytes\", offsetof(struct e1000_vf_stats, gorlbc),\n+\t\t\tRX_GROUP | VF_GROUP},\n+\t{\"tx_good_loopback_bytes\", offsetof(struct e1000_vf_stats, gotlbc),\n+\t\t\tTX_GROUP | VF_GROUP},\n };\n \n #define IGBVF_NB_XSTATS (sizeof(rte_igbvf_stats_strings) / \\\n@@ -1846,10 +1907,43 @@ static int eth_igb_xstats_get_names(__rte_unused struct rte_eth_dev *dev,\n }\n \n static int\n-eth_igb_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,\n-\t\t   unsigned n)\n+eth_igb_xstats_get_names_by_group(__rte_unused struct rte_eth_dev *dev,\n+\tstruct rte_eth_xstat_name *xstats_names,\n+\t__rte_unused unsigned int limit,\n+\tuint64_t group_mask)\n {\n-\tstruct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tunsigned int i;\n+\tunsigned int count = 0;\n+\n+\tif (xstats_names == NULL) {\n+\t\tfor (i = 0; i < IGB_NB_XSTATS; i++) {\n+\t\t\tif (rte_igb_stats_strings[i].group_mask & group_mask)\n+\t\t\t\tcount++;\n+\t\t}\n+\t\treturn count;\n+\t}\n+\n+\t/* Note: limit checked in rte_eth_xstats_names() */\n+\n+\tcount = 0;\n+\tfor (i = 0; i < IGB_NB_XSTATS; i++) {\n+\t\tif (rte_igb_stats_strings[i].group_mask & group_mask) {\n+\t\t\tsnprintf(xstats_names[count].name,\n+\t\t\t\t\tsizeof(xstats_names[0].name),\n+\t\t\t\t \"%s\", rte_igb_stats_strings[i].name);\n+\t\t\tcount++;\n+\t\t}\n+\t}\n+\treturn count;\n+}\n+\n+static\n+int eth_igb_xstats_get(struct rte_eth_dev *dev,\n+\t\tstruct rte_eth_xstat *xstats,\n+\t\tunsigned int n)\n+{\n+\tstruct e1000_hw *hw =\n+\t\t\tE1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tstruct e1000_hw_stats *hw_stats =\n \t\t\tE1000_DEV_PRIVATE_TO_STATS(dev->data->dev_private);\n \tunsigned i;\n@@ -1875,8 +1969,50 @@ static int eth_igb_xstats_get_names(__rte_unused struct rte_eth_dev *dev,\n \treturn IGB_NB_XSTATS;\n }\n \n+static\n+int eth_igb_xstats_get_by_group(struct rte_eth_dev *dev,\n+\t\tstruct rte_eth_xstat *xstats,\n+\t\tunsigned int n, uint64_t group_mask)\n+{\n+\tstruct e1000_hw *hw =\n+\t\t\tE1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct e1000_hw_stats *hw_stats =\n+\t\t\tE1000_DEV_PRIVATE_TO_STATS(dev->data->dev_private);\n+\tunsigned int i;\n+\tunsigned int count = 0;\n+\n+\n+\tfor (i = 0; i < IGB_NB_XSTATS; i++) {\n+\t\tif (rte_igb_stats_strings[i].group_mask & group_mask)\n+\t\t\tcount++;\n+\t}\n+\n+\tif (n < IGB_NB_XSTATS)\n+\t\treturn count;\n+\n+\tigb_read_stats_registers(hw, hw_stats);\n+\n+\t/* If this is a reset xstats is NULL, and we have cleared the\n+\t * registers by reading them.\n+\t */\n+\tif (!xstats)\n+\t\treturn 0;\n+\n+\t/* Extended stats */\n+\tfor (i = 0; i < IGB_NB_XSTATS; i++) {\n+\t\tif (rte_igb_stats_strings[i].group_mask & group_mask) {\n+\t\t\txstats[i].id = i;\n+\t\t\txstats[i].value = *(uint64_t *)(((char *)hw_stats) +\n+\t\t\t\trte_igb_stats_strings[i].offset);\n+\t\t}\n+\t}\n+\n+\treturn count;\n+}\n+\n static void\n-igbvf_read_stats_registers(struct e1000_hw *hw, struct e1000_vf_stats *hw_stats)\n+igbvf_read_stats_registers(struct e1000_hw *hw,\n+\t\tstruct e1000_vf_stats *hw_stats)\n {\n \t/* Good Rx packets, include VF loopback */\n \tUPDATE_VF_STAT(E1000_VFGPRC,\n@@ -2314,7 +2450,8 @@ static int eth_igbvf_xstats_get_names(__rte_unused struct rte_eth_dev *dev,\n \n \t/* Let firmware know the driver has taken over */\n \tctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);\n-\tE1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext | E1000_CTRL_EXT_DRV_LOAD);\n+\tE1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext |\n+\t\t\tE1000_CTRL_EXT_DRV_LOAD);\n }\n \n /*\n",
    "prefixes": [
        "dpdk-dev",
        "2/4"
    ]
}