get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 747613,
    "url": "http://patchwork.ozlabs.org/api/patches/747613/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170406064628.13459-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": "<20170406064628.13459-1-tklauser@distanz.ch>",
    "list_archive_url": null,
    "date": "2017-04-06T06:46:28",
    "name": "net: i40evf: Use net_device_stats from struct net_device",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7e9e350b4695233551558e6b7a98b65f8e59138b",
    "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/20170406064628.13459-1-tklauser@distanz.ch/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/747613/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/747613/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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 3vzCt61XkXz9s7m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  6 Apr 2017 16:46:38 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id BE643845BF;\n\tThu,  6 Apr 2017 06:46:36 +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 8EaWc1lvlE-d; Thu,  6 Apr 2017 06:46:35 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 89D4C82E79;\n\tThu,  6 Apr 2017 06:46:35 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 856601C0018\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  6 Apr 2017 06:46:34 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 80876886EA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  6 Apr 2017 06:46:34 +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 5vJQ37RWYk0U for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  6 Apr 2017 06:46:33 +0000 (UTC)",
            "from mail.zhinst.com (mail.zhinst.com [212.126.164.98])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 92DE4886D9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  6 Apr 2017 06:46:32 +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:46:28 +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:46:28 +0200",
        "Message-Id": "<20170406064628.13459-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: i40evf: 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 i40evf_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/i40evf/i40evf.h         |  1 -\n drivers/net/ethernet/intel/i40evf/i40evf_main.c    | 16 ----------------\n .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    | 22 +++++++++++-----------\n 3 files changed, 11 insertions(+), 28 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h\nindex d61ecf655091..66d4880b5c14 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h\n@@ -253,7 +253,6 @@ struct i40evf_adapter {\n \t/* OS defined structs */\n \tstruct net_device *netdev;\n \tstruct pci_dev *pdev;\n-\tstruct net_device_stats net_stats;\n \n \tstruct i40e_hw hw; /* defined in i40e_type.h */\n \ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex fb2811c23024..1e36561b428a 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -2231,21 +2231,6 @@ static int i40evf_close(struct net_device *netdev)\n }\n \n /**\n- * i40evf_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 *i40evf_get_stats(struct net_device *netdev)\n-{\n-\tstruct i40evf_adapter *adapter = netdev_priv(netdev);\n-\n-\t/* only return the current stats */\n-\treturn &adapter->net_stats;\n-}\n-\n-/**\n  * i40evf_change_mtu - Change the Maximum Transfer Unit\n  * @netdev: network interface device structure\n  * @new_mtu: new value for maximum frame size\n@@ -2351,7 +2336,6 @@ static const struct net_device_ops i40evf_netdev_ops = {\n \t.ndo_open\t\t= i40evf_open,\n \t.ndo_stop\t\t= i40evf_close,\n \t.ndo_start_xmit\t\t= i40evf_xmit_frame,\n-\t.ndo_get_stats\t\t= i40evf_get_stats,\n \t.ndo_set_rx_mode\t= i40evf_set_rx_mode,\n \t.ndo_validate_addr\t= eth_validate_addr,\n \t.ndo_set_mac_address\t= i40evf_set_mac,\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\nindex 032be8d3928a..91121de0d928 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n@@ -958,17 +958,17 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,\n \tcase I40E_VIRTCHNL_OP_GET_STATS: {\n \t\tstruct i40e_eth_stats *stats =\n \t\t\t(struct i40e_eth_stats *)msg;\n-\t\tadapter->net_stats.rx_packets = stats->rx_unicast +\n-\t\t\t\t\t\t stats->rx_multicast +\n-\t\t\t\t\t\t stats->rx_broadcast;\n-\t\tadapter->net_stats.tx_packets = stats->tx_unicast +\n-\t\t\t\t\t\t stats->tx_multicast +\n-\t\t\t\t\t\t stats->tx_broadcast;\n-\t\tadapter->net_stats.rx_bytes = stats->rx_bytes;\n-\t\tadapter->net_stats.tx_bytes = stats->tx_bytes;\n-\t\tadapter->net_stats.tx_errors = stats->tx_errors;\n-\t\tadapter->net_stats.rx_dropped = stats->rx_discards;\n-\t\tadapter->net_stats.tx_dropped = stats->tx_discards;\n+\t\tnetdev->stats.rx_packets = stats->rx_unicast +\n+\t\t\t\t\t   stats->rx_multicast +\n+\t\t\t\t\t   stats->rx_broadcast;\n+\t\tnetdev->stats.tx_packets = stats->tx_unicast +\n+\t\t\t\t\t   stats->tx_multicast +\n+\t\t\t\t\t   stats->tx_broadcast;\n+\t\tnetdev->stats.rx_bytes = stats->rx_bytes;\n+\t\tnetdev->stats.tx_bytes = stats->tx_bytes;\n+\t\tnetdev->stats.tx_errors = stats->tx_errors;\n+\t\tnetdev->stats.rx_dropped = stats->rx_discards;\n+\t\tnetdev->stats.tx_dropped = stats->tx_discards;\n \t\tadapter->current_stats = *stats;\n \t\t}\n \t\tbreak;\n",
    "prefixes": []
}