Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/64211/?format=api
http://patches.dpdk.org/api/patches/64211/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200104013341.19809-15-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-15-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20200104013341.19809-15-stephen@networkplumber.org", "date": "2020-01-04T01:33:41", "name": "[14/14] eal: malloc: cleanup mp resources", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "9d2e78c96536719a0f5e2297eeb8d70d7b167287", "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-15-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/64211/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/64211/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 4A3F6A04DD;\n\tSat, 4 Jan 2020 02:35:57 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2EC4B1D57E;\n\tSat, 4 Jan 2020 02:34:18 +0100 (CET)", "from mail-pl1-f196.google.com (mail-pl1-f196.google.com\n [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 546661D556\n for <dev@dpdk.org>; Sat, 4 Jan 2020 02:34:09 +0100 (CET)", "by mail-pl1-f196.google.com with SMTP id a6so18895876plm.3\n for <dev@dpdk.org>; Fri, 03 Jan 2020 17:34:09 -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.34.07\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 03 Jan 2020 17:34:07 -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=zUaUfoxGHH+ys9CECpeiQUF0L2MGdSRHCXxhmb6J+TY=;\n b=OcsjPhXiinKARjDHxw9fnSpEpA7+sJLm579e/fa16PzGgF5vZH2F/+qwuTNsU2sN0b\n sRVRWMzlOd5PZB0MWjf1HB0KgSWWoNiVAPAYqyP0lbTs0wtPKCs4XfD1FhkhZ+v8mrdJ\n YIAS/uh+5kwj5l5AyKwjEDzIpZNKdNGrnCv++D78JtiNqsGZ/PL6GML7pYJPJ2D+rLVk\n Ekgsb7CVJidbFFr+s8G7CId3Lyxn7q5KkhqKE2RUQDo6xX5As/j1unA39bPN0OfIaljK\n 8MCDHOzg32zZy545uh9NFlFbRd91gJMWsddjUpenklZIeVASLzpGnzSACn4AfYhJ2Jrb\n Ibwg==", "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=zUaUfoxGHH+ys9CECpeiQUF0L2MGdSRHCXxhmb6J+TY=;\n b=m4OLbBZMvTnvYtUh/euYOpn/lQ9eDFiMZkfM1qiiJ/EqH6MMQCrEE+yKU2+eF2eV3Y\n 4KJeWT9TR6+/4XngskYc7Ib1nKtiMBkiPjGeT3YiYMBYef/lXUObfZX3s/20Y3teYLXp\n Zk17csnTlTVNuZ7Ogcv0nxyyUdFt0LBpclDdGBgZqlWWry6tC+5tJogdm22ja0jnZBL9\n GcpJB3hZTuS9m5CmCR+GGV22IOIr0esKg6I3J1zMBT9HyGOomKhgxFiYVXLzcCDsYCFs\n d5yZUxcs0ZgM28RE1AfpZxxvtdcvyIav5xKur8EZSZMYzrA+x2vNLXD8NRfSzK1q7QuW\n ajRg==", "X-Gm-Message-State": "APjAAAVicP/mplCbaJNLKoy6/Hxr21MFlPqo0ROGDpMggKt9PZiXxVLl\n Mzj99NRyvpB3PeLXrvxdiFgjWTFd49w=", "X-Google-Smtp-Source": "\n APXvYqxc+7ZNGnm7jemvuUPOzkaGIV+OYsX745XAJ3LuI/8f9NWRKQO5HIOO9aULjEkqZ/apU20QSQ==", "X-Received": "by 2002:a17:902:b901:: with SMTP id\n bf1mr94118872plb.283.1578101648112;\n Fri, 03 Jan 2020 17:34:08 -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:41 -0800", "Message-Id": "<20200104013341.19809-15-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 14/14] eal: malloc: cleanup mp resources", "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": "The mp action resources in malloc should be cleaned up via\nrte_eal_cleanup.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_eal/common/malloc_heap.c | 6 ++++++\n lib/librte_eal/common/malloc_heap.h | 3 +++\n lib/librte_eal/common/malloc_mp.c | 12 ++++++++++++\n lib/librte_eal/common/malloc_mp.h | 3 +++\n lib/librte_eal/linux/eal/eal.c | 1 +\n 5 files changed, 25 insertions(+)", "diff": "diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c\nindex 842eb9de75a1..13c673f363a9 100644\n--- a/lib/librte_eal/common/malloc_heap.c\n+++ b/lib/librte_eal/common/malloc_heap.c\n@@ -1362,3 +1362,9 @@ rte_eal_malloc_heap_init(void)\n \t/* add all IOVA-contiguous areas to the heap */\n \treturn rte_memseg_contig_walk(malloc_add_seg, NULL);\n }\n+\n+void\n+rte_eal_malloc_heap_cleanup(void)\n+{\n+\tunregister_mp_requests();\n+}\ndiff --git a/lib/librte_eal/common/malloc_heap.h b/lib/librte_eal/common/malloc_heap.h\nindex 772736b53f3c..ffad1b61e246 100644\n--- a/lib/librte_eal/common/malloc_heap.h\n+++ b/lib/librte_eal/common/malloc_heap.h\n@@ -100,6 +100,9 @@ malloc_socket_to_heap_id(unsigned int socket_id);\n int\n rte_eal_malloc_heap_init(void);\n \n+void\n+rte_eal_malloc_heap_cleanup(void);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c\nindex 1f212f834993..a9a9e8a45221 100644\n--- a/lib/librte_eal/common/malloc_mp.c\n+++ b/lib/librte_eal/common/malloc_mp.c\n@@ -749,3 +749,15 @@ register_mp_requests(void)\n \t}\n \treturn 0;\n }\n+\n+void\n+unregister_mp_requests(void)\n+{\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n+\t\trte_mp_action_unregister(MP_ACTION_REQUEST);\n+\t} else {\n+\t\trte_mp_action_unregister(MP_ACTION_SYNC);\n+\t\trte_mp_action_unregister(MP_ACTION_ROLLBACK);\n+\t\trte_mp_action_unregister(MP_ACTION_RESPONSE);\n+\t}\n+}\ndiff --git a/lib/librte_eal/common/malloc_mp.h b/lib/librte_eal/common/malloc_mp.h\nindex 2b86b76f6848..fb3d18c4e458 100644\n--- a/lib/librte_eal/common/malloc_mp.h\n+++ b/lib/librte_eal/common/malloc_mp.h\n@@ -63,6 +63,9 @@ struct malloc_mp_req {\n int\n register_mp_requests(void);\n \n+void\n+unregister_mp_requests(void);\n+\n int\n request_to_primary(struct malloc_mp_req *req);\n \ndiff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c\nindex ef04defbeaa4..c660f6fac3f2 100644\n--- a/lib/librte_eal/linux/eal/eal.c\n+++ b/lib/librte_eal/linux/eal/eal.c\n@@ -1344,6 +1344,7 @@ rte_eal_cleanup(void)\n \trte_eal_intr_cleanup();\n \trte_eal_alarm_cleanup();\n \teal_mp_dev_hotplug_cleanup();\n+\trte_eal_malloc_heap_cleanup();\n \trte_mp_channel_cleanup();\n \teal_plugins_cleanup();\n \teal_cleanup_config(&internal_config);\n", "prefixes": [ "14/14" ] }{ "id": 64211, "url": "