get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 4391,
    "url": "http://patches.dpdk.org/api/patches/4391/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1429554771-32365-1-git-send-email-stephen@networkplumber.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": "<1429554771-32365-1-git-send-email-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1429554771-32365-1-git-send-email-stephen@networkplumber.org",
    "date": "2015-04-20T18:32:51",
    "name": "[dpdk-dev] vfio: don't silently drop VFIO support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e5bd53a9654658a74945cc63fb222ad7d6f4c784",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1429554771-32365-1-git-send-email-stephen@networkplumber.org/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/4391/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/4391/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 B2CEC5A8A;\n\tMon, 20 Apr 2015 20:33:04 +0200 (CEST)",
            "from mail-pd0-f181.google.com (mail-pd0-f181.google.com\n\t[209.85.192.181]) by dpdk.org (Postfix) with ESMTP id 2D9475A8A\n\tfor <dev@dpdk.org>; Mon, 20 Apr 2015 20:33:03 +0200 (CEST)",
            "by pdbqd1 with SMTP id qd1so215788883pdb.2\n\tfor <dev@dpdk.org>; Mon, 20 Apr 2015 11:33:02 -0700 (PDT)",
            "from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net.\n\t[50.53.82.155]) by mx.google.com with ESMTPSA id\n\tqc9sm19013922pab.19.2015.04.20.11.33.01\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 20 Apr 2015 11:33:01 -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:from:to:cc:subject:date:message-id;\n\tbh=NuIDU2j5+3aF3MY/tzLNzvQPs+w0pqkIuPi7WndyfzE=;\n\tb=h8Qxbmt4MIovcgA3YiyviIxVV8UvBywQF0J9xBhsOz7Fh4cJFBMwHlRNlmNEYNZPnG\n\t5tb+S27gROVKAahMcZ8A2CcfOq24nAmHAqC1kD1I+/QUrIh9L+d6FyYhS3FoTBKsb5P2\n\tBJKscupH0rk3cun3kmRYMXo5FC6AlU0uuEsZ/C1RS8UCwllupVdwG36nrl8Kp9HQOmSZ\n\tBX8jXumHz0e7Ah7U7nLbTLucYdpSF69vih2gdVGeyvR2C/OOKCtsdsy8LK4W3exnSDPZ\n\tTd9cptqv2ckDUJw3v4F4E/0iajkBcyDw4F/xdj5UCaq9Cojo32wK/eUVzQu78bvfGipV\n\tsXJw==",
        "X-Gm-Message-State": "ALoCoQnv0ztqJVdrYg4jOwTliCyKYvfvfCY2DRnwX2Bpv6TWqlxYLGKcARgCzmA+UmlQlX5Hjn6W",
        "X-Received": "by 10.68.239.199 with SMTP id vu7mr29920756pbc.113.1429554782616;\n\tMon, 20 Apr 2015 11:33:02 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Date": "Mon, 20 Apr 2015 11:32:51 -0700",
        "Message-Id": "<1429554771-32365-1-git-send-email-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.1.4",
        "Subject": "[dpdk-dev] [PATCH] vfio: don't silently drop VFIO support",
        "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 VFIO_PRESENT #define was a landmine and we hit it.\nThe DPDK has a config system and it should be used rather than\nsilently dropping a feature during build only to have it fail at\nrun time.\n\nIf VFIO is configured, and the kernel headers are not present\nthe build should fail. Rather than leaving developers puzzling\nwhy the build system (with old kernel headers) produced non\nfunctioning DPDK and their system (with new kernel headers) produced\ncorrectly working DPDK.\n\nAs a matter of policy, really no code should be looking at\n<linux/version.h> except for kernel drivers with compat files.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_eal/linuxapp/eal/Makefile               |  4 ++--\n lib/librte_eal/linuxapp/eal/eal_interrupts.c       | 10 +++++-----\n lib/librte_eal/linuxapp/eal/eal_pci.c              |  4 ++--\n lib/librte_eal/linuxapp/eal/eal_pci_init.h         |  2 +-\n lib/librte_eal/linuxapp/eal/eal_pci_vfio.c         |  3 ---\n lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c |  3 ---\n lib/librte_eal/linuxapp/eal/eal_vfio.h             |  1 -\n 7 files changed, 10 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile\nindex 01f7b70..abaf0da 100644\n--- a/lib/librte_eal/linuxapp/eal/Makefile\n+++ b/lib/librte_eal/linuxapp/eal/Makefile\n@@ -64,8 +64,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_thread.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_log.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci_uio.c\n-SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci_vfio.c\n-SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci_vfio_mp_sync.c\n+SRCS-$(CONFIG_RTE_EAL_VFIO) += eal_pci_vfio.c\n+SRCS-$(CONFIG_RTE_EAL_VFIO) += eal_pci_vfio_mp_sync.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_debug.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_lcore.c\n SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_timer.c\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c\nindex 66deda2..55f41d2 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c\n@@ -87,7 +87,7 @@ union intr_pipefds{\n  */\n union rte_intr_read_buffer {\n \tint uio_intr_count;              /* for uio device */\n-#ifdef VFIO_PRESENT\n+#ifdef RTE_EAL_VFIO\n \tuint64_t vfio_intr_count;        /* for vfio device */\n #endif\n \tuint64_t timerfd_num;            /* for timerfd */\n@@ -123,7 +123,7 @@ static struct rte_intr_source_list intr_sources;\n static pthread_t intr_thread;\n \n /* VFIO interrupts */\n-#ifdef VFIO_PRESENT\n+#ifdef RTE_EAL_VFIO\n \n #define IRQ_SET_BUF_LEN  (sizeof(struct vfio_irq_set) + sizeof(int))\n \n@@ -559,7 +559,7 @@ rte_intr_enable(struct rte_intr_handle *intr_handle)\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_ALARM:\n \t\treturn -1;\n-#ifdef VFIO_PRESENT\n+#ifdef RTE_EAL_VFIO\n \tcase RTE_INTR_HANDLE_VFIO_MSIX:\n \t\tif (vfio_enable_msix(intr_handle))\n \t\t\treturn -1;\n@@ -599,7 +599,7 @@ rte_intr_disable(struct rte_intr_handle *intr_handle)\n \t/* not used at this moment */\n \tcase RTE_INTR_HANDLE_ALARM:\n \t\treturn -1;\n-#ifdef VFIO_PRESENT\n+#ifdef RTE_EAL_VFIO\n \tcase RTE_INTR_HANDLE_VFIO_MSIX:\n \t\tif (vfio_disable_msix(intr_handle))\n \t\t\treturn -1;\n@@ -667,7 +667,7 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)\n \t\tcase RTE_INTR_HANDLE_ALARM:\n \t\t\tbytes_read = sizeof(buf.timerfd_num);\n \t\t\tbreak;\n-#ifdef VFIO_PRESENT\n+#ifdef RTE_EAL_VFIO\n \t\tcase RTE_INTR_HANDLE_VFIO_MSIX:\n \t\tcase RTE_INTR_HANDLE_VFIO_MSI:\n \t\tcase RTE_INTR_HANDLE_VFIO_LEGACY:\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c\nindex 9cb0ffd..5bc0254 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c\n@@ -571,7 +571,7 @@ pci_map_device(struct rte_pci_device *dev)\n \t/* try mapping the NIC resources using VFIO if it exists */\n \tswitch (dev->kdrv) {\n \tcase RTE_KDRV_VFIO:\n-#ifdef VFIO_PRESENT\n+#ifdef RTE_EAL_VFIO\n \t\tif (pci_vfio_is_enabled())\n \t\t\tret = pci_vfio_map_resource(dev);\n #endif\n@@ -771,7 +771,7 @@ rte_eal_pci_init(void)\n \t\tRTE_LOG(ERR, EAL, \"%s(): Cannot scan PCI bus\\n\", __func__);\n \t\treturn -1;\n \t}\n-#ifdef VFIO_PRESENT\n+#ifdef RTE_EAL_VFIO\n \tpci_vfio_enable();\n \n \tif (pci_vfio_is_enabled()) {\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_pci_init.h b/lib/librte_eal/linuxapp/eal/eal_pci_init.h\nindex aa7b755..e285204 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci_init.h\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci_init.h\n@@ -78,7 +78,7 @@ void pci_unmap_resource(void *requested_addr, size_t size);\n void pci_uio_unmap_resource(struct rte_pci_device *dev);\n #endif /* RTE_LIBRTE_EAL_HOTPLUG */\n \n-#ifdef VFIO_PRESENT\n+#ifdef RTE_EAL_VFIO\n \n #define VFIO_MAX_GROUPS 64\n \ndiff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c\nindex aea1fb1..6a0fd08 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c\n@@ -59,8 +59,6 @@\n  * This file is only compiled if CONFIG_RTE_EAL_VFIO is set to \"y\".\n  */\n \n-#ifdef VFIO_PRESENT\n-\n #define PAGE_SIZE   (sysconf(_SC_PAGESIZE))\n #define PAGE_MASK   (~(PAGE_SIZE - 1))\n \n@@ -909,4 +907,3 @@ pci_vfio_is_enabled(void)\n {\n \treturn vfio_cfg.vfio_enabled;\n }\n-#endif\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c\nindex fec7080..657fc2c 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c\n@@ -62,8 +62,6 @@\n  * This file is only compiled if CONFIG_RTE_EAL_VFIO is set to \"y\".\n  */\n \n-#ifdef VFIO_PRESENT\n-\n #define SOCKET_PATH_FMT \"%s/.%s_mp_socket\"\n #define CMSGLEN (CMSG_LEN(sizeof(int)))\n #define FD_TO_CMSGHDR(fd, chdr) \\\n@@ -391,4 +389,3 @@ pci_vfio_mp_sync_setup(void)\n \treturn 0;\n }\n \n-#endif\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h\nindex 72ec3f6..0b4e362 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h\n+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h\n@@ -52,7 +52,6 @@\n #define RTE_PCI_MSIX_FLAGS_QSIZE  PCI_MSIX_FLAGS_QSIZE\n #endif\n \n-#define VFIO_PRESENT\n #endif /* kernel version */\n #endif /* RTE_EAL_VFIO */\n \n",
    "prefixes": [
        "dpdk-dev"
    ]
}