get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2422,
    "url": "https://patches.dpdk.org/api/patches/2422/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421813818-2354-1-git-send-email-stephen@networkplumber.org/",
    "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": "<1421813818-2354-1-git-send-email-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421813818-2354-1-git-send-email-stephen@networkplumber.org",
    "date": "2015-01-21T04:16:58",
    "name": "[dpdk-dev] stats: remove useless memset's",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "903db2395c9853077847486b83ff911515cdbf4e",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421813818-2354-1-git-send-email-stephen@networkplumber.org/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2422/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2422/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 4B2085A31;\n\tWed, 21 Jan 2015 05:17:19 +0100 (CET)",
            "from mail-pd0-f170.google.com (mail-pd0-f170.google.com\n\t[209.85.192.170]) by dpdk.org (Postfix) with ESMTP id B620C5A15\n\tfor <dev@dpdk.org>; Wed, 21 Jan 2015 05:17:14 +0100 (CET)",
            "by mail-pd0-f170.google.com with SMTP id p10so35696858pdj.1\n\tfor <dev@dpdk.org>; Tue, 20 Jan 2015 20:17:14 -0800 (PST)",
            "from urahara.brocade.com\n\t(static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155])\n\tby mx.google.com with ESMTPSA id\n\ta2sm1297438pdi.82.2015.01.20.20.17.11\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 20 Jan 2015 20:17:13 -0800 (PST)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=yNEa0cSRVYPvyo3FCZ3GOsJoXGYyu3fIuwPIPFc5bwM=;\n\tb=j/fZf8NwcIz/V+VNGK3CjI+NA1btQz+hnvPOA681ijnW+ywn9MWr9IPDWdNmJQtFNw\n\t5grxSzqo2oSxLR9tN8KNzmWhEYualx8J0gR4d/KcaqPi/93KNi2nNEiXyV+hOoRGGJ+U\n\tBRsEe0O5F43030BLYzUzISc4E0NfZnILnjK1/Oo56A/RG/yiYe9CnGZSeW0CESZ3yhfR\n\tDqUpWNA0KyOJlz6Tz9nQFLpodTMGF0nPQa3mGpqVv8gBdwsQKgcYo89UPQ/1pDGBDSsh\n\tYj1NwCqiNjyQcb6yinWqdb9oBN4+4NHyDicguhir8D5AJSVDhf9r5RsB8vGRZwYqwlN7\n\tnCUA==",
        "X-Gm-Message-State": "ALoCoQluSwQmIMFYtBPk3dgPdj5ttV5t9YmE6aqhtS46shAY5VJciW59dZWxdgBu+Y/B9xGYIkgF",
        "X-Received": "by 10.68.212.229 with SMTP id nn5mr58144290pbc.52.1421813833955; \n\tTue, 20 Jan 2015 20:17:13 -0800 (PST)",
        "From": "stephen@networkplumber.org",
        "To": "dev@dpdk.org",
        "Date": "Tue, 20 Jan 2015 20:16:58 -0800",
        "Message-Id": "<1421813818-2354-1-git-send-email-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.1.4",
        "Cc": "Stephen Hemminger <shemming@brocade.com>",
        "Subject": "[dpdk-dev] [PATCH] stats: remove useless memset's",
        "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": "From: Stephen Hemminger <shemming@brocade.com>\n\nThe rte_eth_stats_get is the only API that should call the device\nstatistics function directly, and it already does a memset of the\nresulting structure. Therefore doing memset() in the driver is\nredundant and should be removed.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_pmd_af_packet/rte_eth_af_packet.c | 2 --\n lib/librte_pmd_bond/rte_eth_bond_pmd.c       | 4 ----\n lib/librte_pmd_enic/enic_main.c              | 1 -\n lib/librte_pmd_i40e/i40e_ethdev_vf.c         | 1 -\n lib/librte_pmd_ixgbe/ixgbe_ethdev.c          | 1 -\n lib/librte_pmd_ring/rte_eth_ring.c           | 1 -\n 6 files changed, 10 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_af_packet/rte_eth_af_packet.c b/lib/librte_pmd_af_packet/rte_eth_af_packet.c\nindex 755780a..1ffe1cd 100644\n--- a/lib/librte_pmd_af_packet/rte_eth_af_packet.c\n+++ b/lib/librte_pmd_af_packet/rte_eth_af_packet.c\n@@ -285,8 +285,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)\n \tunsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;\n \tconst struct pmd_internals *internal = dev->data->dev_private;\n \n-\tmemset(igb_stats, 0, sizeof(*igb_stats));\n-\n \timax = (internal->nb_queues < RTE_ETHDEV_QUEUE_STAT_CNTRS ?\n \t        internal->nb_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS);\n \tfor (i = 0; i < imax; i++) {\ndiff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c\nindex e9cec2a..8b80297 100644\n--- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n+++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c\n@@ -1362,12 +1362,8 @@ bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n {\n \tstruct bond_dev_private *internals = dev->data->dev_private;\n \tstruct rte_eth_stats slave_stats;\n-\n \tint i;\n \n-\t/* clear bonded stats before populating from slaves */\n-\tmemset(stats, 0, sizeof(*stats));\n-\n \tfor (i = 0; i < internals->slave_count; i++) {\n \t\trte_eth_stats_get(internals->slaves[i].port_id, &slave_stats);\n \ndiff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c\nindex 8ab8e44..48fdca2 100644\n--- a/lib/librte_pmd_enic/enic_main.c\n+++ b/lib/librte_pmd_enic/enic_main.c\n@@ -211,7 +211,6 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats)\n {\n \tstruct vnic_stats *stats;\n \n-\tmemset(r_stats, 0, sizeof(*r_stats));\n \tif (vnic_dev_stats_dump(enic->vdev, &stats)) {\n \t\tdev_err(enic, \"Error in getting stats\\n\");\n \t\treturn;\ndiff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\nindex fe46cf1..7d8d8ef 100644\n--- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n+++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c\n@@ -1673,7 +1673,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n static void\n i40evf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n {\n-\tmemset(stats, 0, sizeof(*stats));\n \tif (i40evf_get_statics(dev, stats))\n \t\tPMD_DRV_LOG(ERR, \"Get statics failed\");\n }\ndiff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c\nindex b58ec45..e36cdf5 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c\n@@ -1940,7 +1940,6 @@ ixgbevf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n \tif (stats == NULL)\n \t\treturn;\n \n-\tmemset(stats, 0, sizeof(*stats));\n \tstats->ipackets = hw_stats->vfgprc;\n \tstats->ibytes = hw_stats->vfgorc;\n \tstats->opackets = hw_stats->vfgptc;\ndiff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c\nindex 4f1b6ed..f685f08 100644\n--- a/lib/librte_pmd_ring/rte_eth_ring.c\n+++ b/lib/librte_pmd_ring/rte_eth_ring.c\n@@ -165,7 +165,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *igb_stats)\n \tunsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;\n \tconst struct pmd_internals *internal = dev->data->dev_private;\n \n-\tmemset(igb_stats, 0, sizeof(*igb_stats));\n \tfor (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS &&\n \t\t\ti < internal->nb_rx_queues; i++) {\n \t\tigb_stats->q_ipackets[i] = internal->rx_ring_queues[i].rx_pkts.cnt;\n",
    "prefixes": [
        "dpdk-dev"
    ]
}