get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2314,
    "url": "https://patches.dpdk.org/api/patches/2314/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421298930-15210-13-git-send-email-changchun.ouyang@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": "<1421298930-15210-13-git-send-email-changchun.ouyang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421298930-15210-13-git-send-email-changchun.ouyang@intel.com",
    "date": "2015-01-15T05:15:20",
    "name": "[dpdk-dev,12/22] virtio: Move allocation before initialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4ef9e460d032695f93af991fd6a45d89a9821fe4",
    "submitter": {
        "id": 31,
        "url": "https://patches.dpdk.org/api/people/31/?format=api",
        "name": "Ouyang Changchun",
        "email": "changchun.ouyang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421298930-15210-13-git-send-email-changchun.ouyang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2314/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2314/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 1CB915AAA;\n\tThu, 15 Jan 2015 06:16:29 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id B3C3A5AA6\n\tfor <dev@dpdk.org>; Thu, 15 Jan 2015 06:16:05 +0100 (CET)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 14 Jan 2015 21:12:23 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 14 Jan 2015 21:03:08 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t0F5G2hg000343;\n\tThu, 15 Jan 2015 13:16:02 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t0F5Fx1o015328; Thu, 15 Jan 2015 13:16:01 +0800",
            "(from couyang@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0F5FxPr015324; \n\tThu, 15 Jan 2015 13:15:59 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"4.97,862,1389772800\"; d=\"scan'208\";a=\"440759287\"",
        "From": "Ouyang Changchun <changchun.ouyang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 15 Jan 2015 13:15:20 +0800",
        "Message-Id": "<1421298930-15210-13-git-send-email-changchun.ouyang@intel.com>",
        "X-Mailer": "git-send-email 1.7.12.2",
        "In-Reply-To": "<1421298930-15210-1-git-send-email-changchun.ouyang@intel.com>",
        "References": "<1421298930-15210-1-git-send-email-changchun.ouyang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 12/22] virtio: Move allocation before\n\tinitialization",
        "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": "If allocation fails, don't want to leave virtio device stuck\nin middle of initialization sequence.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nSigned-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n---\n lib/librte_pmd_virtio/virtio_ethdev.c | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c\nindex c17cac8..13feda5 100644\n--- a/lib/librte_pmd_virtio/virtio_ethdev.c\n+++ b/lib/librte_pmd_virtio/virtio_ethdev.c\n@@ -890,6 +890,15 @@ eth_virtio_dev_init(__rte_unused struct eth_driver *eth_drv,\n \tif (rte_eal_process_type() == RTE_PROC_SECONDARY)\n \t\treturn 0;\n \n+\t/* Allocate memory for storing MAC addresses */\n+\teth_dev->data->mac_addrs = rte_zmalloc(\"virtio\", ETHER_ADDR_LEN, 0);\n+\tif (eth_dev->data->mac_addrs == NULL) {\n+\t\tPMD_INIT_LOG(ERR,\n+\t\t\t\"Failed to allocate %d bytes needed to store MAC addresses\",\n+\t\t\tETHER_ADDR_LEN);\n+\t\treturn -ENOMEM;\n+\t}\n+\n \t/* Tell the host we've noticed this device. */\n \tvtpci_set_status(hw, VIRTIO_CONFIG_STATUS_ACK);\n \n@@ -916,15 +925,6 @@ eth_virtio_dev_init(__rte_unused struct eth_driver *eth_drv,\n \t\thw->vtnet_hdr_size = sizeof(struct virtio_net_hdr);\n \t}\n \n-\t/* Allocate memory for storing MAC addresses */\n-\teth_dev->data->mac_addrs = rte_zmalloc(\"virtio\", ETHER_ADDR_LEN, 0);\n-\tif (eth_dev->data->mac_addrs == NULL) {\n-\t\tPMD_INIT_LOG(ERR,\n-\t\t\t\"Failed to allocate %d bytes needed to store MAC addresses\",\n-\t\t\tETHER_ADDR_LEN);\n-\t\treturn -ENOMEM;\n-\t}\n-\n \t/* Copy the permanent MAC address to: virtio_hw */\n \tvirtio_get_hwaddr(hw);\n \tether_addr_copy((struct ether_addr *) hw->mac_addr,\n",
    "prefixes": [
        "dpdk-dev",
        "12/22"
    ]
}