Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/5616/?format=api
https://patches.dpdk.org/api/patches/5616/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1434734498-29224-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": "<1434734498-29224-8-git-send-email-sergio.gonzalez.monroy@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1434734498-29224-8-git-send-email-sergio.gonzalez.monroy@intel.com", "date": "2015-06-19T17:21:36", "name": "[dpdk-dev,v3,7/9] app/test: update unit test with rte_memzone_free", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f516995cbe38d19aaf0fa219d1d3ba27d58045ac", "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/1434734498-29224-8-git-send-email-sergio.gonzalez.monroy@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/5616/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/5616/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 154FFC936;\n\tFri, 19 Jun 2015 19:21:55 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 0D455CE7\n\tfor <dev@dpdk.org>; Fri, 19 Jun 2015 19:21:42 +0200 (CEST)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga101.jf.intel.com with ESMTP; 19 Jun 2015 10:21:40 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga003.jf.intel.com with ESMTP; 19 Jun 2015 10:21:40 -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\tt5JHLdtl001278 for <dev@dpdk.org>; Fri, 19 Jun 2015 18:21:39 +0100", "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t5JHLd4F029312\n\tfor <dev@dpdk.org>; Fri, 19 Jun 2015 18:21:39 +0100", "(from smonroy@localhost)\n\tby sivswdev02.ir.intel.com with id t5JHLdsV029308\n\tfor dev@dpdk.org; Fri, 19 Jun 2015 18:21:39 +0100" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.13,644,1427785200\"; d=\"scan'208\";a=\"591031039\"", "From": "Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>", "To": "dev@dpdk.org", "Date": "Fri, 19 Jun 2015 18:21:36 +0100", "Message-Id": "<1434734498-29224-8-git-send-email-sergio.gonzalez.monroy@intel.com>", "X-Mailer": "git-send-email 1.8.5.4", "In-Reply-To": "<1434734498-29224-1-git-send-email-sergio.gonzalez.monroy@intel.com>", "References": "<1433586732-28217-1-git-send-email-sergio.gonzalez.monroy@intel.com>\n\t<1434734498-29224-1-git-send-email-sergio.gonzalez.monroy@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 7/9] 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 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 53 insertions(+)", "diff": "diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c\nindex 6934eee..501ad12 100644\n--- a/app/test/test_memzone.c\n+++ b/app/test/test_memzone.c\n@@ -684,6 +684,55 @@ test_memzone_bounded(void)\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+\n+static int\n test_memzone(void)\n {\n \tconst struct rte_memzone *memzone1;\n@@ -791,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", "v3", "7/9" ] }{ "id": 5616, "url": "