get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 36931,
    "url": "https://patches.dpdk.org/api/patches/36931/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1522751639-2315-2-git-send-email-jia.guo@intel.com/",
    "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": "<1522751639-2315-2-git-send-email-jia.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1522751639-2315-2-git-send-email-jia.guo@intel.com",
    "date": "2018-04-03T10:33:56",
    "name": "[dpdk-dev,V18,1/4] eal: add device event handle in interrupt thread",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "167672b83caeeb72af898f2e93b506949ab89a9e",
    "submitter": {
        "id": 507,
        "url": "https://patches.dpdk.org/api/people/507/?format=api",
        "name": "Guo, Jia",
        "email": "jia.guo@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1522751639-2315-2-git-send-email-jia.guo@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/36931/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/36931/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 223691B6EE;\n\tTue,  3 Apr 2018 12:35:07 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id A3E1B1B6D5\n\tfor <dev@dpdk.org>; Tue,  3 Apr 2018 12:35:03 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Apr 2018 03:35:03 -0700",
            "from jeffguo-z170x-ud5.sh.intel.com (HELO localhost.localdomain)\n\t([10.67.104.10])\n\tby fmsmga004.fm.intel.com with ESMTP; 03 Apr 2018 03:35:01 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.48,400,1517904000\"; d=\"scan'208\";a=\"42986475\"",
        "From": "Jeff Guo <jia.guo@intel.com>",
        "To": "stephen@networkplumber.org, bruce.richardson@intel.com,\n\tferruh.yigit@intel.com, konstantin.ananyev@intel.com,\n\tgaetan.rivet@6wind.com, jingjing.wu@intel.com, thomas@monjalon.net,\n\tmotih@mellanox.com, harry.van.haaren@intel.com, jianfeng.tan@intel.com",
        "Cc": "jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org,\n\tjia.guo@intel.com, helin.zhang@intel.com",
        "Date": "Tue,  3 Apr 2018 18:33:56 +0800",
        "Message-Id": "<1522751639-2315-2-git-send-email-jia.guo@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1522751639-2315-1-git-send-email-jia.guo@intel.com>",
        "References": "<1522339205-27698-5-git-send-email-jia.guo@intel.com>\n\t<1522751639-2315-1-git-send-email-jia.guo@intel.com>",
        "Subject": "[dpdk-dev] [PATCH V18 1/4] eal: add device event handle in\n\tinterrupt thread",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://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": "<https://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": "Add new interrupt handle type of RTE_INTR_HANDLE_DEV_EVENT, for\ndevice event interrupt monitor.\n\nSigned-off-by: Jeff Guo <jia.guo@intel.com>\n---\nv18->v17:\nno change.\n---\n lib/librte_eal/common/include/rte_eal_interrupts.h |  1 +\n lib/librte_eal/linuxapp/eal/eal_interrupts.c       | 11 +++++-\n test/test/test_interrupts.c                        | 39 ++++++++++++++++++++--\n 3 files changed, 48 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_eal_interrupts.h b/lib/librte_eal/common/include/rte_eal_interrupts.h\nindex 3f792a9..6eb4932 100644\n--- a/lib/librte_eal/common/include/rte_eal_interrupts.h\n+++ b/lib/librte_eal/common/include/rte_eal_interrupts.h\n@@ -34,6 +34,7 @@ enum rte_intr_handle_type {\n \tRTE_INTR_HANDLE_ALARM,        /**< alarm handle */\n \tRTE_INTR_HANDLE_EXT,          /**< external handler */\n \tRTE_INTR_HANDLE_VDEV,         /**< virtual device */\n+\tRTE_INTR_HANDLE_DEV_EVENT,    /**< device event handle */\n \tRTE_INTR_HANDLE_MAX           /**< count of elements */\n };\n \ndiff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c\nindex f86f22f..58e9328 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c\n@@ -559,6 +559,9 @@ rte_intr_enable(const struct rte_intr_handle *intr_handle)\n \t\t\treturn -1;\n \t\tbreak;\n #endif\n+\t/* not used at this moment */\n+\tcase RTE_INTR_HANDLE_DEV_EVENT:\n+\t\treturn -1;\n \t/* unknown handle type */\n \tdefault:\n \t\tRTE_LOG(ERR, EAL,\n@@ -606,6 +609,9 @@ rte_intr_disable(const struct rte_intr_handle *intr_handle)\n \t\t\treturn -1;\n \t\tbreak;\n #endif\n+\t/* not used at this moment */\n+\tcase RTE_INTR_HANDLE_DEV_EVENT:\n+\t\treturn -1;\n \t/* unknown handle type */\n \tdefault:\n \t\tRTE_LOG(ERR, EAL,\n@@ -674,7 +680,10 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)\n \t\t\tbytes_read = 0;\n \t\t\tcall = true;\n \t\t\tbreak;\n-\n+\t\tcase RTE_INTR_HANDLE_DEV_EVENT:\n+\t\t\tbytes_read = 0;\n+\t\t\tcall = true;\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\tbytes_read = 1;\n \t\t\tbreak;\ndiff --git a/test/test/test_interrupts.c b/test/test/test_interrupts.c\nindex 31a70a0..7f4f1b4 100644\n--- a/test/test/test_interrupts.c\n+++ b/test/test/test_interrupts.c\n@@ -20,6 +20,7 @@ enum test_interrupt_handle_type {\n \tTEST_INTERRUPT_HANDLE_VALID,\n \tTEST_INTERRUPT_HANDLE_VALID_UIO,\n \tTEST_INTERRUPT_HANDLE_VALID_ALARM,\n+\tTEST_INTERRUPT_HANDLE_VALID_DEV_EVENT,\n \tTEST_INTERRUPT_HANDLE_CASE1,\n \tTEST_INTERRUPT_HANDLE_MAX\n };\n@@ -80,6 +81,10 @@ test_interrupt_init(void)\n \tintr_handles[TEST_INTERRUPT_HANDLE_VALID_ALARM].type =\n \t\t\t\t\tRTE_INTR_HANDLE_ALARM;\n \n+\tintr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT].fd = pfds.readfd;\n+\tintr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT].type =\n+\t\t\t\t\tRTE_INTR_HANDLE_DEV_EVENT;\n+\n \tintr_handles[TEST_INTERRUPT_HANDLE_CASE1].fd = pfds.writefd;\n \tintr_handles[TEST_INTERRUPT_HANDLE_CASE1].type = RTE_INTR_HANDLE_UIO;\n \n@@ -250,6 +255,14 @@ test_interrupt_enable(void)\n \t\treturn -1;\n \t}\n \n+\t/* check with specific valid intr_handle */\n+\ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT];\n+\tif (rte_intr_enable(&test_intr_handle) == 0) {\n+\t\tprintf(\"unexpectedly enable a specific intr_handle \"\n+\t\t\t\"successfully\\n\");\n+\t\treturn -1;\n+\t}\n+\n \t/* check with valid handler and its type */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_CASE1];\n \tif (rte_intr_enable(&test_intr_handle) < 0) {\n@@ -306,6 +319,14 @@ test_interrupt_disable(void)\n \t\treturn -1;\n \t}\n \n+\t/* check with specific valid intr_handle */\n+\ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT];\n+\tif (rte_intr_disable(&test_intr_handle) == 0) {\n+\t\tprintf(\"unexpectedly disable a specific intr_handle \"\n+\t\t\t\"successfully\\n\");\n+\t\treturn -1;\n+\t}\n+\n \t/* check with valid handler and its type */\n \ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_CASE1];\n \tif (rte_intr_disable(&test_intr_handle) < 0) {\n@@ -393,9 +414,17 @@ test_interrupt(void)\n \t\tgoto out;\n \t}\n \n+\tprintf(\"Check valid device event interrupt full path\\n\");\n+\tif (test_interrupt_full_path_check(\n+\t\tTEST_INTERRUPT_HANDLE_VALID_DEVICE_EVENT) < 0) {\n+\t\tprintf(\"failure occurred during checking valid device event \"\n+\t\t\t\t\t\t\"interrupt full path\\n\");\n+\t\tgoto out;\n+\t}\n+\n \tprintf(\"Check valid alarm interrupt full path\\n\");\n-\tif (test_interrupt_full_path_check(TEST_INTERRUPT_HANDLE_VALID_ALARM)\n-\t\t\t\t\t\t\t\t\t< 0) {\n+\tif (test_interrupt_full_path_check(\n+\t\tTEST_INTERRUPT_HANDLE_VALID_DEV_EVENT) < 0) {\n \t\tprintf(\"failure occurred during checking valid alarm \"\n \t\t\t\t\t\t\"interrupt full path\\n\");\n \t\tgoto out;\n@@ -513,6 +542,12 @@ test_interrupt(void)\n \trte_intr_callback_unregister(&test_intr_handle,\n \t\t\ttest_interrupt_callback_1, (void *)-1);\n \n+\ttest_intr_handle = intr_handles[TEST_INTERRUPT_HANDLE_VALID_DEV_EVENT];\n+\trte_intr_callback_unregister(&test_intr_handle,\n+\t\t\ttest_interrupt_callback, (void *)-1);\n+\trte_intr_callback_unregister(&test_intr_handle,\n+\t\t\ttest_interrupt_callback_1, (void *)-1);\n+\n \trte_delay_ms(2 * TEST_INTERRUPT_CHECK_INTERVAL);\n \t/* deinit */\n \ttest_interrupt_deinit();\n",
    "prefixes": [
        "dpdk-dev",
        "V18",
        "1/4"
    ]
}