get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 3826,
    "url": "http://patches.dpdk.org/api/patches/3826/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1425396230-13379-4-git-send-email-thomas.monjalon@6wind.com/",
    "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": "<1425396230-13379-4-git-send-email-thomas.monjalon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1425396230-13379-4-git-send-email-thomas.monjalon@6wind.com",
    "date": "2015-03-03T15:23:46",
    "name": "[dpdk-dev,3/7] virtio: fix build with mempool debug enabled",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "449bb822f1fd5ae9fa1f1c75df2ce9649ab942b6",
    "submitter": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/people/1/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas.monjalon@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1425396230-13379-4-git-send-email-thomas.monjalon@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/3826/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/3826/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 F301C6942;\n\tTue,  3 Mar 2015 16:24:35 +0100 (CET)",
            "from mail-wi0-f179.google.com (mail-wi0-f179.google.com\n\t[209.85.212.179]) by dpdk.org (Postfix) with ESMTP id E7D006849\n\tfor <dev@dpdk.org>; Tue,  3 Mar 2015 16:24:33 +0100 (CET)",
            "by wiwl15 with SMTP id l15so23583711wiw.3\n\tfor <dev@dpdk.org>; Tue, 03 Mar 2015 07:24:33 -0800 (PST)",
            "from localhost.localdomain (136-92-190-109.dsl.ovh.fr.\n\t[109.190.92.136]) by mx.google.com with ESMTPSA id\n\tgf11sm2889236wic.18.2015.03.03.07.24.31 for <dev@dpdk.org>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 03 Mar 2015 07:24:33 -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:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-type:content-transfer-encoding;\n\tbh=FbJb/XIx093/tjypwcO4G06OXgpdUwILSFhYYBm40GM=;\n\tb=JM9ATwrNjMztVhrh0mkzLQH2WlkDQUlX2TgsQ3hjc0fudXdW8Pm3s0WrcSsYGrDyIx\n\tu9asSwYnxhVxlOT63kTLXGG+7etbb/bkNQ6JbS8m5Da+zWPUXDikkX5cR388gP7E1o6a\n\tIlr0oB6JbUjmMHKzC5gyG9N4ATew5pngpo3ukJuwofez8cilSm7Xr2olC81MkMIkU3t6\n\tI1i2DjgLF/csrL7wqEAC0yMDi0qYLunJfVENzZ/Hmv8HWvIjs/xJBTIPW/AigZJjPbSB\n\tWIpyyK/9nO7jx5svYtSuVtPaiqKsaTn5f6YEdx2EErl3Nt00UdyyIdDLcLxD2Tr0g0fn\n\tLDNw==",
        "X-Gm-Message-State": "ALoCoQn9gj9EwgzsyKhX+PwtyEdCGbntbIAqQ+awoPlQYwPVkTTRDIUILEF6+2flDv7BXWIbkkhe",
        "X-Received": "by 10.194.61.100 with SMTP id o4mr71176459wjr.28.1425396273833; \n\tTue, 03 Mar 2015 07:24:33 -0800 (PST)",
        "From": "Thomas Monjalon <thomas.monjalon@6wind.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  3 Mar 2015 16:23:46 +0100",
        "Message-Id": "<1425396230-13379-4-git-send-email-thomas.monjalon@6wind.com>",
        "X-Mailer": "git-send-email 2.2.2",
        "In-Reply-To": "<1425396230-13379-1-git-send-email-thomas.monjalon@6wind.com>",
        "References": "<1425396230-13379-1-git-send-email-thomas.monjalon@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 3/7] virtio: fix build with mempool debug enabled",
        "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": "The mempool header forces error on -Wcast-qual:\n\terror: cast discards ‘const’ qualifier from pointer target type\n\nLet's fix it by removing const qualifier of pci driver from commit\n\t5e9f6d1340ff (\"pci: reference driver structure for each device\")\nIt's needed because the driver flags are changed depending on using uio or not.\nActually these driver flags should be directly attached to each device.\n\nFixes: da978dfdc43b (\"virtio: use port IO to get PCI resource\")\n\nSigned-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>\n---\n lib/librte_eal/common/include/rte_pci.h | 2 +-\n lib/librte_pmd_virtio/Makefile          | 2 --\n lib/librte_pmd_virtio/virtio_ethdev.c   | 8 ++------\n 3 files changed, 3 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h\nindex b9cdf8b..995f814 100644\n--- a/lib/librte_eal/common/include/rte_pci.h\n+++ b/lib/librte_eal/common/include/rte_pci.h\n@@ -158,7 +158,7 @@ struct rte_pci_device {\n \tstruct rte_pci_id id;                   /**< PCI ID. */\n \tstruct rte_pci_resource mem_resource[PCI_MAX_RESOURCE];   /**< PCI Memory Resource */\n \tstruct rte_intr_handle intr_handle;     /**< Interrupt handle */\n-\tconst struct rte_pci_driver *driver;    /**< Associated driver */\n+\tstruct rte_pci_driver *driver;          /**< Associated driver */\n \tuint16_t max_vfs;                       /**< sriov enable if not zero */\n \tint numa_node;                          /**< NUMA node connection */\n \tstruct rte_devargs *devargs;            /**< Device user arguments */\ndiff --git a/lib/librte_pmd_virtio/Makefile b/lib/librte_pmd_virtio/Makefile\nindex 0baaf46..793067f 100644\n--- a/lib/librte_pmd_virtio/Makefile\n+++ b/lib/librte_pmd_virtio/Makefile\n@@ -57,6 +57,4 @@ DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_eal lib/librte_ether\n DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_mempool lib/librte_mbuf\n DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_net lib/librte_malloc\n \n-CFLAGS_virtio_ethdev.o += -Wno-cast-qual\n-\n include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c\nindex 88ecd57..4bad1e4 100644\n--- a/lib/librte_pmd_virtio/virtio_ethdev.c\n+++ b/lib/librte_pmd_virtio/virtio_ethdev.c\n@@ -938,8 +938,6 @@ static int virtio_resource_init_by_uio(struct rte_pci_device *pci_dev)\n \tchar filename[PATH_MAX];\n \tunsigned long start, size;\n \tunsigned int uio_num;\n-\tstruct rte_pci_driver *pci_drv =\n-\t\t\t(struct rte_pci_driver *)pci_dev->driver;\n \n \tif (get_uio_dev(&pci_dev->addr, dirname, sizeof(dirname), &uio_num) < 0)\n \t\treturn -1;\n@@ -978,7 +976,7 @@ static int virtio_resource_init_by_uio(struct rte_pci_device *pci_dev)\n \t}\n \n \tpci_dev->intr_handle.type = RTE_INTR_HANDLE_UIO;\n-\tpci_drv->drv_flags |= RTE_PCI_DRV_INTR_LSC;\n+\tpci_dev->driver->drv_flags |= RTE_PCI_DRV_INTR_LSC;\n \n \treturn 0;\n }\n@@ -993,8 +991,6 @@ static int virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev)\n \tchar pci_id[16];\n \tint found = 0;\n \tsize_t linesz;\n-\tstruct rte_pci_driver *pci_drv =\n-\t\t\t(struct rte_pci_driver *)pci_dev->driver;\n \n \tsnprintf(pci_id, sizeof(pci_id), PCI_PRI_FMT,\n \t\t pci_dev->addr.domain,\n@@ -1046,7 +1042,7 @@ static int virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev)\n \t\tstart, size);\n \n \t/* can't support lsc interrupt without uio */\n-\tpci_drv->drv_flags &= ~RTE_PCI_DRV_INTR_LSC;\n+\tpci_dev->driver->drv_flags &= ~RTE_PCI_DRV_INTR_LSC;\n \n \treturn 0;\n }\n",
    "prefixes": [
        "dpdk-dev",
        "3/7"
    ]
}