get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/44370/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 44370,
    "url": "http://patches.dpdk.org/api/patches/44370/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1536253745-133104-5-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": "<1536253745-133104-5-git-send-email-yipeng1.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1536253745-133104-5-git-send-email-yipeng1.wang@intel.com",
    "date": "2018-09-06T17:09:04",
    "name": "[v1,4/5] test: implement extendable bucket hash test",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0ad66398b4c70befc779014318ebe0cb9a8d79ce",
    "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/1536253745-133104-5-git-send-email-yipeng1.wang@intel.com/mbox/",
    "series": [
        {
            "id": 1216,
            "url": "http://patches.dpdk.org/api/series/1216/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1216",
            "date": "2018-09-06T17:09:00",
            "name": "hash: add extendable bucket and partial-key hashing",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1216/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44370/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44370/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 87E3C5323;\n\tFri,  7 Sep 2018 02:13:57 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 167AE37B7\n\tfor <dev@dpdk.org>; Fri,  7 Sep 2018 02:13:49 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t06 Sep 2018 17:13:47 -0700",
            "from skx-yipeng.jf.intel.com ([10.54.81.175])\n\tby orsmga005.jf.intel.com with ESMTP; 06 Sep 2018 17:13:47 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,340,1531810800\"; d=\"scan'208\";a=\"255176891\"",
        "From": "Yipeng Wang <yipeng1.wang@intel.com>",
        "To": "pablo.de.lara.guarch@intel.com,\n\tbruce.richardson@intel.com",
        "Cc": "dev@dpdk.org, yipeng1.wang@intel.com, michel@digirati.com.br,\n\thonnappa.nagarahalli@arm.com",
        "Date": "Thu,  6 Sep 2018 10:09:04 -0700",
        "Message-Id": "<1536253745-133104-5-git-send-email-yipeng1.wang@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1536253745-133104-1-git-send-email-yipeng1.wang@intel.com>",
        "References": "<1536253745-133104-1-git-send-email-yipeng1.wang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v1 4/5] test: implement extendable bucket hash\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 changes the current rte_hash unit test to\ntest the extendable table feature and performance.\n\nSigned-off-by: Yipeng Wang <yipeng1.wang@intel.com>\n---\n test/test/test_hash.c      | 145 +++++++++++++++++++++++++++++++++++++++++++--\n test/test/test_hash_perf.c | 114 +++++++++++++++++++++++++----------\n 2 files changed, 225 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/test/test/test_hash.c b/test/test/test_hash.c\nindex b3db9fd..ca58755 100644\n--- a/test/test/test_hash.c\n+++ b/test/test/test_hash.c\n@@ -660,6 +660,117 @@ static int test_full_bucket(void)\n \treturn 0;\n }\n \n+/*\n+ * Similar to the test above (full bucket test), but for extendable buckets.\n+ */\n+static int test_extendable_bucket(void)\n+{\n+\tstruct rte_hash_parameters params_pseudo_hash = {\n+\t\t.name = \"test5\",\n+\t\t.entries = 64,\n+\t\t.key_len = sizeof(struct flow_key), /* 13 */\n+\t\t.hash_func = pseudo_hash,\n+\t\t.hash_func_init_val = 0,\n+\t\t.socket_id = 0,\n+\t\t.extra_flag = RTE_HASH_EXTRA_FLAGS_EXT_TABLE\n+\t};\n+\tstruct rte_hash *handle;\n+\tint pos[64];\n+\tint expected_pos[64];\n+\tunsigned int i;\n+\tstruct flow_key rand_keys[64];\n+\n+\tfor (i = 0; i < 64; i++) {\n+\t\trand_keys[i].port_dst = i;\n+\t\trand_keys[i].port_src = i+1;\n+\t}\n+\n+\thandle = rte_hash_create(&params_pseudo_hash);\n+\tRETURN_IF_ERROR(handle == NULL, \"hash creation failed\");\n+\n+\t/* Fill bucket */\n+\tfor (i = 0; i < 64; i++) {\n+\t\tpos[i] = rte_hash_add_key(handle, &rand_keys[i]);\n+\t\tprint_key_info(\"Add\", &rand_keys[i], pos[i]);\n+\t\tRETURN_IF_ERROR(pos[i] < 0,\n+\t\t\t\"failed to add key (pos[%u]=%d)\", i, pos[i]);\n+\t\texpected_pos[i] = pos[i];\n+\t}\n+\n+\n+\t/* Lookup */\n+\tfor (i = 0; i < 64; i++) {\n+\t\tpos[i] = rte_hash_lookup(handle, &rand_keys[i]);\n+\t\tprint_key_info(\"Lkp\", &rand_keys[i], pos[i]);\n+\t\tRETURN_IF_ERROR(pos[i] != expected_pos[i],\n+\t\t\t\"failed to find key (pos[%u]=%d)\", i, pos[i]);\n+\t}\n+\n+\t/* Add - update */\n+\tfor (i = 0; i < 64; i++) {\n+\t\tpos[i] = rte_hash_add_key(handle, &rand_keys[i]);\n+\t\tprint_key_info(\"Add\", &rand_keys[i], pos[i]);\n+\t\tRETURN_IF_ERROR(pos[i] != expected_pos[i],\n+\t\t\t\"failed to add key (pos[%u]=%d)\", i, pos[i]);\n+\t}\n+\n+\t/* Lookup */\n+\tfor (i = 0; i < 64; i++) {\n+\t\tpos[i] = rte_hash_lookup(handle, &rand_keys[i]);\n+\t\tprint_key_info(\"Lkp\", &rand_keys[i], pos[i]);\n+\t\tRETURN_IF_ERROR(pos[i] != expected_pos[i],\n+\t\t\t\"failed to find key (pos[%u]=%d)\", i, pos[i]);\n+\t}\n+\n+\t/* Delete 1 key, check other keys are still found */\n+\tpos[35] = rte_hash_del_key(handle, &rand_keys[35]);\n+\tprint_key_info(\"Del\", &rand_keys[35], pos[35]);\n+\tRETURN_IF_ERROR(pos[35] != expected_pos[35],\n+\t\t\t\"failed to delete key (pos[1]=%d)\", pos[35]);\n+\tpos[20] = rte_hash_lookup(handle, &rand_keys[20]);\n+\tprint_key_info(\"Lkp\", &rand_keys[20], pos[20]);\n+\tRETURN_IF_ERROR(pos[20] != expected_pos[20],\n+\t\t\t\"failed lookup after deleting key from same bucket \"\n+\t\t\t\"(pos[20]=%d)\", pos[20]);\n+\n+\t/* Go back to previous state */\n+\tpos[35] = rte_hash_add_key(handle, &rand_keys[35]);\n+\tprint_key_info(\"Add\", &rand_keys[35], pos[35]);\n+\texpected_pos[35] = pos[35];\n+\tRETURN_IF_ERROR(pos[35] < 0, \"failed to add key (pos[1]=%d)\", pos[35]);\n+\n+\t/* Delete */\n+\tfor (i = 0; i < 64; i++) {\n+\t\tpos[i] = rte_hash_del_key(handle, &rand_keys[i]);\n+\t\tprint_key_info(\"Del\", &rand_keys[i], pos[i]);\n+\t\tRETURN_IF_ERROR(pos[i] != expected_pos[i],\n+\t\t\t\"failed to delete key (pos[%u]=%d)\", i, pos[i]);\n+\t}\n+\n+\t/* Lookup */\n+\tfor (i = 0; i < 64; i++) {\n+\t\tpos[i] = rte_hash_lookup(handle, &rand_keys[i]);\n+\t\tprint_key_info(\"Lkp\", &rand_keys[i], pos[i]);\n+\t\tRETURN_IF_ERROR(pos[i] != -ENOENT,\n+\t\t\t\"fail: found non-existent key (pos[%u]=%d)\", i, pos[i]);\n+\t}\n+\n+\t/* Add again */\n+\tfor (i = 0; i < 64; i++) {\n+\t\tpos[i] = rte_hash_add_key(handle, &rand_keys[i]);\n+\t\tprint_key_info(\"Add\", &rand_keys[i], pos[i]);\n+\t\tRETURN_IF_ERROR(pos[i] < 0,\n+\t\t\t\"failed to add key (pos[%u]=%d)\", i, pos[i]);\n+\t\texpected_pos[i] = pos[i];\n+\t}\n+\n+\trte_hash_free(handle);\n+\n+\t/* Cover the NULL case. */\n+\trte_hash_free(0);\n+\treturn 0;\n+}\n+\n /******************************************************************************/\n static int\n fbk_hash_unit_test(void)\n@@ -1096,7 +1207,7 @@ test_hash_creation_with_good_parameters(void)\n  * Test to see the average table utilization (entries added/max entries)\n  * before hitting a random entry that cannot be added\n  */\n-static int test_average_table_utilization(void)\n+static int test_average_table_utilization(uint32_t ext_table)\n {\n \tstruct rte_hash *handle;\n \tuint8_t simple_key[MAX_KEYSIZE];\n@@ -1107,12 +1218,23 @@ static int test_average_table_utilization(void)\n \n \tprintf(\"\\n# Running test to determine average utilization\"\n \t       \"\\n  before adding elements begins to fail\\n\");\n+\tif (ext_table)\n+\t\tprintf(\"ext table is enabled\\n\");\n+\telse\n+\t\tprintf(\"ext table is disabled\\n\");\n+\n \tprintf(\"Measuring performance, please wait\");\n \tfflush(stdout);\n \tut_params.entries = 1 << 16;\n \tut_params.name = \"test_average_utilization\";\n \tut_params.hash_func = rte_jhash;\n+\tif (ext_table)\n+\t\tut_params.extra_flag |= RTE_HASH_EXTRA_FLAGS_EXT_TABLE;\n+\telse\n+\t\tut_params.extra_flag &= ~RTE_HASH_EXTRA_FLAGS_EXT_TABLE;\n+\n \thandle = rte_hash_create(&ut_params);\n+\n \tRETURN_IF_ERROR(handle == NULL, \"hash creation failed\");\n \n \tfor (j = 0; j < ITERATIONS; j++) {\n@@ -1161,7 +1283,7 @@ static int test_average_table_utilization(void)\n }\n \n #define NUM_ENTRIES 256\n-static int test_hash_iteration(void)\n+static int test_hash_iteration(uint32_t ext_table)\n {\n \tstruct rte_hash *handle;\n \tunsigned i;\n@@ -1177,6 +1299,11 @@ static int test_hash_iteration(void)\n \tut_params.name = \"test_hash_iteration\";\n \tut_params.hash_func = rte_jhash;\n \tut_params.key_len = 16;\n+\tif (ext_table)\n+\t\tut_params.extra_flag |= RTE_HASH_EXTRA_FLAGS_EXT_TABLE;\n+\telse\n+\t\tut_params.extra_flag &= ~RTE_HASH_EXTRA_FLAGS_EXT_TABLE;\n+\n \thandle = rte_hash_create(&ut_params);\n \tRETURN_IF_ERROR(handle == NULL, \"hash creation failed\");\n \n@@ -1474,6 +1601,8 @@ test_hash(void)\n \t\treturn -1;\n \tif (test_full_bucket() < 0)\n \t\treturn -1;\n+\tif (test_extendable_bucket() < 0)\n+\t\treturn -1;\n \n \tif (test_fbk_hash_find_existing() < 0)\n \t\treturn -1;\n@@ -1483,9 +1612,17 @@ test_hash(void)\n \t\treturn -1;\n \tif (test_hash_creation_with_good_parameters() < 0)\n \t\treturn -1;\n-\tif (test_average_table_utilization() < 0)\n+\n+\t/* ext table disabled */\n+\tif (test_average_table_utilization(0) < 0)\n+\t\treturn -1;\n+\tif (test_hash_iteration(0) < 0)\n+\t\treturn -1;\n+\n+\t/* ext table enabled */\n+\tif (test_average_table_utilization(1) < 0)\n \t\treturn -1;\n-\tif (test_hash_iteration() < 0)\n+\tif (test_hash_iteration(1) < 0)\n \t\treturn -1;\n \n \trun_hash_func_tests();\ndiff --git a/test/test/test_hash_perf.c b/test/test/test_hash_perf.c\nindex 4d00c20..d169cd0 100644\n--- a/test/test/test_hash_perf.c\n+++ b/test/test/test_hash_perf.c\n@@ -18,7 +18,8 @@\n #include \"test.h\"\n \n #define MAX_ENTRIES (1 << 19)\n-#define KEYS_TO_ADD (MAX_ENTRIES * 3 / 4) /* 75% table utilization */\n+#define KEYS_TO_ADD (MAX_ENTRIES)\n+#define ADD_PERCENT 0.75 /* 75% table utilization */\n #define NUM_LOOKUPS (KEYS_TO_ADD * 5) /* Loop among keys added, several times */\n #define BUCKET_SIZE 8\n #define NUM_BUCKETS (MAX_ENTRIES / BUCKET_SIZE)\n@@ -77,7 +78,7 @@ static struct rte_hash_parameters ut_params = {\n \n static int\n create_table(unsigned int with_data, unsigned int table_index,\n-\t\tunsigned int with_locks)\n+\t\tunsigned int with_locks, unsigned int ext)\n {\n \tchar name[RTE_HASH_NAMESIZE];\n \n@@ -95,6 +96,9 @@ create_table(unsigned int with_data, unsigned int table_index,\n \telse\n \t\tut_params.extra_flag = 0;\n \n+\tif (ext)\n+\t\tut_params.extra_flag |= RTE_HASH_EXTRA_FLAGS_EXT_TABLE;\n+\n \tut_params.name = name;\n \tut_params.key_len = hashtest_key_lens[table_index];\n \tut_params.socket_id = rte_socket_id();\n@@ -116,15 +120,21 @@ create_table(unsigned int with_data, unsigned int table_index,\n \n /* Shuffle the keys that have been added, so lookups will be totally random */\n static void\n-shuffle_input_keys(unsigned table_index)\n+shuffle_input_keys(unsigned int table_index, unsigned int ext)\n {\n \tunsigned i;\n \tuint32_t swap_idx;\n \tuint8_t temp_key[MAX_KEYSIZE];\n \thash_sig_t temp_signature;\n \tint32_t temp_position;\n+\tunsigned int keys_to_add;\n+\n+\tif (!ext)\n+\t\tkeys_to_add = KEYS_TO_ADD * ADD_PERCENT;\n+\telse\n+\t\tkeys_to_add = KEYS_TO_ADD;\n \n-\tfor (i = KEYS_TO_ADD - 1; i > 0; i--) {\n+\tfor (i = keys_to_add - 1; i > 0; i--) {\n \t\tswap_idx = rte_rand() % i;\n \n \t\tmemcpy(temp_key, keys[i], hashtest_key_lens[table_index]);\n@@ -146,14 +156,20 @@ shuffle_input_keys(unsigned table_index)\n  * ALL can fit in hash table (no errors)\n  */\n static int\n-get_input_keys(unsigned with_pushes, unsigned table_index)\n+get_input_keys(unsigned int with_pushes, unsigned int table_index,\n+\t\t\t\t\t\t\tunsigned int ext)\n {\n \tunsigned i, j;\n \tunsigned bucket_idx, incr, success = 1;\n \tuint8_t k = 0;\n \tint32_t ret;\n \tconst uint32_t bucket_bitmask = NUM_BUCKETS - 1;\n+\tunsigned int keys_to_add;\n \n+\tif (!ext)\n+\t\tkeys_to_add = KEYS_TO_ADD * ADD_PERCENT;\n+\telse\n+\t\tkeys_to_add = KEYS_TO_ADD;\n \t/* Reset all arrays */\n \tfor (i = 0; i < MAX_ENTRIES; i++)\n \t\tslot_taken[i] = 0;\n@@ -170,7 +186,7 @@ get_input_keys(unsigned with_pushes, unsigned table_index)\n \t * Regardless a key has been added correctly or not (success),\n \t * the next one to try will be increased by 1.\n \t */\n-\tfor (i = 0; i < KEYS_TO_ADD;) {\n+\tfor (i = 0; i < keys_to_add;) {\n \t\tincr = 0;\n \t\tif (i != 0) {\n \t\t\tkeys[i][0] = ++k;\n@@ -234,14 +250,20 @@ get_input_keys(unsigned with_pushes, unsigned table_index)\n }\n \n static int\n-timed_adds(unsigned with_hash, unsigned with_data, unsigned table_index)\n+timed_adds(unsigned int with_hash, unsigned int with_data,\n+\t\t\t\tunsigned int table_index, unsigned int ext)\n {\n \tunsigned i;\n \tconst uint64_t start_tsc = rte_rdtsc();\n \tvoid *data;\n \tint32_t ret;\n+\tunsigned int keys_to_add;\n+\tif (!ext)\n+\t\tkeys_to_add = KEYS_TO_ADD * ADD_PERCENT;\n+\telse\n+\t\tkeys_to_add = KEYS_TO_ADD;\n \n-\tfor (i = 0; i < KEYS_TO_ADD; i++) {\n+\tfor (i = 0; i < keys_to_add; i++) {\n \t\tdata = (void *) ((uintptr_t) signatures[i]);\n \t\tif (with_hash && with_data) {\n \t\t\tret = rte_hash_add_key_with_hash_data(h[table_index],\n@@ -283,22 +305,31 @@ timed_adds(unsigned with_hash, unsigned with_data, unsigned table_index)\n \tconst uint64_t end_tsc = rte_rdtsc();\n \tconst uint64_t time_taken = end_tsc - start_tsc;\n \n-\tcycles[table_index][ADD][with_hash][with_data] = time_taken/KEYS_TO_ADD;\n+\tcycles[table_index][ADD][with_hash][with_data] = time_taken/keys_to_add;\n \n \treturn 0;\n }\n \n static int\n-timed_lookups(unsigned with_hash, unsigned with_data, unsigned table_index)\n+timed_lookups(unsigned int with_hash, unsigned int with_data,\n+\t\t\t\tunsigned int table_index, unsigned int ext)\n {\n \tunsigned i, j;\n \tconst uint64_t start_tsc = rte_rdtsc();\n \tvoid *ret_data;\n \tvoid *expected_data;\n \tint32_t ret;\n-\n-\tfor (i = 0; i < NUM_LOOKUPS/KEYS_TO_ADD; i++) {\n-\t\tfor (j = 0; j < KEYS_TO_ADD; j++) {\n+\tunsigned int keys_to_add, num_lookups;\n+\n+\tif (!ext) {\n+\t\tkeys_to_add = KEYS_TO_ADD * ADD_PERCENT;\n+\t\tnum_lookups = NUM_LOOKUPS * ADD_PERCENT;\n+\t} else {\n+\t\tkeys_to_add = KEYS_TO_ADD;\n+\t\tnum_lookups = NUM_LOOKUPS;\n+\t}\n+\tfor (i = 0; i < num_lookups / keys_to_add; i++) {\n+\t\tfor (j = 0; j < keys_to_add; j++) {\n \t\t\tif (with_hash && with_data) {\n \t\t\t\tret = rte_hash_lookup_with_hash_data(h[table_index],\n \t\t\t\t\t\t\t(const void *) keys[j],\n@@ -351,13 +382,14 @@ timed_lookups(unsigned with_hash, unsigned with_data, unsigned table_index)\n \tconst uint64_t end_tsc = rte_rdtsc();\n \tconst uint64_t time_taken = end_tsc - start_tsc;\n \n-\tcycles[table_index][LOOKUP][with_hash][with_data] = time_taken/NUM_LOOKUPS;\n+\tcycles[table_index][LOOKUP][with_hash][with_data] = time_taken/num_lookups;\n \n \treturn 0;\n }\n \n static int\n-timed_lookups_multi(unsigned with_data, unsigned table_index)\n+timed_lookups_multi(unsigned int with_data, unsigned int table_index,\n+\t\t\t\t\t\t\tunsigned int ext)\n {\n \tunsigned i, j, k;\n \tint32_t positions_burst[BURST_SIZE];\n@@ -366,11 +398,20 @@ timed_lookups_multi(unsigned with_data, unsigned table_index)\n \tvoid *ret_data[BURST_SIZE];\n \tuint64_t hit_mask;\n \tint ret;\n+\tunsigned int keys_to_add, num_lookups;\n+\n+\tif (!ext) {\n+\t\tkeys_to_add = KEYS_TO_ADD * ADD_PERCENT;\n+\t\tnum_lookups = NUM_LOOKUPS * ADD_PERCENT;\n+\t} else {\n+\t\tkeys_to_add = KEYS_TO_ADD;\n+\t\tnum_lookups = NUM_LOOKUPS;\n+\t}\n \n \tconst uint64_t start_tsc = rte_rdtsc();\n \n-\tfor (i = 0; i < NUM_LOOKUPS/KEYS_TO_ADD; i++) {\n-\t\tfor (j = 0; j < KEYS_TO_ADD/BURST_SIZE; j++) {\n+\tfor (i = 0; i < num_lookups/keys_to_add; i++) {\n+\t\tfor (j = 0; j < keys_to_add/BURST_SIZE; j++) {\n \t\t\tfor (k = 0; k < BURST_SIZE; k++)\n \t\t\t\tkeys_burst[k] = keys[j * BURST_SIZE + k];\n \t\t\tif (with_data) {\n@@ -418,19 +459,25 @@ timed_lookups_multi(unsigned with_data, unsigned table_index)\n \tconst uint64_t end_tsc = rte_rdtsc();\n \tconst uint64_t time_taken = end_tsc - start_tsc;\n \n-\tcycles[table_index][LOOKUP_MULTI][0][with_data] = time_taken/NUM_LOOKUPS;\n+\tcycles[table_index][LOOKUP_MULTI][0][with_data] = time_taken/num_lookups;\n \n \treturn 0;\n }\n \n static int\n-timed_deletes(unsigned with_hash, unsigned with_data, unsigned table_index)\n+timed_deletes(unsigned int with_hash, unsigned int with_data,\n+\t\t\t\tunsigned int table_index, unsigned int ext)\n {\n \tunsigned i;\n \tconst uint64_t start_tsc = rte_rdtsc();\n \tint32_t ret;\n+\tunsigned int keys_to_add;\n+\tif (!ext)\n+\t\tkeys_to_add = KEYS_TO_ADD * ADD_PERCENT;\n+\telse\n+\t\tkeys_to_add = KEYS_TO_ADD;\n \n-\tfor (i = 0; i < KEYS_TO_ADD; i++) {\n+\tfor (i = 0; i < keys_to_add; i++) {\n \t\t/* There are no delete functions with data, so just call two functions */\n \t\tif (with_hash)\n \t\t\tret = rte_hash_del_key_with_hash(h[table_index],\n@@ -450,7 +497,7 @@ timed_deletes(unsigned with_hash, unsigned with_data, unsigned table_index)\n \tconst uint64_t end_tsc = rte_rdtsc();\n \tconst uint64_t time_taken = end_tsc - start_tsc;\n \n-\tcycles[table_index][DELETE][with_hash][with_data] = time_taken/KEYS_TO_ADD;\n+\tcycles[table_index][DELETE][with_hash][with_data] = time_taken/keys_to_add;\n \n \treturn 0;\n }\n@@ -468,7 +515,8 @@ reset_table(unsigned table_index)\n }\n \n static int\n-run_all_tbl_perf_tests(unsigned int with_pushes, unsigned int with_locks)\n+run_all_tbl_perf_tests(unsigned int with_pushes, unsigned int with_locks,\n+\t\t\t\t\t\tunsigned int ext)\n {\n \tunsigned i, j, with_data, with_hash;\n \n@@ -477,25 +525,25 @@ run_all_tbl_perf_tests(unsigned int with_pushes, unsigned int with_locks)\n \n \tfor (with_data = 0; with_data <= 1; with_data++) {\n \t\tfor (i = 0; i < NUM_KEYSIZES; i++) {\n-\t\t\tif (create_table(with_data, i, with_locks) < 0)\n+\t\t\tif (create_table(with_data, i, with_locks, ext) < 0)\n \t\t\t\treturn -1;\n \n-\t\t\tif (get_input_keys(with_pushes, i) < 0)\n+\t\t\tif (get_input_keys(with_pushes, i, ext) < 0)\n \t\t\t\treturn -1;\n \t\t\tfor (with_hash = 0; with_hash <= 1; with_hash++) {\n-\t\t\t\tif (timed_adds(with_hash, with_data, i) < 0)\n+\t\t\t\tif (timed_adds(with_hash, with_data, i, ext) < 0)\n \t\t\t\t\treturn -1;\n \n \t\t\t\tfor (j = 0; j < NUM_SHUFFLES; j++)\n-\t\t\t\t\tshuffle_input_keys(i);\n+\t\t\t\t\tshuffle_input_keys(i, ext);\n \n-\t\t\t\tif (timed_lookups(with_hash, with_data, i) < 0)\n+\t\t\t\tif (timed_lookups(with_hash, with_data, i, ext) < 0)\n \t\t\t\t\treturn -1;\n \n-\t\t\t\tif (timed_lookups_multi(with_data, i) < 0)\n+\t\t\t\tif (timed_lookups_multi(with_data, i, ext) < 0)\n \t\t\t\t\treturn -1;\n \n-\t\t\t\tif (timed_deletes(with_hash, with_data, i) < 0)\n+\t\t\t\tif (timed_deletes(with_hash, with_data, i, ext) < 0)\n \t\t\t\t\treturn -1;\n \n \t\t\t\t/* Print a dot to show progress on operations */\n@@ -631,10 +679,16 @@ test_hash_perf(void)\n \t\t\t\tprintf(\"\\nALL ELEMENTS IN PRIMARY LOCATION\\n\");\n \t\t\telse\n \t\t\t\tprintf(\"\\nELEMENTS IN PRIMARY OR SECONDARY LOCATION\\n\");\n-\t\t\tif (run_all_tbl_perf_tests(with_pushes, with_locks) < 0)\n+\t\t\tif (run_all_tbl_perf_tests(with_pushes, with_locks, 0) < 0)\n \t\t\t\treturn -1;\n \t\t}\n \t}\n+\n+\tprintf(\"\\n EXTENDABLE BUCKETS PERFORMANCE\\n\");\n+\n+\tif (run_all_tbl_perf_tests(1, 0, 1) < 0)\n+\t\treturn -1;\n+\n \tif (fbk_hash_perf_test() < 0)\n \t\treturn -1;\n \n",
    "prefixes": [
        "v1",
        "4/5"
    ]
}