get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 17166,
    "url": "http://patches.dpdk.org/api/patches/17166/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1479747322-5774-5-git-send-email-jblunck@infradead.org/",
    "project": {
        "id": 1,
        "url": "http://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": "<1479747322-5774-5-git-send-email-jblunck@infradead.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1479747322-5774-5-git-send-email-jblunck@infradead.org",
    "date": "2016-11-21T16:55:19",
    "name": "[dpdk-dev,v2,5/8] virtio: Add vtpci_intr_handle() helper to get rte_intr_handle",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2e445d93f59652b24ed9cc610443a1c51bc5b0d0",
    "submitter": {
        "id": 249,
        "url": "http://patches.dpdk.org/api/people/249/?format=api",
        "name": "Jan Blunck",
        "email": "jblunck@infradead.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1479747322-5774-5-git-send-email-jblunck@infradead.org/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/17166/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/17166/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 CA565691A;\n\tMon, 21 Nov 2016 17:57:21 +0100 (CET)",
            "from mail-wm0-f66.google.com (mail-wm0-f66.google.com\n\t[74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 2CE6C568A\n\tfor <dev@dpdk.org>; Mon, 21 Nov 2016 17:57:10 +0100 (CET)",
            "by mail-wm0-f66.google.com with SMTP id g23so3623198wme.1\n\tfor <dev@dpdk.org>; Mon, 21 Nov 2016 08:57:10 -0800 (PST)",
            "from weierstrass.local.net ([91.200.110.70])\n\tby smtp.gmail.com with ESMTPSA id\n\tv202sm20536051wmv.8.2016.11.21.08.57.08\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 21 Nov 2016 08:57:09 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=Vqsnq0DRarx5VjEXq3bCGmBdgE22ORvL4YPUXUJNE+8=;\n\tb=UQA6NrZaecq45CaojrtMa9ZNs/ysoWjGwQhTykmfI6z7ckFQLqpMkyqXr0/+++CCU7\n\t8NZTQ+11pbdMxqGqSdAdLMgNH3enNh9YtNeIQQqS/X5PDcJnIrRWb2ytfoz9IcYhmzS8\n\te7kDiJsNdIZwmWjw6AyDdoDRZinWvOMt5PBM0A2LDZLe22bT/J6m56qCl5qYLi4xvrRv\n\t9AJcXlIwEuJL3M7J+GJMamVXcVcPfdfeXBg6UgGiPIzsrHZVf/k31fDnktdSp+ZuFhET\n\tApx8BEcoe9gxehF4p0CX430V2EcZPpDQMUiTKbNxLIe4l95CPPuKEciPUQjkRzRc/OVK\n\t9GEw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=Vqsnq0DRarx5VjEXq3bCGmBdgE22ORvL4YPUXUJNE+8=;\n\tb=aL66Y7o4KYom9SQCFLzbGZU8+vLGVFv4ERik+c+J48SNhFiiw/ek4WExwMKzdhbume\n\tIKR3g5YQAnIFIL/zl/hBhuFayAV6IVkcZ4f7cUy85f2bN0j9ydLuj4cOpLdRekGccYWJ\n\tgZ0EJ1u4VnlfGS1O96AdyuGZ8TVb9DzbbeS7Zz5jfqWGtb6w1vzf8FugTruCCLzqrQ5g\n\to6aaYlAPfXUKscATO/8px+8p2qcdD5IAcjpZegajNucceGlCYh9Dt5V5YYnkm2a/jDiC\n\tHLOLZ4+I9c18RS841lo1G0otWRmMyn91VRseJqBjhzJO1goKiMFe90GtcqfwpHxkY+Z7\n\toMfg==",
        "X-Gm-Message-State": "AKaTC03SBo1FkvEO61jU04yd5Yg6GeaKj3eLBJyWgOCNcNLvsT1P/Au9x6zdBDvXld3lqA==",
        "X-Received": "by 10.28.227.9 with SMTP id a9mr17803866wmh.85.1479747429765;\n\tMon, 21 Nov 2016 08:57:09 -0800 (PST)",
        "From": "Jan Blunck <jblunck@infradead.org>",
        "To": "dev@dpdk.org",
        "Cc": "shreyansh.jain@nxp.com,\n\tdavid.marchand@6wind.com",
        "Date": "Mon, 21 Nov 2016 17:55:19 +0100",
        "Message-Id": "<1479747322-5774-5-git-send-email-jblunck@infradead.org>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1479747322-5774-1-git-send-email-jblunck@infradead.org>",
        "References": "<1479747322-5774-1-git-send-email-jblunck@infradead.org>",
        "Subject": "[dpdk-dev] [PATCH v2 5/8] virtio: Add vtpci_intr_handle() helper to\n\tget rte_intr_handle",
        "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": "This adds a helper to get the rte_intr_handle from the virtio_hw. This is\nsafe to do since the usage of the helper is guarded by RTE_ETH_DEV_INTR_LSC\nwhich is only set if we found a PCI device during initialization.\n\nSigned-off-by: Jan Blunck <jblunck@infradead.org>\n---\n drivers/net/virtio/virtio_ethdev.c | 12 +++++++-----\n drivers/net/virtio/virtio_pci.h    |  6 ++++++\n 2 files changed, 13 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 741688e..da9668e 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1162,7 +1162,7 @@ virtio_interrupt_handler(__rte_unused struct rte_intr_handle *handle,\n \tisr = vtpci_isr(hw);\n \tPMD_DRV_LOG(INFO, \"interrupt status = %#x\", isr);\n \n-\tif (rte_intr_enable(&dev->pci_dev->intr_handle) < 0)\n+\tif (rte_intr_enable(vtpci_intr_handle(hw)) < 0)\n \t\tPMD_DRV_LOG(ERR, \"interrupt enable failed\");\n \n \tif (isr & VIRTIO_PCI_ISR_CONFIG) {\n@@ -1334,7 +1334,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)\n \n \t/* Setup interrupt callback  */\n \tif (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)\n-\t\trte_intr_callback_register(&pci_dev->intr_handle,\n+\t\trte_intr_callback_register(vtpci_intr_handle(hw),\n \t\t\tvirtio_interrupt_handler, eth_dev);\n \n \treturn 0;\n@@ -1344,6 +1344,7 @@ static int\n eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)\n {\n \tstruct rte_pci_device *pci_dev;\n+\tstruct virtio_hw *hw = eth_dev->data->dev_private;\n \n \tPMD_INIT_FUNC_TRACE();\n \n@@ -1363,7 +1364,7 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)\n \n \t/* reset interrupt callback  */\n \tif (eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)\n-\t\trte_intr_callback_unregister(&pci_dev->intr_handle,\n+\t\trte_intr_callback_unregister(vtpci_intr_handle(hw),\n \t\t\t\t\t\tvirtio_interrupt_handler,\n \t\t\t\t\t\teth_dev);\n \trte_eal_pci_unmap_device(pci_dev);\n@@ -1481,7 +1482,7 @@ virtio_dev_start(struct rte_eth_dev *dev)\n \t\t\treturn -ENOTSUP;\n \t\t}\n \n-\t\tif (rte_intr_enable(&dev->pci_dev->intr_handle) < 0) {\n+\t\tif (rte_intr_enable(vtpci_intr_handle(hw)) < 0) {\n \t\t\tPMD_DRV_LOG(ERR, \"interrupt enable failed\");\n \t\t\treturn -EIO;\n \t\t}\n@@ -1573,12 +1574,13 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)\n static void\n virtio_dev_stop(struct rte_eth_dev *dev)\n {\n+\tstruct virtio_hw *hw = dev->data->dev_private;\n \tstruct rte_eth_link link;\n \n \tPMD_INIT_LOG(DEBUG, \"stop\");\n \n \tif (dev->data->dev_conf.intr_conf.lsc)\n-\t\trte_intr_disable(&dev->pci_dev->intr_handle);\n+\t\trte_intr_disable(vtpci_intr_handle(hw));\n \n \tmemset(&link, 0, sizeof(link));\n \tvirtio_dev_atomic_write_link_status(dev, &link);\ndiff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h\nindex de271bf..5373e39 100644\n--- a/drivers/net/virtio/virtio_pci.h\n+++ b/drivers/net/virtio/virtio_pci.h\n@@ -317,4 +317,10 @@ uint8_t vtpci_isr(struct virtio_hw *);\n \n uint16_t vtpci_irq_config(struct virtio_hw *, uint16_t);\n \n+static inline struct rte_intr_handle *\n+vtpci_intr_handle(struct virtio_hw *hw)\n+{\n+\treturn hw->dev ? &hw->dev->intr_handle : NULL;\n+}\n+\n #endif /* _VIRTIO_PCI_H_ */\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "5/8"
    ]
}