Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/47452/?format=api
http://patches.dpdk.org/api/patches/47452/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1540494678-64299-4-git-send-email-yipeng1.wang@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": "<1540494678-64299-4-git-send-email-yipeng1.wang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1540494678-64299-4-git-send-email-yipeng1.wang@intel.com", "date": "2018-10-25T19:11:15", "name": "[v3,3/6] test/hash: test more corner cases in unit test", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "5f413fe63d2b3a173c7f1dbf4b492d442a11fb58", "submitter": { "id": 754, "url": "http://patches.dpdk.org/api/people/754/?format=api", "name": "Wang, Yipeng1", "email": "yipeng1.wang@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1540494678-64299-4-git-send-email-yipeng1.wang@intel.com/mbox/", "series": [ { "id": 2106, "url": "http://patches.dpdk.org/api/series/2106/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2106", "date": "2018-10-25T19:11:12", "name": "hash: improve multiple places", "version": 3, "mbox": "http://patches.dpdk.org/series/2106/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/47452/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/47452/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 173A17CEB;\n\tFri, 26 Oct 2018 04:16:54 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id E1DAB5F0D\n\tfor <dev@dpdk.org>; Fri, 26 Oct 2018 04:16:40 +0200 (CEST)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Oct 2018 19:16:37 -0700", "from skx-yipeng.jf.intel.com ([10.54.81.175])\n\tby orsmga001.jf.intel.com with ESMTP; 25 Oct 2018 19:16:37 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.54,426,1534834800\"; d=\"scan'208\";a=\"102770309\"", "From": "Yipeng Wang <yipeng1.wang@intel.com>", "To": "bruce.richardson@intel.com", "Cc": "stephen@networkplumber.org, dev@dpdk.org, yipeng1.wang@intel.com,\n\thonnappa.nagarahalli@arm.com, sameh.gobriel@intel.com", "Date": "Thu, 25 Oct 2018 12:11:15 -0700", "Message-Id": "<1540494678-64299-4-git-send-email-yipeng1.wang@intel.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1540494678-64299-1-git-send-email-yipeng1.wang@intel.com>", "References": "<1540404570-102126-1-git-send-email-yipeng1.wang@intel.com>\n\t<1540494678-64299-1-git-send-email-yipeng1.wang@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 3/6] test/hash: test more corner cases in unit\n\ttest", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This commit improves the readwrite unit test to cover\nmore corner cases and reduces the testing time by\nreducing the total key count.\n\nSigned-off-by: Yipeng Wang <yipeng1.wang@intel.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n test/test/test_hash_readwrite.c | 31 +++++++++++++++++++++++++------\n 1 file changed, 25 insertions(+), 6 deletions(-)", "diff": "diff --git a/test/test/test_hash_readwrite.c b/test/test/test_hash_readwrite.c\nindex a8fadd0..a45c669 100644\n--- a/test/test/test_hash_readwrite.c\n+++ b/test/test/test_hash_readwrite.c\n@@ -18,8 +18,8 @@\n \n #define RTE_RWTEST_FAIL 0\n \n-#define TOTAL_ENTRY (16*1024*1024)\n-#define TOTAL_INSERT (15*1024*1024)\n+#define TOTAL_ENTRY (5*1024*1024)\n+#define TOTAL_INSERT (4.5*1024*1024)\n \n #define NUM_TEST 3\n unsigned int core_cnt[NUM_TEST] = {2, 4, 8};\n@@ -59,8 +59,10 @@ test_hash_readwrite_worker(__attribute__((unused)) void *arg)\n \tuint64_t i, offset;\n \tuint32_t lcore_id = rte_lcore_id();\n \tuint64_t begin, cycles;\n-\tint ret;\n+\tint *ret;\n \n+\tret = rte_malloc(NULL, sizeof(int) *\n+\t\t\t\ttbl_rw_test_param.num_insert, 0);\n \tfor (i = 0; i < rte_lcore_count(); i++) {\n \t\tif (slave_core_ids[i] == lcore_id)\n \t\t\tbreak;\n@@ -79,13 +81,30 @@ test_hash_readwrite_worker(__attribute__((unused)) void *arg)\n \t\t\t\ttbl_rw_test_param.keys + i) > 0)\n \t\t\tbreak;\n \n-\t\tret = rte_hash_add_key(tbl_rw_test_param.h,\n+\t\tret[i - offset] = rte_hash_add_key(tbl_rw_test_param.h,\n \t\t\t\t tbl_rw_test_param.keys + i);\n-\t\tif (ret < 0)\n+\t\tif (ret[i - offset] < 0)\n+\t\t\tbreak;\n+\n+\t\t/* lookup a random key */\n+\t\tuint32_t rand = rte_rand() % (i + 1 - offset);\n+\n+\t\tif (rte_hash_lookup(tbl_rw_test_param.h,\n+\t\t\t\ttbl_rw_test_param.keys + rand) != ret[rand])\n+\t\t\tbreak;\n+\n+\n+\t\tif (rte_hash_del_key(tbl_rw_test_param.h,\n+\t\t\t\ttbl_rw_test_param.keys + rand) != ret[rand])\n+\t\t\tbreak;\n+\n+\t\tret[rand] = rte_hash_add_key(tbl_rw_test_param.h,\n+\t\t\t\t\ttbl_rw_test_param.keys + rand);\n+\t\tif (ret[rand] < 0)\n \t\t\tbreak;\n \n \t\tif (rte_hash_lookup(tbl_rw_test_param.h,\n-\t\t\t\ttbl_rw_test_param.keys + i) != ret)\n+\t\t\ttbl_rw_test_param.keys + rand) != ret[rand])\n \t\t\tbreak;\n \t}\n \n", "prefixes": [ "v3", "3/6" ] }{ "id": 47452, "url": "