get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 92621,
    "url": "http://patches.dpdk.org/api/patches/92621/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210502023333.30351-3-dmitry.kozliuk@gmail.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": "<20210502023333.30351-3-dmitry.kozliuk@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210502023333.30351-3-dmitry.kozliuk@gmail.com",
    "date": "2021-05-02T02:33:33",
    "name": "[3/3] eal/windows: cleanup interrupt resources",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9983f7c17549f31b8e6091e9664a35f14cd2b9cc",
    "submitter": {
        "id": 1581,
        "url": "http://patches.dpdk.org/api/people/1581/?format=api",
        "name": "Dmitry Kozlyuk",
        "email": "dmitry.kozliuk@gmail.com"
    },
    "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/20210502023333.30351-3-dmitry.kozliuk@gmail.com/mbox/",
    "series": [
        {
            "id": 16786,
            "url": "http://patches.dpdk.org/api/series/16786/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16786",
            "date": "2021-05-02T02:33:31",
            "name": "[1/3] eal/windows: fix use of incorrect thread ID",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/16786/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/92621/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/92621/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8498FA0524;\n\tSun,  2 May 2021 04:33:57 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E0DC84114C;\n\tSun,  2 May 2021 04:33:45 +0200 (CEST)",
            "from mail-lj1-f173.google.com (mail-lj1-f173.google.com\n [209.85.208.173])\n by mails.dpdk.org (Postfix) with ESMTP id 8E1CB4110B;\n Sun,  2 May 2021 04:33:44 +0200 (CEST)",
            "by mail-lj1-f173.google.com with SMTP id p12so2786118ljg.1;\n Sat, 01 May 2021 19:33:44 -0700 (PDT)",
            "from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru.\n [37.110.65.23])\n by smtp.gmail.com with ESMTPSA id w26sm716970lfn.82.2021.05.01.19.33.43\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 01 May 2021 19:33:43 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=HObbVr9jgvknTt2fY6BcYddgNt9hTercuLIdk6hNN7Y=;\n b=X06i5q7UG/J9kxTNEr2/BWWkdxHe7Wq8EbmSuJ3/RUDL1l3Gerwqde74483X74rNa3\n J7VhG9g7Nm0jiAcW7J/SwO1Pj8DJKSwdGP1JXXry/p5ZAqK2PvmDF2KfGIzcieDV0pzQ\n vnSrZIjQKTBdipfulI/E1BXNWyl6R02BGnb8CIuJj9uXt83Zsr2z8lLCdYH2XvbsOzoz\n dcU+h2Xp/wZHmlsHmolFkr87fQM7f6uJb8MwQxTBA+rSTTTunaMl4XXbRLvYqWOYD4Xw\n tyWMR9ctgEdc5cIdAeUASn8mLsYFdrs5CrI2XqIubcRjZKfyCcksYB5dh0zKy9cufru/\n RKKw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=HObbVr9jgvknTt2fY6BcYddgNt9hTercuLIdk6hNN7Y=;\n b=nbYRtSlmTcZbFz1ec8CCGxo9yL4uzgZvOFYilYDUCOksg0vzwmr8VABkVUxNU0yALq\n PkFerHb4N5F21Hsnn1UlzUM8ekBbX9xZQkgdYtDoRo5Q8b9w1mLdMy62PF2F8eJ/4Z54\n /+Ts7V6zVsFwHuDBwpLooHjYiUUCthmBOdssSoUpBYEIc+Pn7KA3E+VjnpQcqr89pw02\n 4l2x7d65ji4JqvXJjCn6mlq11+qgJbAc6m1gQ3WLx6rb02oqG3Ql8meFuERbTCiE9nM6\n rVUDO/19sKRgcTgGSID4BP/PO8TLWNlILNnuEsPGM2iQTmMIFC0TwsdnhsEAq/I2LoBE\n AN7A==",
        "X-Gm-Message-State": "AOAM5332FaaMzJmcW73nGRUvUYzrCLmkOVR+BGfFO9J31W90DwpCN+HZ\n HNdaNeghs09zklkZ7u+U4SHwG0PkebN0PA==",
        "X-Google-Smtp-Source": "\n ABdhPJy42cYLzXdW/EO+NVz2PcbeYEaagEMXS976jdMxxfKSVdNoGfsb2cwh0B3/ZyLqPkJOVB3eng==",
        "X-Received": "by 2002:a2e:1409:: with SMTP id u9mr8644128ljd.155.1619922823897;\n Sat, 01 May 2021 19:33:43 -0700 (PDT)",
        "From": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>, stable@dpdk.org,\n Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,\n Dmitry Malloy <dmitrym@microsoft.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>, Harman Kalra <hkalra@marvell.com>",
        "Date": "Sun,  2 May 2021 05:33:33 +0300",
        "Message-Id": "<20210502023333.30351-3-dmitry.kozliuk@gmail.com>",
        "X-Mailer": "git-send-email 2.29.3",
        "In-Reply-To": "<20210502023333.30351-1-dmitry.kozliuk@gmail.com>",
        "References": "<20210502023333.30351-1-dmitry.kozliuk@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 3/3] eal/windows: cleanup interrupt resources",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Interrupt manager in Windows EAL allocates on IOCP and starts\na control thread that runs indefinitely. At DPDK cleanup\nthis thread was not stopped and IOCP handle was not closed.\n\nGracefully stop interrupt-handling in rte_eal_cleanup().\nThe thread already closes IOCP handle before exiting.\n\nFixes: 5c016fc0205a (\"eal/windows: add interrupt thread skeleton\")\nCc: stable@dpdk.org\n\nSigned-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>\n---\n lib/eal/windows/eal.c            |  1 +\n lib/eal/windows/eal_interrupts.c | 26 ++++++++++++++++++++++++--\n lib/eal/windows/eal_windows.h    |  5 +++++\n 3 files changed, 30 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c\nindex 28c787c0b0..25afc42f8e 100644\n--- a/lib/eal/windows/eal.c\n+++ b/lib/eal/windows/eal.c\n@@ -258,6 +258,7 @@ rte_eal_cleanup(void)\n {\n \tstruct internal_config *internal_conf =\n \t\teal_get_internal_configuration();\n+\teal_intr_thread_cancel();\n \t/* after this point, any DPDK pointers will become dangling */\n \trte_eal_memory_detach();\n \teal_cleanup_config(internal_conf);\ndiff --git a/lib/eal/windows/eal_interrupts.c b/lib/eal/windows/eal_interrupts.c\nindex f24ed6e54e..bb0585cb34 100644\n--- a/lib/eal/windows/eal_interrupts.c\n+++ b/lib/eal/windows/eal_interrupts.c\n@@ -7,6 +7,8 @@\n #include \"eal_private.h\"\n #include \"eal_windows.h\"\n \n+#define IOCP_KEY_SHUTDOWN UINT32_MAX\n+\n static pthread_t intr_thread;\n \n static HANDLE intr_iocp;\n@@ -34,12 +36,14 @@ eal_intr_thread_handle_init(void)\n static void *\n eal_intr_thread_main(LPVOID arg __rte_unused)\n {\n+\tbool finished = false;\n+\n \tif (eal_intr_thread_handle_init() < 0) {\n \t\tRTE_LOG(ERR, EAL, \"Cannot open interrupt thread handle\\n\");\n \t\tgoto cleanup;\n \t}\n \n-\twhile (1) {\n+\twhile (!finished) {\n \t\tOVERLAPPED_ENTRY events[16];\n \t\tULONG event_count, i;\n \t\tBOOL result;\n@@ -61,8 +65,13 @@ eal_intr_thread_main(LPVOID arg __rte_unused)\n \t\t\tcontinue;\n \t\t}\n \n-\t\tfor (i = 0; i < event_count; i++)\n+\t\tfor (i = 0; i < event_count; i++) {\n+\t\t\tif (events[i].lpCompletionKey == IOCP_KEY_SHUTDOWN) {\n+\t\t\t\tfinished = true;\n+\t\t\t\tbreak;\n+\t\t\t}\n \t\t\teal_intr_process(&events[i]);\n+\t\t}\n \t}\n \n \tCloseHandle(intr_thread_handle);\n@@ -125,6 +134,19 @@ eal_intr_thread_schedule(void (*func)(void *arg), void *arg)\n \treturn 0;\n }\n \n+void\n+eal_intr_thread_cancel(void)\n+{\n+\tif (!PostQueuedCompletionStatus(\n+\t\t\tintr_iocp, 0, IOCP_KEY_SHUTDOWN, NULL)) {\n+\t\tRTE_LOG_WIN32_ERR(\"PostQueuedCompletionStatus()\");\n+\t\tRTE_LOG(ERR, EAL, \"Cannot cancel interrupt thread\\n\");\n+\t\treturn;\n+\t}\n+\n+\tWaitForSingleObject(intr_thread_handle, INFINITE);\n+}\n+\n int\n rte_intr_callback_register(\n \t__rte_unused const struct rte_intr_handle *intr_handle,\ndiff --git a/lib/eal/windows/eal_windows.h b/lib/eal/windows/eal_windows.h\nindex 478accc1b9..7cc811485d 100644\n--- a/lib/eal/windows/eal_windows.h\n+++ b/lib/eal/windows/eal_windows.h\n@@ -67,6 +67,11 @@ unsigned int eal_socket_numa_node(unsigned int socket_id);\n  */\n int eal_intr_thread_schedule(void (*func)(void *arg), void *arg);\n \n+/**\n+ * Request interrupt thread to stop and wait its termination.\n+ */\n+void eal_intr_thread_cancel(void);\n+\n /**\n  * Open virt2phys driver interface device.\n  *\n",
    "prefixes": [
        "3/3"
    ]
}