Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/5241/?format=api
https://patches.dpdk.org/api/patches/5241/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1433586732-28217-8-git-send-email-sergio.gonzalez.monroy@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": "<1433586732-28217-8-git-send-email-sergio.gonzalez.monroy@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1433586732-28217-8-git-send-email-sergio.gonzalez.monroy@intel.com", "date": "2015-06-06T10:32:12", "name": "[dpdk-dev,v2,7/7] app/test: update unit test with rte_memzone_free", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "207768c196cc218e1f21cc97b3178cd80346d4e0", "submitter": { "id": 73, "url": "https://patches.dpdk.org/api/people/73/?format=api", "name": "Sergio Gonzalez Monroy", "email": "sergio.gonzalez.monroy@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1433586732-28217-8-git-send-email-sergio.gonzalez.monroy@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/5241/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/5241/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id E5688C3B2;\n\tSat, 6 Jun 2015 12:32:35 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id D8266C3A2\n\tfor <dev@dpdk.org>; Sat, 6 Jun 2015 12:32:33 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga102.jf.intel.com with ESMTP; 06 Jun 2015 03:32:15 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga002.jf.intel.com with ESMTP; 06 Jun 2015 03:32:14 -0700", "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tt56AWD9K024230; Sat, 6 Jun 2015 11:32:13 +0100", "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t56AWDRJ028307;\n\tSat, 6 Jun 2015 11:32:13 +0100", "(from smonroy@localhost)\n\tby sivswdev02.ir.intel.com with id t56AWDoi028303;\n\tSat, 6 Jun 2015 11:32:13 +0100" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.13,563,1427785200\"; d=\"scan'208\";a=\"742160962\"", "From": "Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>", "To": "dev@dpdk.org", "Date": "Sat, 6 Jun 2015 11:32:12 +0100", "Message-Id": "<1433586732-28217-8-git-send-email-sergio.gonzalez.monroy@intel.com>", "X-Mailer": "git-send-email 1.8.5.4", "In-Reply-To": "<1433586732-28217-1-git-send-email-sergio.gonzalez.monroy@intel.com>", "References": "<1431103079-18096-1-git-send-email-sergio.gonzalez.monroy@intel.com>\n\t<1433586732-28217-1-git-send-email-sergio.gonzalez.monroy@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 7/7] app/test: update unit test with\n\trte_memzone_free", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://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": "<http://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": "Update memzone unit test for the new rte_memzone_free API.\n\nSigned-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>\n---\n app/test/test_memzone.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 49 insertions(+)", "diff": "diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c\nindex c5e4872..7667d30 100644\n--- a/app/test/test_memzone.c\n+++ b/app/test/test_memzone.c\n@@ -683,6 +683,51 @@ test_memzone_bounded(void)\n \treturn (0);\n }\n \n+static int\n+test_memzone_free(void)\n+{\n+\tconst struct rte_memzone *mz[4];\n+\n+\tmz[0] = rte_memzone_reserve(\"tempzone0\", 2000, SOCKET_ID_ANY, 0);\n+\tmz[1] = rte_memzone_reserve(\"tempzone1\", 4000, SOCKET_ID_ANY, 0);\n+\n+\tif (mz[0] > mz[1])\n+\t\treturn -1;\n+\tif (!rte_memzone_lookup(\"tempzone0\"))\n+\t\treturn -1;\n+\tif (!rte_memzone_lookup(\"tempzone1\"))\n+\t\treturn -1;\n+\n+\tif (rte_memzone_free(mz[0])) {\n+\t\tprintf(\"Fail memzone free - tempzone0\\n\");\n+\t\treturn -1;\n+\t}\n+\tif (rte_memzone_lookup(\"tempzone0\")) {\n+\t\tprintf(\"Found previously free memzone - tempzone0\\n\");\n+\t\treturn -1;\n+\t}\n+\tmz[2] = rte_memzone_reserve(\"tempzone2\", 2000, SOCKET_ID_ANY, 0);\n+\n+\tif (mz[2] > mz[1]) {\n+\t\tprintf(\"tempzone2 should have gotten the free entry from tempzone0\\n\");\n+\t\treturn -1;\n+\t}\n+\tif (rte_memzone_free(mz[2])) {\n+\t\tprintf(\"Fail memzone free - tempzone2\\n\");\n+\t\treturn -1;\n+\t}\n+\tif (rte_memzone_lookup(\"tempzone2\")) {\n+\t\tprintf(\"Found previously free memzone - tempzone2\\n\");\n+\t\treturn -1;\n+\t}\n+\tif (rte_memzone_free(mz[1])) {\n+\t\tprintf(\"Fail memzone free - tempzone1\\n\");\n+\t\treturn -1;\n+\t}\n+\tif (rte_memzone_lookup(\"tempzone1\")) {\n+\t\tprintf(\"Found previously free memzone - tempzone1\\n\");\n+\t\treturn -1;\n+\t}\n \n \treturn 0;\n }\n@@ -795,6 +840,10 @@ test_memzone(void)\n \tif (test_memzone_reserve_max_aligned() < 0)\n \t\treturn -1;\n \n+\tprintf(\"test free memzone\\n\");\n+\tif (test_memzone_free() < 0)\n+\t\treturn -1;\n+\n \treturn 0;\n }\n \n", "prefixes": [ "dpdk-dev", "v2", "7/7" ] }{ "id": 5241, "url": "