Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/37879/?format=api
http://patches.dpdk.org/api/patches/37879/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/f17d7ca40bf1d78fc63b79e053b130b71ba0979c.1523448978.git.anatoly.burakov@intel.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": "<f17d7ca40bf1d78fc63b79e053b130b71ba0979c.1523448978.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/f17d7ca40bf1d78fc63b79e053b130b71ba0979c.1523448978.git.anatoly.burakov@intel.com", "date": "2018-04-11T12:29:43", "name": "[dpdk-dev,v6,08/70] malloc: make free return resulting element", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "90029d3c7ca1192c433c3c5fb5ceded79f6e24a7", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/f17d7ca40bf1d78fc63b79e053b130b71ba0979c.1523448978.git.anatoly.burakov@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/37879/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/37879/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 732228D8B;\n\tWed, 11 Apr 2018 14:31:13 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 1DB461BB8F\n\tfor <dev@dpdk.org>; Wed, 11 Apr 2018 14:30:52 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Apr 2018 05:30:52 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga004.jf.intel.com with ESMTP; 11 Apr 2018 05:30:48 -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\tw3BCUlFi012303; Wed, 11 Apr 2018 13:30:47 +0100", "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w3BCUlBR013553;\n\tWed, 11 Apr 2018 13:30:47 +0100", "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w3BCUlME013549;\n\tWed, 11 Apr 2018 13:30:47 +0100" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.48,436,1517904000\"; d=\"scan'208\";a=\"190642279\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "keith.wiles@intel.com, jianfeng.tan@intel.com, andras.kovacs@ericsson.com,\n\tlaszlo.vadkeri@ericsson.com, benjamin.walker@intel.com,\n\tbruce.richardson@intel.com, thomas@monjalon.net,\n\tkonstantin.ananyev@intel.com, kuralamudhan.ramakrishnan@intel.com,\n\tlouise.m.daly@intel.com, nelio.laranjeiro@6wind.com,\n\tyskoh@mellanox.com, pepperjo@japf.ch, jerin.jacob@caviumnetworks.com, \n\themant.agrawal@nxp.com, olivier.matz@6wind.com, shreyansh.jain@nxp.com,\n\tgowrishankar.m@linux.vnet.ibm.com", "Date": "Wed, 11 Apr 2018 13:29:43 +0100", "Message-Id": "<f17d7ca40bf1d78fc63b79e053b130b71ba0979c.1523448978.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": [ "<cover.1523448978.git.anatoly.burakov@intel.com>", "<cover.1523448978.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1523448978.git.anatoly.burakov@intel.com>", "<cover.1523296700.git.anatoly.burakov@intel.com>\n\t<cover.1523448978.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v6 08/70] malloc: make free return resulting\n\telement", "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": "This will be needed because we need to know how big is the\nnew empty space, to check whether we can free some pages as\na result.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nTested-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>\nTested-by: Hemant Agrawal <hemant.agrawal@nxp.com>\nTested-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>\n---\n lib/librte_eal/common/malloc_elem.c | 4 ++--\n lib/librte_eal/common/malloc_elem.h | 2 +-\n lib/librte_eal/common/malloc_heap.c | 4 ++--\n 3 files changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c\nindex 008f5a3..c18f050 100644\n--- a/lib/librte_eal/common/malloc_elem.c\n+++ b/lib/librte_eal/common/malloc_elem.c\n@@ -379,7 +379,7 @@ malloc_elem_join_adjacent_free(struct malloc_elem *elem)\n * blocks either immediately before or immediately after newly freed block\n * are also free, the blocks are merged together.\n */\n-int\n+struct malloc_elem *\n malloc_elem_free(struct malloc_elem *elem)\n {\n \tvoid *ptr;\n@@ -397,7 +397,7 @@ malloc_elem_free(struct malloc_elem *elem)\n \n \tmemset(ptr, 0, data_len);\n \n-\treturn 0;\n+\treturn elem;\n }\n \n /*\ndiff --git a/lib/librte_eal/common/malloc_elem.h b/lib/librte_eal/common/malloc_elem.h\nindex 46e2383..9c1614c 100644\n--- a/lib/librte_eal/common/malloc_elem.h\n+++ b/lib/librte_eal/common/malloc_elem.h\n@@ -138,7 +138,7 @@ malloc_elem_alloc(struct malloc_elem *elem, size_t size,\n * blocks either immediately before or immediately after newly freed block\n * are also free, the blocks are merged together.\n */\n-int\n+struct malloc_elem *\n malloc_elem_free(struct malloc_elem *elem);\n \n struct malloc_elem *\ndiff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c\nindex 44538d7..a2c2e4c 100644\n--- a/lib/librte_eal/common/malloc_heap.c\n+++ b/lib/librte_eal/common/malloc_heap.c\n@@ -145,7 +145,7 @@ int\n malloc_heap_free(struct malloc_elem *elem)\n {\n \tstruct malloc_heap *heap;\n-\tint ret;\n+\tstruct malloc_elem *ret;\n \n \tif (!malloc_elem_cookies_ok(elem) || elem->state != ELEM_BUSY)\n \t\treturn -1;\n@@ -159,7 +159,7 @@ malloc_heap_free(struct malloc_elem *elem)\n \n \trte_spinlock_unlock(&(heap->lock));\n \n-\treturn ret;\n+\treturn ret != NULL ? 0 : -1;\n }\n \n int\n", "prefixes": [ "dpdk-dev", "v6", "08/70" ] }{ "id": 37879, "url": "