get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 104280,
    "url": "https://patches.dpdk.org/api/patches/104280/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211113172257.6543-2-stephen@networkplumber.org/",
    "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": "<20211113172257.6543-2-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211113172257.6543-2-stephen@networkplumber.org",
    "date": "2021-11-13T17:22:53",
    "name": "[v6,1/5] eal: close log in eal_cleanup",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5e14cd35e4cd489ed116739931dd38777adf8983",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20211113172257.6543-2-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 20536,
            "url": "https://patches.dpdk.org/api/series/20536/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=20536",
            "date": "2021-11-13T17:22:52",
            "name": "cleanup more resources on eal_cleanup",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/20536/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/104280/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/104280/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 50889A0032;\n\tSat, 13 Nov 2021 18:23:08 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2DEDC410FA;\n\tSat, 13 Nov 2021 18:23:03 +0100 (CET)",
            "from mail-pf1-f180.google.com (mail-pf1-f180.google.com\n [209.85.210.180])\n by mails.dpdk.org (Postfix) with ESMTP id 09CD34013F\n for <dev@dpdk.org>; Sat, 13 Nov 2021 18:23:02 +0100 (CET)",
            "by mail-pf1-f180.google.com with SMTP id n26so6587241pff.3\n for <dev@dpdk.org>; Sat, 13 Nov 2021 09:23:01 -0800 (PST)",
            "from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123])\n by smtp.gmail.com with ESMTPSA id u19sm9658370pfl.185.2021.11.13.09.22.59\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 13 Nov 2021 09:23:00 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20210112.gappssmtp.com; s=20210112;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=oiWywhA3WofE4yHKF3rzYgZO+5QXk1lx/khQFCnptBk=;\n b=Ob+Y965IrfCVmT59+AWP48d7+i7jy+ZMpybYol04JJfYj01s761P0vhU5Ajohn3cDn\n oFwIaY+bYCJD+vOXxw56yiaLE6OZgOFwaTo73EIADOYPLsKRqdLaEPX7h+E8eT60L/aa\n Gh9+EYdopfXRD4yBCPCJT8DQqDpPoHtzNCQ/5GD854dIiP3YseYuoP8hmOZco3fxdvxZ\n VOAByPzqRLpoJ+uEzHiEEO2/hFc2vrajNscD0SXji0OQMsrOQQVIsVAFeNSr4c1ThE+e\n Sqo1Stn6A7+RIbcvOYenk9l45aQEjSaJnM8delTTBwH9D4P8eMNcGKZiuwNblaY0SJVt\n amRg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\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=oiWywhA3WofE4yHKF3rzYgZO+5QXk1lx/khQFCnptBk=;\n b=KRbfxY56cl6jL9oHpzRr97TKAwSxSd5LNPmWXHb+RjuUtnu+LCmZHBiJvG+vmtzbyX\n cq6LSKBsITI2D9XOduQ2xRNsCsd2r5MFY4faMNLgKS6+THVa4X9lZppYJXipBh1+P+NI\n 6BH7rABW7as6qGvfbiTiCtFKfOGkhHSuJrtWjHzevrLxtUIn2W7TqJ/zgDOHLPc8FSZ4\n j2YusNIXyq9kvKtkNc+jZ/df6ZPo93DBBQ47riA/aJOMUMBAh9lUAzPLKkB+2FZI0QCI\n tpLtcWTnv1U340fUBEPY5H9kGK+jDR2JhJc84FuO+vb97uuH+ISgYfsEVpoDQk4xZgsj\n zDkA==",
        "X-Gm-Message-State": "AOAM530lzY/qn/o+O2dA0vpF1NoN827CYPylDRQgUrIB+ie1P5/V2geT\n J4Pky5HyclDXr+InviITTYUmPN7eQx73gw==",
        "X-Google-Smtp-Source": "\n ABdhPJwZD/PFMWGHB6QhizEHCX8xTymCwOKStM+TvbLPLK/7/I9wzcogU+pK8florSTYgHk7vLxhCg==",
        "X-Received": "by 2002:a63:e214:: with SMTP id\n q20mr15693118pgh.431.1636824180778;\n Sat, 13 Nov 2021 09:23:00 -0800 (PST)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Subject": "[PATCH v6 1/5] eal: close log in eal_cleanup",
        "Date": "Sat, 13 Nov 2021 09:22:53 -0800",
        "Message-Id": "<20211113172257.6543-2-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20211113172257.6543-1-stephen@networkplumber.org>",
        "References": "<20200428235827.15383-1-stephen@networkplumber.org>\n <20211113172257.6543-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "When application calls rte_eal_cleanup on shutdown,\nthe DPDK log should be closed and cleaned up.\n\nThis helps reduce false reports from tools like ASAN\nand valgrind that track memory leaks.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/eal/common/eal_common_log.c | 13 +++++++++++++\n lib/eal/common/eal_private.h    |  7 +++++++\n lib/eal/linux/eal.c             |  1 +\n lib/eal/linux/eal_log.c         |  8 ++++++++\n 4 files changed, 29 insertions(+)",
    "diff": "diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c\nindex 1be35f539727..cbd0b851f216 100644\n--- a/lib/eal/common/eal_common_log.c\n+++ b/lib/eal/common/eal_common_log.c\n@@ -18,6 +18,7 @@\n #include <rte_per_lcore.h>\n \n #include \"eal_log.h\"\n+#include \"eal_private.h\"\n \n struct rte_log_dynamic_type {\n \tconst char *name;\n@@ -535,3 +536,15 @@ eal_log_set_default(FILE *default_log)\n \t\t\"Debug dataplane logs available - lower performance\\n\");\n #endif\n }\n+\n+/*\n+ * Called by eal_cleanup\n+ */\n+void\n+rte_eal_log_cleanup(void)\n+{\n+\tif (default_log_stream) {\n+\t\tfclose(default_log_stream);\n+\t\tdefault_log_stream = NULL;\n+\t}\n+}\ndiff --git a/lib/eal/common/eal_private.h b/lib/eal/common/eal_private.h\nindex 36bcc0b5a492..2fbad534b938 100644\n--- a/lib/eal/common/eal_private.h\n+++ b/lib/eal/common/eal_private.h\n@@ -152,6 +152,13 @@ int rte_eal_tailqs_init(void);\n  */\n int rte_eal_intr_init(void);\n \n+/**\n+ * Close the default log stream\n+ *\n+ * This function is private to EAL.\n+ */\n+void rte_eal_log_cleanup(void);\n+\n /**\n  * Init alarm mechanism. This is to allow a callback be called after\n  * specific time.\ndiff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex 60b49248388e..b67030b2792e 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -1370,6 +1370,7 @@ rte_eal_cleanup(void)\n \trte_trace_save();\n \teal_trace_fini();\n \teal_cleanup_config(internal_conf);\n+\trte_eal_log_cleanup();\n \treturn 0;\n }\n \ndiff --git a/lib/eal/linux/eal_log.c b/lib/eal/linux/eal_log.c\nindex c0aa1007c4df..5a795ac9ebe3 100644\n--- a/lib/eal/linux/eal_log.c\n+++ b/lib/eal/linux/eal_log.c\n@@ -37,8 +37,16 @@ console_log_write(__rte_unused void *c, const char *buf, size_t size)\n \treturn ret;\n }\n \n+static int\n+console_log_close(__rte_unused void *c)\n+{\n+\tcloselog();\n+\treturn 0;\n+}\n+\n static cookie_io_functions_t console_log_func = {\n \t.write = console_log_write,\n+\t.close = console_log_close,\n };\n \n /*\n",
    "prefixes": [
        "v6",
        "1/5"
    ]
}