Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/64198/?format=api
http://patches.dpdk.org/api/patches/64198/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200104013341.19809-2-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": "<20200104013341.19809-2-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20200104013341.19809-2-stephen@networkplumber.org", "date": "2020-01-04T01:33:28", "name": "[01/14] eal: log: close on cleanup", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "1e83423c5c541c9c5ec5d6fb7cb4a1b749d689b5", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200104013341.19809-2-stephen@networkplumber.org/mbox/", "series": [ { "id": 7981, "url": "http://patches.dpdk.org/api/series/7981/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7981", "date": "2020-01-04T01:33:27", "name": "cleanup resources on shutdown", "version": 1, "mbox": "http://patches.dpdk.org/series/7981/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/64198/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/64198/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id A0B72A04DD;\n\tSat, 4 Jan 2020 02:34:02 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F38031D515;\n\tSat, 4 Jan 2020 02:33:53 +0100 (CET)", "from mail-pj1-f67.google.com (mail-pj1-f67.google.com\n [209.85.216.67]) by dpdk.org (Postfix) with ESMTP id 820A11D501\n for <dev@dpdk.org>; Sat, 4 Jan 2020 02:33:51 +0100 (CET)", "by mail-pj1-f67.google.com with SMTP id kx11so5205449pjb.4\n for <dev@dpdk.org>; Fri, 03 Jan 2020 17:33:51 -0800 (PST)", "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id j6sm16212934pjv.10.2020.01.03.17.33.49\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 03 Jan 2020 17:33:49 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=Q1ASW5G4GyNaqPRmx2JfkXHsJxMS+tbeKnlEF3gNxPw=;\n b=U1/AXaHLius3ILKn4DgrhlLInsyN1ntcQ3ilgwo9QCZg6znx1NZXreCPqCqyBaPQOP\n s/dX+VO4i3Lhb2LY4dHBLrRIS9skkQpcj/1tEsGyDGE6OuHXBK58f5CdYxOLi6mjD+FN\n oqMtaLUPG0BTIvgUqxWb86pvDjpZjQYJn8Rzv4IlvwjpW9aUlyNdm0upHvWnsgsp15HV\n WWZ107Ur5jiaOR7CoC6OeWBjzk4GRNFdo9MKdrbXl0iLnguHahPghNj/unJtTu/6uMa0\n M6VcQ7EtXgon/sdTkhMvZPQ1afeoH5PF8+dkRO1J2tGqWtMfCLhdwX08FOWSxjTllw2f\n FPIA==", "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=Q1ASW5G4GyNaqPRmx2JfkXHsJxMS+tbeKnlEF3gNxPw=;\n b=rJIVyyRBdWt0FoGaVGF2Cpl3weXsVdLn5WHGjrFUrC1rwRInCskfD0M3frExkh7xUv\n 5MOnIhidoyqPma/sHsTtcnAeEzM0i9beCTLGYWxRyjWJCBrs8ntyfPP54AeWpfHy3RHC\n fDofZYAlb2brAIT4GkpIPiVa9vn8LkUXF+a40qc3RU/5u7DlgJrmr+fwifPVTfR6RF2+\n +WyDYYzVhgoAB63ejz8p/M3ERUGI1BKK82/qkK5WuzgCXXZmeWGkPzthlvLyc3NHJ2T6\n 7c8MTyDy+2cnfASelw5CEdJqUlpXhZbfR3TJ7iSBVepjZqR3JPYmOJ6qaL3rt25FtFY6\n fe0A==", "X-Gm-Message-State": "APjAAAUnLpU8KL1RhFGGlr9gms2UNFMMLavxodTxFj0VZSXzfZDJvFcu\n 9I3KepiDDJevf1r9kPTPT/FJI8DrMiA=", "X-Google-Smtp-Source": "\n APXvYqxI+jjti10YNdtycxEBvt3ZV+DaWzExoTXXOtezARveLUosThWaJZXX8QNE18wGMYnvgFz7kQ==", "X-Received": "by 2002:a17:90a:c697:: with SMTP id\n n23mr29277840pjt.37.1578101630298;\n Fri, 03 Jan 2020 17:33:50 -0800 (PST)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>", "Date": "Fri, 3 Jan 2020 17:33:28 -0800", "Message-Id": "<20200104013341.19809-2-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200104013341.19809-1-stephen@networkplumber.org>", "References": "<20200104013341.19809-1-stephen@networkplumber.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 01/14] eal: log: close on cleanup", "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://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": "When application calls rte_eal_cleanup on shutdown,\nthe DPDK log should be closed and cleaned up.\n\nFixes: af75078fece3 (\"first public release\")\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_eal/common/eal_common_log.c | 12 ++++++++++++\n lib/librte_eal/common/eal_private.h | 13 +++++++++++++\n lib/librte_eal/linux/eal/eal.c | 1 +\n lib/librte_eal/linux/eal/eal_log.c | 14 ++++++++++++++\n 4 files changed, 40 insertions(+)", "diff": "diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c\nindex c0efd5214fa9..64d6e20947ed 100644\n--- a/lib/librte_eal/common/eal_common_log.c\n+++ b/lib/librte_eal/common/eal_common_log.c\n@@ -463,3 +463,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 envrionment-specific cleanup function.\n+ */\n+void\n+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/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex 8a9d493f0c54..fdd942d71a36 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -90,6 +90,12 @@ int rte_eal_memzone_init(void);\n */\n void eal_log_set_default(FILE *default_log);\n \n+/**\n+ * Common log cleanup function (private to eal).\n+ * Closes the default log stream. Called from rte_eal_cleanup().\n+ */\n+void eal_log_cleanup(void);\n+\n /**\n * Fill configuration with number of physical and logical processors\n *\n@@ -151,6 +157,13 @@ int rte_eal_timer_init(void);\n */\n int rte_eal_log_init(const char *id, int facility);\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 * Save the log regexp for later\n */\ndiff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c\nindex c4233ec3c8ac..a3381fd01a23 100644\n--- a/lib/librte_eal/linux/eal/eal.c\n+++ b/lib/librte_eal/linux/eal/eal.c\n@@ -1327,6 +1327,7 @@ rte_eal_cleanup(void)\n \trte_service_finalize();\n \trte_mp_channel_cleanup();\n \teal_cleanup_config(&internal_config);\n+\trte_eal_log_cleanup();\n \treturn 0;\n }\n \ndiff --git a/lib/librte_eal/linux/eal/eal_log.c b/lib/librte_eal/linux/eal/eal_log.c\nindex 9d02dddbed33..e1adbc91637a 100644\n--- a/lib/librte_eal/linux/eal/eal_log.c\n+++ b/lib/librte_eal/linux/eal/eal_log.c\n@@ -37,8 +37,16 @@ console_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)\n \treturn ret;\n }\n \n+static int\n+console_log_close(__attribute__((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@@ -60,3 +68,9 @@ rte_eal_log_init(const char *id, int facility)\n \n \treturn 0;\n }\n+\n+void\n+rte_eal_log_cleanup(void)\n+{\n+\teal_log_cleanup();\n+}\n", "prefixes": [ "01/14" ] }{ "id": 64198, "url": "