get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 215,
    "url": "https://patches.dpdk.org/api/patches/215/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20140826020851.474452281@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": "<20140826020851.474452281@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20140826020851.474452281@networkplumber.org",
    "date": "2014-08-26T02:07:53",
    "name": "[dpdk-dev,RFC,07/10] virtio: remove unnecessary adapter structure",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "3c4ee7dc8f17490cb97bc72a0de358f897e0ee8f",
    "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/20140826020851.474452281@networkplumber.org/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/215/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/215/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<stephen@networkplumber.org>",
        "Received": [
            "from mail-pd0-f176.google.com (mail-pd0-f176.google.com\n\t[209.85.192.176]) by dpdk.org (Postfix) with ESMTP id A7F5F6A98\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 04:04:56 +0200 (CEST)",
            "by mail-pd0-f176.google.com with SMTP id y10so21562705pdj.21\n\tfor <dev@dpdk.org>; Mon, 25 Aug 2014 19:08:53 -0700 (PDT)",
            "from localhost (static-50-53-65-80.bvtn.or.frontiernet.net.\n\t[50.53.65.80]) by mx.google.com with ESMTPSA id\n\tfh10sm1933291pdb.71.2014.08.25.19.08.52 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 25 Aug 2014 19:08:52 -0700 (PDT)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:message-id:user-agent:date:from:to:cc:subject\n\t:references:mime-version:content-type:content-disposition;\n\tbh=io6EvfVDaMrKe6aa+V62dHj1ROxeeQAEWSzozTaS5Us=;\n\tb=WaktQyTKc1lXL5WIbaljSZcNKz0PlzhsTeBX5+Tv5BgFbv0twhMzLaOctbXj+b4Ozz\n\t7A+2h/vAvntHbvxNstvsApHqB8z3VJHcHR27jBdbhg5JGqGp5yOwoaXZ/a1VQXPworHR\n\tJwsDtDKjMTLhu4Sto3p+h1MhuhaNbQ3Y3cPdC8HKlwtMEP2n6qkwo3a1g74yOF4mCkgT\n\tmX06zp8w/5ydxIArRhb4CFI0oUguTjqefcyUVDH0YHPH7pGk+3d7HO5O8zHiGV/fefSF\n\tiIuqgc661EvIs5OFtPD3CwnjS5gAsOgOY2XoTHc1SkWlxYwOHlf8frIOLrfMM6YQ7Cq6\n\tzFjw==",
        "X-Gm-Message-State": "ALoCoQnYObaxZd0aLJorr36PX7Q6i3o+qD07VawKc8COADOFaMwNgwcZ3LUd+U4HLmLtbqzW5GnV",
        "X-Received": "by 10.67.30.75 with SMTP id kc11mr3846241pad.75.1409018933801;\n\tMon, 25 Aug 2014 19:08:53 -0700 (PDT)",
        "Message-Id": "<20140826020851.474452281@networkplumber.org>",
        "User-Agent": "quilt/0.63-1",
        "Date": "Mon, 25 Aug 2014 19:07:53 -0700",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "Ouyang Changchun <changchun.ouyang@intel.com>",
        "References": "<20140826020746.062748014@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Disposition": "inline; filename=virtio-adapter-cleanout.patch",
        "Cc": "dev@dpdk.org",
        "Subject": "[dpdk-dev] [RFC 07/10] virtio: remove unnecessary adapter structure",
        "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>",
        "X-List-Received-Date": "Tue, 26 Aug 2014 02:04:57 -0000"
    },
    "content": "Cleanup virtio code by eliminating unnecessary nesting of\nvirtio hardware structure inside adapter structure.\nAlso allows removing unneeded macro, making code clearer.\n\n---\n lib/librte_pmd_virtio/virtio_ethdev.c |   31 +++++++++++--------------------\n lib/librte_pmd_virtio/virtio_ethdev.h |    9 ---------\n lib/librte_pmd_virtio/virtio_rxtx.c   |    3 +--\n 3 files changed, 12 insertions(+), 31 deletions(-)",
    "diff": "--- a/lib/librte_pmd_virtio/virtio_ethdev.c\t2014-08-25 19:00:08.310541279 -0700\n+++ b/lib/librte_pmd_virtio/virtio_ethdev.c\t2014-08-25 19:00:08.310541279 -0700\n@@ -203,8 +203,7 @@ virtio_send_command(struct virtqueue *vq\n static int\n virtio_set_multiple_queues(struct rte_eth_dev *dev, uint16_t nb_queues)\n {\n-\tstruct virtio_hw *hw\n-\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \tstruct virtio_pmd_ctrl ctrl;\n \tint dlen[1];\n \tint ret;\n@@ -238,8 +237,7 @@ int virtio_dev_queue_setup(struct rte_et\n \tconst struct rte_memzone *mz;\n \tuint16_t vq_size;\n \tint size;\n-\tstruct virtio_hw *hw =\n-\t\tVIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \tstruct virtqueue  *vq = NULL;\n \n \t/* Write the virtqueue index to the Queue Select Field */\n@@ -379,8 +377,7 @@ virtio_dev_cq_queue_setup(struct rte_eth\n \tstruct virtqueue *vq;\n \tuint16_t nb_desc = 0;\n \tint ret;\n-\tstruct virtio_hw *hw =\n-\t\tVIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \n \tPMD_INIT_FUNC_TRACE();\n \tret = virtio_dev_queue_setup(dev, VTNET_CQ, VTNET_SQ_CQ_QUEUE_IDX,\n@@ -765,8 +762,7 @@ virtio_interrupt_handler(__rte_unused st\n \t\t\t void *param)\n {\n \tstruct rte_eth_dev *dev = param;\n-\tstruct virtio_hw *hw =\n-\t\tVIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \tuint8_t isr;\n \n \t/* Read interrupt status which clears interrupt */\n@@ -792,12 +788,11 @@ static int\n eth_virtio_dev_init(__rte_unused struct eth_driver *eth_drv,\n \t\tstruct rte_eth_dev *eth_dev)\n {\n+\tstruct virtio_hw *hw = eth_dev->data->dev_private;\n \tstruct virtio_net_config *config;\n \tstruct virtio_net_config local_config;\n \tuint32_t offset_conf = sizeof(config->mac);\n \tstruct rte_pci_device *pci_dev;\n-\tstruct virtio_hw *hw =\n-\t\tVIRTIO_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);\n \n \tif (RTE_PKTMBUF_HEADROOM < sizeof(struct virtio_net_hdr)) {\n \t\tPMD_INIT_LOG(ERR,\n@@ -928,7 +923,7 @@ static struct eth_driver rte_virtio_pmd\n \t\t.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,\n \t},\n \t.eth_dev_init = eth_virtio_dev_init,\n-\t.dev_private_size = sizeof(struct virtio_adapter),\n+\t.dev_private_size = sizeof(struct virtio_hw),\n };\n \n /*\n@@ -965,8 +960,7 @@ static int\n virtio_dev_configure(struct rte_eth_dev *dev)\n {\n \tconst struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;\n-\tstruct virtio_hw *hw =\n-\t\tVIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \tint ret;\n \n \tPMD_INIT_LOG(DEBUG, \"configure\");\n@@ -990,8 +984,7 @@ static int\n virtio_dev_start(struct rte_eth_dev *dev)\n {\n \tuint16_t nb_queues, i;\n-\tstruct virtio_hw *hw =\n-\t\tVIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \n \t/* Tell the host we've noticed this device. */\n \tvtpci_set_status(hw, VIRTIO_CONFIG_STATUS_ACK);\n@@ -1097,8 +1090,7 @@ static void virtio_dev_free_mbufs(struct\n static void\n virtio_dev_stop(struct rte_eth_dev *dev)\n {\n-\tstruct virtio_hw *hw =\n-\t\tVIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \n \t/* reset the NIC */\n \tvtpci_irq_config(hw, 0);\n@@ -1111,8 +1103,7 @@ virtio_dev_link_update(struct rte_eth_de\n {\n \tstruct rte_eth_link link, old;\n \tuint16_t status;\n-\tstruct virtio_hw *hw =\n-\t\tVIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \tmemset(&link, 0, sizeof(link));\n \tvirtio_dev_atomic_read_link_status(dev, &link);\n \told = link;\n@@ -1144,7 +1135,7 @@ virtio_dev_link_update(struct rte_eth_de\n static void\n virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n {\n-\tstruct virtio_hw *hw = VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \n \tdev_info->driver_name = dev->driver->pci_drv.name;\n \tdev_info->max_rx_queues = (uint16_t)hw->max_rx_queues;\n--- a/lib/librte_pmd_virtio/virtio_ethdev.h\t2014-08-25 19:00:08.310541279 -0700\n+++ b/lib/librte_pmd_virtio/virtio_ethdev.h\t2014-08-25 19:00:08.310541279 -0700\n@@ -110,15 +110,6 @@ uint16_t virtio_recv_mergeable_pkts(void\n uint16_t virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\tuint16_t nb_pkts);\n \n-/*\n- * Structure to store private data for each driver instance (for each port).\n- */\n-struct virtio_adapter {\n-\tstruct virtio_hw hw;\n-};\n-\n-#define VIRTIO_DEV_PRIVATE_TO_HW(adapter)\\\n-\t(&((struct virtio_adapter *)adapter)->hw)\n \n /*\n  * The VIRTIO_NET_F_GUEST_TSO[46] features permit the host to send us\n--- a/lib/librte_pmd_virtio/virtio_rxtx.c\t2014-08-25 19:00:08.310541279 -0700\n+++ b/lib/librte_pmd_virtio/virtio_rxtx.c\t2014-08-25 19:00:08.310541279 -0700\n@@ -326,8 +326,7 @@ virtio_dev_vring_start(struct virtqueue\n void\n virtio_dev_cq_start(struct rte_eth_dev *dev)\n {\n-\tstruct virtio_hw *hw\n-\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \n \tvirtio_dev_vring_start(hw->cvq, VTNET_CQ);\n \tVIRTQUEUE_DUMP((struct virtqueue *)hw->cvq);\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "07/10"
    ]
}