get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 887198,
    "url": "http://patchwork.ozlabs.org/api/patches/887198/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180316223406.7295-6-anthony.l.nguyen@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20180316223406.7295-6-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2018-03-16T22:34:06",
    "name": "[5/5] ixgbevf: Add XDP queue stats reporting",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "4e0260225e5f4bdfc29041bf2e370e49b4392cec",
    "submitter": {
        "id": 68875,
        "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api",
        "name": "Tony Nguyen",
        "email": "anthony.l.nguyen@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180316223406.7295-6-anthony.l.nguyen@intel.com/mbox/",
    "series": [
        {
            "id": 34301,
            "url": "http://patchwork.ozlabs.org/api/series/34301/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=34301",
            "date": "2018-03-16T22:34:04",
            "name": "Enable XDP for ixgbevf",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/34301/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/887198/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/887198/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4030qT1Mdpz9sSt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 17 Mar 2018 09:43:32 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 96C7A8A6CA;\n\tFri, 16 Mar 2018 22:43:31 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id sqpZnNydApb1; Fri, 16 Mar 2018 22:43:30 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id DF5D88A6BC;\n\tFri, 16 Mar 2018 22:43:30 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id EFC9D1C218D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:27 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id ECE978582C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:27 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id XrrJNfrpPdv0 for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:25 +0000 (UTC)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id B4F47836BB\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 16 Mar 2018 22:43:25 +0000 (UTC)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t16 Mar 2018 15:43:24 -0700",
            "from unknown (HELO anguy11-linux.jf.intel.com) ([10.166.244.153])\n\tby orsmga007.jf.intel.com with ESMTP; 16 Mar 2018 15:43:24 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.48,317,1517904000\"; d=\"scan'208\";a=\"25375071\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 16 Mar 2018 15:34:06 -0700",
        "Message-Id": "<20180316223406.7295-6-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180316223406.7295-1-anthony.l.nguyen@intel.com>",
        "References": "<20180316223406.7295-1-anthony.l.nguyen@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH 5/5] ixgbevf: Add XDP queue stats reporting",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Cc": "netdev@vger.kernel.org",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "XDP stats are included in TX stats, however, they are not\nreported in TX queue stats since they are setup on different\nqueues.  Add reporting for XDP queue stats to provide\nconsistency between the total stats and per queue stats.\n\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\nAcked-by: John Fastabend <john.fastabend@gmail.com>\n---\n drivers/net/ethernet/intel/ixgbevf/ethtool.c | 24 ++++++++++++++++++++++++\n 1 file changed, 24 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c\nindex da8c0e299a37..8e7d6c6f5c92 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c\n@@ -82,6 +82,7 @@ static struct ixgbe_stats ixgbevf_gstrings_stats[] = {\n \n #define IXGBEVF_QUEUE_STATS_LEN ( \\\n \t(((struct ixgbevf_adapter *)netdev_priv(netdev))->num_tx_queues + \\\n+\t ((struct ixgbevf_adapter *)netdev_priv(netdev))->num_xdp_queues + \\\n \t ((struct ixgbevf_adapter *)netdev_priv(netdev))->num_rx_queues) * \\\n \t (sizeof(struct ixgbevf_stats) / sizeof(u64)))\n #define IXGBEVF_GLOBAL_STATS_LEN ARRAY_SIZE(ixgbevf_gstrings_stats)\n@@ -491,6 +492,23 @@ static void ixgbevf_get_ethtool_stats(struct net_device *netdev,\n \t\ti += 2;\n \t}\n \n+\t/* populate XDP queue data */\n+\tfor (j = 0; j < adapter->num_xdp_queues; j++) {\n+\t\tring = adapter->xdp_ring[j];\n+\t\tif (!ring) {\n+\t\t\tdata[i++] = 0;\n+\t\t\tdata[i++] = 0;\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tdo {\n+\t\t\tstart = u64_stats_fetch_begin_irq(&ring->syncp);\n+\t\t\tdata[i] = ring->stats.packets;\n+\t\t\tdata[i + 1] = ring->stats.bytes;\n+\t\t} while (u64_stats_fetch_retry_irq(&ring->syncp, start));\n+\t\ti += 2;\n+\t}\n+\n \t/* populate Rx queue data */\n \tfor (j = 0; j < adapter->num_rx_queues; j++) {\n \t\tring = adapter->rx_ring[j];\n@@ -534,6 +552,12 @@ static void ixgbevf_get_strings(struct net_device *netdev, u32 stringset,\n \t\t\tsprintf(p, \"tx_queue_%u_bytes\", i);\n \t\t\tp += ETH_GSTRING_LEN;\n \t\t}\n+\t\tfor (i = 0; i < adapter->num_xdp_queues; i++) {\n+\t\t\tsprintf(p, \"xdp_queue_%u_packets\", i);\n+\t\t\tp += ETH_GSTRING_LEN;\n+\t\t\tsprintf(p, \"xdp_queue_%u_bytes\", i);\n+\t\t\tp += ETH_GSTRING_LEN;\n+\t\t}\n \t\tfor (i = 0; i < adapter->num_rx_queues; i++) {\n \t\t\tsprintf(p, \"rx_queue_%u_packets\", i);\n \t\t\tp += ETH_GSTRING_LEN;\n",
    "prefixes": [
        "5/5"
    ]
}