get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 747611,
    "url": "http://patchwork.ozlabs.org/api/patches/747611/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170406064522.13096-1-tklauser@distanz.ch/",
    "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": "<20170406064522.13096-1-tklauser@distanz.ch>",
    "list_archive_url": null,
    "date": "2017-04-06T06:45:22",
    "name": "net: igbvf: Use net_device_stats from struct net_device",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "63c6b62d9285ef840317cec4c5d2373d69d0b0fa",
    "submitter": {
        "id": 2451,
        "url": "http://patchwork.ozlabs.org/api/people/2451/?format=api",
        "name": "Tobias Klauser",
        "email": "tklauser@distanz.ch"
    },
    "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/20170406064522.13096-1-tklauser@distanz.ch/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/747611/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/747611/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.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"
        ],
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3vzCrv0DD6z9s7m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  6 Apr 2017 16:45:34 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 14B28252FC;\n\tThu,  6 Apr 2017 06:45:33 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id H627TAGSpgEk; Thu,  6 Apr 2017 06:45:32 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 3C56B2FFE1;\n\tThu,  6 Apr 2017 06:45:32 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9F8411C0018\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  6 Apr 2017 06:45:30 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 95BFF2FFE1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  6 Apr 2017 06:45:30 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id ha4ofFSr2mPM for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  6 Apr 2017 06:45:29 +0000 (UTC)",
            "from mail.zhinst.com (mail.zhinst.com [212.126.164.98])\n\tby silver.osuosl.org (Postfix) with ESMTP id E5FB2252FC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  6 Apr 2017 06:45:27 +0000 (UTC)",
            "from ziws08.zhinst.com ([10.42.0.7])\n\tby mail.zhinst.com (Kerio Connect 9.2.2 patch 1) with ESMTP;\n\tThu, 6 Apr 2017 08:45:22 +0200"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6",
        "From": "Tobias Klauser <tklauser@distanz.ch>",
        "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "Date": "Thu,  6 Apr 2017 08:45:22 +0200",
        "Message-Id": "<20170406064522.13096-1-tklauser@distanz.ch>",
        "X-Mailer": "git-send-email 2.12.2.399.g034667a45805",
        "Cc": "netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org",
        "Subject": "[Intel-wired-lan] [PATCH] net: igbvf: Use net_device_stats from\n\tstruct net_device",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "Instead of using a private copy of struct net_device_stats in\nstruct igbvf_adapter, use stats from struct net_device. Also remove the\nnow unnecessary .ndo_get_stats function.\n\nSigned-off-by: Tobias Klauser <tklauser@distanz.ch>\n---\n drivers/net/ethernet/intel/igbvf/igbvf.h  |  1 -\n drivers/net/ethernet/intel/igbvf/netdev.c | 26 +++++---------------------\n 2 files changed, 5 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igbvf/igbvf.h b/drivers/net/ethernet/intel/igbvf/igbvf.h\nindex 6f4290d6dc9f..11c7238e612c 100644\n--- a/drivers/net/ethernet/intel/igbvf/igbvf.h\n+++ b/drivers/net/ethernet/intel/igbvf/igbvf.h\n@@ -241,7 +241,6 @@ struct igbvf_adapter {\n \t/* OS defined structs */\n \tstruct net_device *netdev;\n \tstruct pci_dev *pdev;\n-\tstruct net_device_stats net_stats;\n \tspinlock_t stats_lock; /* prevent concurrent stats updates */\n \n \t/* structs defined in e1000_hw.h */\ndiff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c\nindex 839ba110f7fb..0707d08f7d47 100644\n--- a/drivers/net/ethernet/intel/igbvf/netdev.c\n+++ b/drivers/net/ethernet/intel/igbvf/netdev.c\n@@ -400,8 +400,8 @@ static bool igbvf_clean_rx_irq(struct igbvf_adapter *adapter,\n \n \tadapter->total_rx_packets += total_packets;\n \tadapter->total_rx_bytes += total_bytes;\n-\tadapter->net_stats.rx_bytes += total_bytes;\n-\tadapter->net_stats.rx_packets += total_packets;\n+\tnetdev->stats.rx_bytes += total_bytes;\n+\tnetdev->stats.rx_packets += total_packets;\n \treturn cleaned;\n }\n \n@@ -864,8 +864,8 @@ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)\n \t\t}\n \t}\n \n-\tadapter->net_stats.tx_bytes += total_bytes;\n-\tadapter->net_stats.tx_packets += total_packets;\n+\tnetdev->stats.tx_bytes += total_bytes;\n+\tnetdev->stats.tx_packets += total_packets;\n \treturn count < tx_ring->count;\n }\n \n@@ -1798,7 +1798,7 @@ void igbvf_update_stats(struct igbvf_adapter *adapter)\n \tUPDATE_VF_COUNTER(VFGPRLBC, gprlbc);\n \n \t/* Fill out the OS statistics structure */\n-\tadapter->net_stats.multicast = adapter->stats.mprc;\n+\tadapter->netdev->stats.multicast = adapter->stats.mprc;\n }\n \n static void igbvf_print_link_info(struct igbvf_adapter *adapter)\n@@ -2334,21 +2334,6 @@ static void igbvf_reset_task(struct work_struct *work)\n }\n \n /**\n- * igbvf_get_stats - Get System Network Statistics\n- * @netdev: network interface device structure\n- *\n- * Returns the address of the device statistics structure.\n- * The statistics are actually updated from the timer callback.\n- **/\n-static struct net_device_stats *igbvf_get_stats(struct net_device *netdev)\n-{\n-\tstruct igbvf_adapter *adapter = netdev_priv(netdev);\n-\n-\t/* only return the current stats */\n-\treturn &adapter->net_stats;\n-}\n-\n-/**\n  * igbvf_change_mtu - Change the Maximum Transfer Unit\n  * @netdev: network interface device structure\n  * @new_mtu: new value for maximum frame size\n@@ -2635,7 +2620,6 @@ static const struct net_device_ops igbvf_netdev_ops = {\n \t.ndo_open\t\t= igbvf_open,\n \t.ndo_stop\t\t= igbvf_close,\n \t.ndo_start_xmit\t\t= igbvf_xmit_frame,\n-\t.ndo_get_stats\t\t= igbvf_get_stats,\n \t.ndo_set_rx_mode\t= igbvf_set_multi,\n \t.ndo_set_mac_address\t= igbvf_set_mac,\n \t.ndo_change_mtu\t\t= igbvf_change_mtu,\n",
    "prefixes": []
}