Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41190/?format=api
https://patches.dpdk.org/api/patches/41190/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/c0b4a52ac50a87a936a246fda05e9e9c21caaec2.1529071026.git.anatoly.burakov@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": "<c0b4a52ac50a87a936a246fda05e9e9c21caaec2.1529071026.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/c0b4a52ac50a87a936a246fda05e9e9c21caaec2.1529071026.git.anatoly.burakov@intel.com", "date": "2018-06-15T14:25:01", "name": "[1/8] eal/linux: use glibc malloc in alarm", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e3ec2790242c35d6d72e23085a0d70c9b78ab1a8", "submitter": { "id": 4, "url": "https://patches.dpdk.org/api/people/4/?format=api", "name": "Burakov, Anatoly", "email": "anatoly.burakov@intel.com" }, "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/c0b4a52ac50a87a936a246fda05e9e9c21caaec2.1529071026.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 145, "url": "https://patches.dpdk.org/api/series/145/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=145", "date": "2018-06-15T14:25:00", "name": "Remove IPC threads", "version": 1, "mbox": "https://patches.dpdk.org/series/145/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/41190/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/41190/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 C6ACE1D6A6;\n\tFri, 15 Jun 2018 16:25:25 +0200 (CEST)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 6E2E11D616\n\tfor <dev@dpdk.org>; Fri, 15 Jun 2018 16:25:14 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t15 Jun 2018 07:25:13 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga008.fm.intel.com with ESMTP; 15 Jun 2018 07:25:09 -0700", "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tw5FEP8KU028175; Fri, 15 Jun 2018 15:25:08 +0100", "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w5FEP8Qo019442;\n\tFri, 15 Jun 2018 15:25:08 +0100", "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w5FEP8Qj019438;\n\tFri, 15 Jun 2018 15:25:08 +0100" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,227,1526367600\"; d=\"scan'208\";a=\"48035930\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "Jianfeng Tan <jianfeng.tan@intel.com>, konstantin.ananyev@intel.com,\n\tthomas@monjalon.net, bruce.richardson@intel.com", "Date": "Fri, 15 Jun 2018 15:25:01 +0100", "Message-Id": "<c0b4a52ac50a87a936a246fda05e9e9c21caaec2.1529071026.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": [ "<cover.1529071026.git.anatoly.burakov@intel.com>", "<cover.1529071026.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1529071026.git.anatoly.burakov@intel.com>", "<cover.1529071026.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH 1/8] eal/linux: use glibc malloc in alarm", "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": "From: Jianfeng Tan <jianfeng.tan@intel.com>\n\nIPC is used by memory subsystem, and when we merge IPC threads with\ninterrupt threads, asynchronous IPC requests will have to use alarm\nAPI. However, currently, alarm API uses rte_malloc to allocate memory,\nwhich will create a circular dependency between alarm API and memory\nsubsystem.\n\nTo avoid such chicken and egg dilemma, we change to use glibc malloc\nin the alarm API.\n\nSigned-off-by: Jianfeng Tan <jianfeng.tan@intel.com>\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/linuxapp/eal/eal_alarm.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/librte_eal/linuxapp/eal/eal_alarm.c b/lib/librte_eal/linuxapp/eal/eal_alarm.c\nindex c115e823a..391d2a65f 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_alarm.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_alarm.c\n@@ -19,7 +19,6 @@\n #include <rte_launch.h>\n #include <rte_lcore.h>\n #include <rte_errno.h>\n-#include <rte_malloc.h>\n #include <rte_spinlock.h>\n #include <eal_private.h>\n \n@@ -91,7 +90,7 @@ eal_alarm_callback(void *arg __rte_unused)\n \t\trte_spinlock_lock(&alarm_list_lk);\n \n \t\tLIST_REMOVE(ap, next);\n-\t\trte_free(ap);\n+\t\tfree(ap);\n \t}\n \n \tif (!LIST_EMPTY(&alarm_list)) {\n@@ -122,7 +121,7 @@ rte_eal_alarm_set(uint64_t us, rte_eal_alarm_callback cb_fn, void *cb_arg)\n \tif (us < 1 || us > (UINT64_MAX - US_PER_S) || cb_fn == NULL)\n \t\treturn -EINVAL;\n \n-\tnew_alarm = rte_zmalloc(NULL, sizeof(*new_alarm), 0);\n+\tnew_alarm = calloc(1, sizeof(*new_alarm));\n \tif (new_alarm == NULL)\n \t\treturn -ENOMEM;\n \n@@ -196,7 +195,7 @@ rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn, void *cb_arg)\n \n \t\t\tif (ap->executing == 0) {\n \t\t\t\tLIST_REMOVE(ap, next);\n-\t\t\t\trte_free(ap);\n+\t\t\t\tfree(ap);\n \t\t\t\tcount++;\n \t\t\t} else {\n \t\t\t\t/* If calling from other context, mark that alarm is executing\n@@ -220,7 +219,7 @@ rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn, void *cb_arg)\n \n \t\t\t\tif (ap->executing == 0) {\n \t\t\t\t\tLIST_REMOVE(ap, next);\n-\t\t\t\t\trte_free(ap);\n+\t\t\t\t\tfree(ap);\n \t\t\t\t\tcount++;\n \t\t\t\t\tap = ap_prev;\n \t\t\t\t} else if (pthread_equal(ap->executing_id, pthread_self()) == 0)\n", "prefixes": [ "1/8" ] }{ "id": 41190, "url": "