get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8309,
    "url": "http://patches.dpdk.org/api/patches/8309/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1446182873-28814-2-git-send-email-cunming.liang@intel.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": "<1446182873-28814-2-git-send-email-cunming.liang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446182873-28814-2-git-send-email-cunming.liang@intel.com",
    "date": "2015-10-30T05:27:43",
    "name": "[dpdk-dev,v2,01/11] eal/linux: vfio map misc intr to vector zero",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c596358ce9fb20f3e7e1a6d8307098a2b3d32db4",
    "submitter": {
        "id": 46,
        "url": "http://patches.dpdk.org/api/people/46/?format=api",
        "name": "Cunming Liang",
        "email": "cunming.liang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1446182873-28814-2-git-send-email-cunming.liang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/8309/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/8309/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 B48E28DAC;\n\tFri, 30 Oct 2015 06:28:13 +0100 (CET)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 13DD88DA8\n\tfor <dev@dpdk.org>; Fri, 30 Oct 2015 06:28:11 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga102.fm.intel.com with ESMTP; 29 Oct 2015 22:28:11 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga002.jf.intel.com with ESMTP; 29 Oct 2015 22:28:04 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t9U5S2ml023212;\n\tFri, 30 Oct 2015 13:28: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 t9U5RwFC028870; Fri, 30 Oct 2015 13:28:00 +0800",
            "(from cliang18@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9U5RwX0028866; \n\tFri, 30 Oct 2015 13:27:58 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,217,1444719600\"; d=\"scan'208\";a=\"838585685\"",
        "From": "Cunming Liang <cunming.liang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 30 Oct 2015 13:27:43 +0800",
        "Message-Id": "<1446182873-28814-2-git-send-email-cunming.liang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1446182873-28814-1-git-send-email-cunming.liang@intel.com>",
        "References": "<1443072831-19065-1-git-send-email-cunming.liang@intel.com>\n\t<1446182873-28814-1-git-send-email-cunming.liang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 01/11] eal/linux: vfio map misc intr to vector\n\tzero",
        "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": "During VFIO_DEVICE_SET_IRQS, the previous order is {Q0_fd, ... Qn_fd, misc_fd}.\nThe vector number of misc is indeterminable which is ugly to some NIC(e.g. i40e, fm10k).\nThe patch adjusts the order in {misc_fd, Q0_fd, ... Qn_fd}, always reserve the first vector to misc interrupt.\n\nSigned-off-by: Cunming Liang <cunming.liang@intel.com>\n---\n lib/librte_eal/linuxapp/eal/eal_interrupts.c           | 18 ++++++++++++------\n .../linuxapp/eal/include/exec-env/rte_interrupts.h     |  3 +++\n 2 files changed, 15 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c\nindex 078318c..8e76a7a 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c\n@@ -300,8 +300,10 @@ vfio_enable_msix(struct rte_intr_handle *intr_handle) {\n \tirq_set->index = VFIO_PCI_MSIX_IRQ_INDEX;\n \tirq_set->start = 0;\n \tfd_ptr = (int *) &irq_set->data;\n-\tmemcpy(fd_ptr, intr_handle->efds, sizeof(intr_handle->efds));\n-\tfd_ptr[intr_handle->max_intr - 1] = intr_handle->fd;\n+\tfd_ptr[MISC_VEC_ID] = intr_handle->fd;\n+\t/* follow up with misc(0) interrupt */\n+\tmemcpy(&fd_ptr[RX_VEC_START], intr_handle->efds,\n+\t\tsizeof(*intr_handle->efds) * intr_handle->nb_efd);\n \n \tret = ioctl(intr_handle->vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);\n \n@@ -1068,10 +1070,13 @@ rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, int epfd,\n \tstruct rte_epoll_event *rev;\n \tstruct rte_epoll_data *epdata;\n \tint epfd_op;\n+\tunsigned int efd_idx;\n \tint rc = 0;\n \n+\tefd_idx = (vec >= RX_VEC_START) ? (vec - RX_VEC_START) : vec;\n+\n \tif (!intr_handle || intr_handle->nb_efd == 0 ||\n-\t    vec >= intr_handle->nb_efd) {\n+\t    efd_idx >= intr_handle->nb_efd) {\n \t\tRTE_LOG(ERR, EAL, \"Wrong intr vector number.\\n\");\n \t\treturn -EPERM;\n \t}\n@@ -1079,7 +1084,7 @@ rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, int epfd,\n \tswitch (op) {\n \tcase RTE_INTR_EVENT_ADD:\n \t\tepfd_op = EPOLL_CTL_ADD;\n-\t\trev = &intr_handle->elist[vec];\n+\t\trev = &intr_handle->elist[efd_idx];\n \t\tif (rev->status != RTE_EPOLL_INVALID) {\n \t\t\tRTE_LOG(INFO, EAL, \"Event already been added.\\n\");\n \t\t\treturn -EEXIST;\n@@ -1091,7 +1096,8 @@ rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, int epfd,\n \t\tepdata->data   = data;\n \t\tepdata->cb_fun = (rte_intr_event_cb_t)eal_intr_proc_rxtx_intr;\n \t\tepdata->cb_arg = (void *)intr_handle;\n-\t\trc = rte_epoll_ctl(epfd, epfd_op, intr_handle->efds[vec], rev);\n+\t\trc = rte_epoll_ctl(epfd, epfd_op,\n+\t\t\t\t   intr_handle->efds[efd_idx], rev);\n \t\tif (!rc)\n \t\t\tRTE_LOG(DEBUG, EAL,\n \t\t\t\t\"efd %d associated with vec %d added on epfd %d\"\n@@ -1101,7 +1107,7 @@ rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, int epfd,\n \t\tbreak;\n \tcase RTE_INTR_EVENT_DEL:\n \t\tepfd_op = EPOLL_CTL_DEL;\n-\t\trev = &intr_handle->elist[vec];\n+\t\trev = &intr_handle->elist[efd_idx];\n \t\tif (rev->status == RTE_EPOLL_INVALID) {\n \t\t\tRTE_LOG(INFO, EAL, \"Event does not exist.\\n\");\n \t\t\treturn -EPERM;\ndiff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h\nindex 45071b7..b8fd318 100644\n--- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h\n+++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h\n@@ -77,6 +77,9 @@ struct rte_epoll_event {\n \tstruct rte_epoll_data epdata;\n };\n \n+#define MISC_VEC_ID                (0)\n+#define RX_VEC_START               (MISC_VEC_ID + 1)\n+\n /** Handle for interrupts. */\n struct rte_intr_handle {\n \tunion {\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "01/11"
    ]
}