get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 47984,
    "url": "http://patchwork.dpdk.org/api/patches/47984/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20181110185534.5444-2-honnappa.nagarahalli@arm.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20181110185534.5444-2-honnappa.nagarahalli@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20181110185534.5444-2-honnappa.nagarahalli@arm.com",
    "date": "2018-11-10T18:55:34",
    "name": "[v2,1/1] hash: separate lf and rw lock lookup code paths",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "55d4ce47b7eceb3ebc7ee3d3351c87814b92d1e2",
    "submitter": {
        "id": 1045,
        "url": "http://patchwork.dpdk.org/api/people/1045/?format=api",
        "name": "Honnappa Nagarahalli",
        "email": "honnappa.nagarahalli@arm.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20181110185534.5444-2-honnappa.nagarahalli@arm.com/mbox/",
    "series": [
        {
            "id": 2347,
            "url": "http://patchwork.dpdk.org/api/series/2347/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2347",
            "date": "2018-11-10T18:55:33",
            "name": "hash: separate lf and rw lock lookup code paths",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/2347/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/47984/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/47984/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 F03F64C77;\n\tSat, 10 Nov 2018 19:56:10 +0100 (CET)",
            "from foss.arm.com (foss.arm.com [217.140.101.70])\n\tby dpdk.org (Postfix) with ESMTP id 79DF849E0\n\tfor <dev@dpdk.org>; Sat, 10 Nov 2018 19:56:09 +0100 (CET)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8CE23EBD;\n\tSat, 10 Nov 2018 10:56:08 -0800 (PST)",
            "from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com\n\t[10.118.14.34])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id\n\t0A16A3F5C0; Sat, 10 Nov 2018 10:56:08 -0800 (PST)"
        ],
        "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>",
        "To": "bruce.richardson@intel.com,\n\tpablo.de.lara.guarch@intel.com",
        "Cc": "dev@dpdk.org, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com,\n\tchaozhu@linux.vnet.ibm.com, yipeng1.wang@intel.com,\n\tdharmik.thakkar@arm.com, gavin.hu@arm.com, honnappa.nagarahalli@arm.com, \n\tnd@arm.com",
        "Date": "Sat, 10 Nov 2018 12:55:34 -0600",
        "Message-Id": "<20181110185534.5444-2-honnappa.nagarahalli@arm.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20181110185534.5444-1-honnappa.nagarahalli@arm.com>",
        "References": "<20181109163917.16845-1-honnappa.nagarahalli@arm.com>\n\t<20181110185534.5444-1-honnappa.nagarahalli@arm.com>",
        "Subject": "[dpdk-dev] [PATCH v2 1/1] hash: separate lf and rw lock lookup code\n\tpaths",
        "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": "The lock-free algorithm has caused significant lookup\nperformance regression for certain use cases. The\nregression is attributed to the use of non-relaxed\nmemory orderings. 2 versions of the lookup functions\nare created. One that uses the RW lock and the one that\nis lock-free. This restores the performance regression\ncaused for use cases that used RW lock version of the\nlookup function.\n\nFixes: e605a1d36 (\"hash: add lock-free r/w concurrency\")\nCc: honnappa.nagarahalli@arm.com\n\nSuggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>\nSigned-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nReviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>\nReviewed-by: Gavin Hu <gavin.hu@arm.com>\n---\n lib/librte_hash/rte_cuckoo_hash.c | 304 ++++++++++++++++++++++++++++--\n 1 file changed, 290 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c\nindex 5ddcccd87..e68bf336b 100644\n--- a/lib/librte_hash/rte_cuckoo_hash.c\n+++ b/lib/librte_hash/rte_cuckoo_hash.c\n@@ -1129,9 +1129,38 @@ rte_hash_add_key_data(const struct rte_hash *h, const void *key, void *data)\n \t\treturn ret;\n }\n \n+/* Search one bucket to find the match key - uses rw lock */\n+static inline int32_t\n+search_one_bucket_l(const struct rte_hash *h, const void *key,\n+\t\tuint16_t sig, void **data,\n+\t\tconst struct rte_hash_bucket *bkt)\n+{\n+\tint i;\n+\tstruct rte_hash_key *k, *keys = h->key_store;\n+\n+\tfor (i = 0; i < RTE_HASH_BUCKET_ENTRIES; i++) {\n+\t\tif (bkt->sig_current[i] == sig &&\n+\t\t\t\tbkt->key_idx[i] != EMPTY_SLOT) {\n+\t\t\tk = (struct rte_hash_key *) ((char *)keys +\n+\t\t\t\t\tbkt->key_idx[i] * h->key_entry_size);\n+\n+\t\t\tif (rte_hash_cmp_eq(key, k->key, h) == 0) {\n+\t\t\t\tif (data != NULL)\n+\t\t\t\t\t*data = k->pdata;\n+\t\t\t\t/*\n+\t\t\t\t * Return index where key is stored,\n+\t\t\t\t * subtracting the first dummy index\n+\t\t\t\t */\n+\t\t\t\treturn bkt->key_idx[i] - 1;\n+\t\t\t}\n+\t\t}\n+\t}\n+\treturn -1;\n+}\n+\n /* Search one bucket to find the match key */\n static inline int32_t\n-search_one_bucket(const struct rte_hash *h, const void *key, uint16_t sig,\n+search_one_bucket_lf(const struct rte_hash *h, const void *key, uint16_t sig,\n \t\t\tvoid **data, const struct rte_hash_bucket *bkt)\n {\n \tint i;\n@@ -1163,12 +1192,11 @@ search_one_bucket(const struct rte_hash *h, const void *key, uint16_t sig,\n }\n \n static inline int32_t\n-__rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key,\n-\t\t\t\t\thash_sig_t sig, void **data)\n+__rte_hash_lookup_with_hash_l(const struct rte_hash *h, const void *key,\n+\t\t\t\thash_sig_t sig, void **data)\n {\n \tuint32_t prim_bucket_idx, sec_bucket_idx;\n \tstruct rte_hash_bucket *bkt, *cur_bkt;\n-\tuint32_t cnt_b, cnt_a;\n \tint ret;\n \tuint16_t short_sig;\n \n@@ -1176,8 +1204,48 @@ __rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key,\n \tprim_bucket_idx = get_prim_bucket_index(h, sig);\n \tsec_bucket_idx = get_alt_bucket_index(h, prim_bucket_idx, short_sig);\n \n+\tbkt = &h->buckets[prim_bucket_idx];\n+\n \t__hash_rw_reader_lock(h);\n \n+\t/* Check if key is in primary location */\n+\tret = search_one_bucket_l(h, key, short_sig, data, bkt);\n+\tif (ret != -1) {\n+\t\t__hash_rw_reader_unlock(h);\n+\t\treturn ret;\n+\t}\n+\t/* Calculate secondary hash */\n+\tbkt = &h->buckets[sec_bucket_idx];\n+\n+\t/* Check if key is in secondary location */\n+\tFOR_EACH_BUCKET(cur_bkt, bkt) {\n+\t\tret = search_one_bucket_l(h, key, short_sig,\n+\t\t\t\t\tdata, cur_bkt);\n+\t\tif (ret != -1) {\n+\t\t\t__hash_rw_reader_unlock(h);\n+\t\t\treturn ret;\n+\t\t}\n+\t}\n+\n+\t__hash_rw_reader_unlock(h);\n+\n+\treturn -ENOENT;\n+}\n+\n+static inline int32_t\n+__rte_hash_lookup_with_hash_lf(const struct rte_hash *h, const void *key,\n+\t\t\t\t\thash_sig_t sig, void **data)\n+{\n+\tuint32_t prim_bucket_idx, sec_bucket_idx;\n+\tstruct rte_hash_bucket *bkt, *cur_bkt;\n+\tuint32_t cnt_b, cnt_a;\n+\tint ret;\n+\tuint16_t short_sig;\n+\n+\tshort_sig = get_short_sig(sig);\n+\tprim_bucket_idx = get_prim_bucket_index(h, sig);\n+\tsec_bucket_idx = get_alt_bucket_index(h, prim_bucket_idx, short_sig);\n+\n \tdo {\n \t\t/* Load the table change counter before the lookup\n \t\t * starts. Acquire semantics will make sure that\n@@ -1188,7 +1256,7 @@ __rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key,\n \n \t\t/* Check if key is in primary location */\n \t\tbkt = &h->buckets[prim_bucket_idx];\n-\t\tret = search_one_bucket(h, key, short_sig, data, bkt);\n+\t\tret = search_one_bucket_lf(h, key, short_sig, data, bkt);\n \t\tif (ret != -1) {\n \t\t\t__hash_rw_reader_unlock(h);\n \t\t\treturn ret;\n@@ -1198,7 +1266,7 @@ __rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key,\n \n \t\t/* Check if key is in secondary location */\n \t\tFOR_EACH_BUCKET(cur_bkt, bkt) {\n-\t\t\tret = search_one_bucket(h, key, short_sig,\n+\t\t\tret = search_one_bucket_lf(h, key, short_sig,\n \t\t\t\t\t\tdata, cur_bkt);\n \t\t\tif (ret != -1) {\n \t\t\t\t__hash_rw_reader_unlock(h);\n@@ -1222,11 +1290,19 @@ __rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key,\n \t\t\t\t\t__ATOMIC_ACQUIRE);\n \t} while (cnt_b != cnt_a);\n \n-\t__hash_rw_reader_unlock(h);\n-\n \treturn -ENOENT;\n }\n \n+static inline int32_t\n+__rte_hash_lookup_with_hash(const struct rte_hash *h, const void *key,\n+\t\t\t\t\thash_sig_t sig, void **data)\n+{\n+\tif (h->readwrite_concur_lf_support)\n+\t\treturn __rte_hash_lookup_with_hash_lf(h, key, sig, data);\n+\telse\n+\t\treturn __rte_hash_lookup_with_hash_l(h, key, sig, data);\n+}\n+\n int32_t\n rte_hash_lookup_with_hash(const struct rte_hash *h,\n \t\t\tconst void *key, hash_sig_t sig)\n@@ -1528,7 +1604,197 @@ compare_signatures(uint32_t *prim_hash_matches, uint32_t *sec_hash_matches,\n \n #define PREFETCH_OFFSET 4\n static inline void\n-__rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys,\n+__rte_hash_lookup_bulk_l(const struct rte_hash *h, const void **keys,\n+\t\t\tint32_t num_keys, int32_t *positions,\n+\t\t\tuint64_t *hit_mask, void *data[])\n+{\n+\tuint64_t hits = 0;\n+\tint32_t i;\n+\tint32_t ret;\n+\tuint32_t prim_hash[RTE_HASH_LOOKUP_BULK_MAX];\n+\tuint32_t prim_index[RTE_HASH_LOOKUP_BULK_MAX];\n+\tuint32_t sec_index[RTE_HASH_LOOKUP_BULK_MAX];\n+\tuint16_t sig[RTE_HASH_LOOKUP_BULK_MAX];\n+\tconst struct rte_hash_bucket *primary_bkt[RTE_HASH_LOOKUP_BULK_MAX];\n+\tconst struct rte_hash_bucket *secondary_bkt[RTE_HASH_LOOKUP_BULK_MAX];\n+\tuint32_t prim_hitmask[RTE_HASH_LOOKUP_BULK_MAX] = {0};\n+\tuint32_t sec_hitmask[RTE_HASH_LOOKUP_BULK_MAX] = {0};\n+\tstruct rte_hash_bucket *cur_bkt, *next_bkt;\n+\n+\t/* Prefetch first keys */\n+\tfor (i = 0; i < PREFETCH_OFFSET && i < num_keys; i++)\n+\t\trte_prefetch0(keys[i]);\n+\n+\t/*\n+\t * Prefetch rest of the keys, calculate primary and\n+\t * secondary bucket and prefetch them\n+\t */\n+\tfor (i = 0; i < (num_keys - PREFETCH_OFFSET); i++) {\n+\t\trte_prefetch0(keys[i + PREFETCH_OFFSET]);\n+\n+\t\tprim_hash[i] = rte_hash_hash(h, keys[i]);\n+\n+\t\tsig[i] = get_short_sig(prim_hash[i]);\n+\t\tprim_index[i] = get_prim_bucket_index(h, prim_hash[i]);\n+\t\tsec_index[i] = get_alt_bucket_index(h, prim_index[i], sig[i]);\n+\n+\t\tprimary_bkt[i] = &h->buckets[prim_index[i]];\n+\t\tsecondary_bkt[i] = &h->buckets[sec_index[i]];\n+\n+\t\trte_prefetch0(primary_bkt[i]);\n+\t\trte_prefetch0(secondary_bkt[i]);\n+\t}\n+\n+\t/* Calculate and prefetch rest of the buckets */\n+\tfor (; i < num_keys; i++) {\n+\t\tprim_hash[i] = rte_hash_hash(h, keys[i]);\n+\n+\t\tsig[i] = get_short_sig(prim_hash[i]);\n+\t\tprim_index[i] = get_prim_bucket_index(h, prim_hash[i]);\n+\t\tsec_index[i] = get_alt_bucket_index(h, prim_index[i], sig[i]);\n+\n+\t\tprimary_bkt[i] = &h->buckets[prim_index[i]];\n+\t\tsecondary_bkt[i] = &h->buckets[sec_index[i]];\n+\n+\t\trte_prefetch0(primary_bkt[i]);\n+\t\trte_prefetch0(secondary_bkt[i]);\n+\t}\n+\n+\t__hash_rw_reader_lock(h);\n+\n+\t/* Compare signatures and prefetch key slot of first hit */\n+\tfor (i = 0; i < num_keys; i++) {\n+\t\tcompare_signatures(&prim_hitmask[i], &sec_hitmask[i],\n+\t\t\tprimary_bkt[i], secondary_bkt[i],\n+\t\t\tsig[i], h->sig_cmp_fn);\n+\n+\t\tif (prim_hitmask[i]) {\n+\t\t\tuint32_t first_hit =\n+\t\t\t\t\t__builtin_ctzl(prim_hitmask[i])\n+\t\t\t\t\t>> 1;\n+\t\t\tuint32_t key_idx =\n+\t\t\t\tprimary_bkt[i]->key_idx[first_hit];\n+\t\t\tconst struct rte_hash_key *key_slot =\n+\t\t\t\t(const struct rte_hash_key *)(\n+\t\t\t\t(const char *)h->key_store +\n+\t\t\t\tkey_idx * h->key_entry_size);\n+\t\t\trte_prefetch0(key_slot);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\tif (sec_hitmask[i]) {\n+\t\t\tuint32_t first_hit =\n+\t\t\t\t\t__builtin_ctzl(sec_hitmask[i])\n+\t\t\t\t\t>> 1;\n+\t\t\tuint32_t key_idx =\n+\t\t\t\tsecondary_bkt[i]->key_idx[first_hit];\n+\t\t\tconst struct rte_hash_key *key_slot =\n+\t\t\t\t(const struct rte_hash_key *)(\n+\t\t\t\t(const char *)h->key_store +\n+\t\t\t\tkey_idx * h->key_entry_size);\n+\t\t\trte_prefetch0(key_slot);\n+\t\t}\n+\t}\n+\n+\t/* Compare keys, first hits in primary first */\n+\tfor (i = 0; i < num_keys; i++) {\n+\t\tpositions[i] = -ENOENT;\n+\t\twhile (prim_hitmask[i]) {\n+\t\t\tuint32_t hit_index =\n+\t\t\t\t\t__builtin_ctzl(prim_hitmask[i])\n+\t\t\t\t\t>> 1;\n+\t\t\tuint32_t key_idx =\n+\t\t\t\tprimary_bkt[i]->key_idx[hit_index];\n+\t\t\tconst struct rte_hash_key *key_slot =\n+\t\t\t\t(const struct rte_hash_key *)(\n+\t\t\t\t(const char *)h->key_store +\n+\t\t\t\tkey_idx * h->key_entry_size);\n+\n+\t\t\t/*\n+\t\t\t * If key index is 0, do not compare key,\n+\t\t\t * as it is checking the dummy slot\n+\t\t\t */\n+\t\t\tif (!!key_idx &\n+\t\t\t\t!rte_hash_cmp_eq(\n+\t\t\t\t\tkey_slot->key, keys[i], h)) {\n+\t\t\t\tif (data != NULL)\n+\t\t\t\t\tdata[i] = key_slot->pdata;\n+\n+\t\t\t\thits |= 1ULL << i;\n+\t\t\t\tpositions[i] = key_idx - 1;\n+\t\t\t\tgoto next_key;\n+\t\t\t}\n+\t\t\tprim_hitmask[i] &= ~(3ULL << (hit_index << 1));\n+\t\t}\n+\n+\t\twhile (sec_hitmask[i]) {\n+\t\t\tuint32_t hit_index =\n+\t\t\t\t\t__builtin_ctzl(sec_hitmask[i])\n+\t\t\t\t\t>> 1;\n+\t\t\tuint32_t key_idx =\n+\t\t\t\tsecondary_bkt[i]->key_idx[hit_index];\n+\t\t\tconst struct rte_hash_key *key_slot =\n+\t\t\t\t(const struct rte_hash_key *)(\n+\t\t\t\t(const char *)h->key_store +\n+\t\t\t\tkey_idx * h->key_entry_size);\n+\n+\t\t\t/*\n+\t\t\t * If key index is 0, do not compare key,\n+\t\t\t * as it is checking the dummy slot\n+\t\t\t */\n+\n+\t\t\tif (!!key_idx &\n+\t\t\t\t!rte_hash_cmp_eq(\n+\t\t\t\t\tkey_slot->key, keys[i], h)) {\n+\t\t\t\tif (data != NULL)\n+\t\t\t\t\tdata[i] = key_slot->pdata;\n+\n+\t\t\t\thits |= 1ULL << i;\n+\t\t\t\tpositions[i] = key_idx - 1;\n+\t\t\t\tgoto next_key;\n+\t\t\t}\n+\t\t\tsec_hitmask[i] &= ~(3ULL << (hit_index << 1));\n+\t\t}\n+next_key:\n+\t\tcontinue;\n+\t}\n+\n+\t/* all found, do not need to go through ext bkt */\n+\tif ((hits == ((1ULL << num_keys) - 1)) || !h->ext_table_support) {\n+\t\tif (hit_mask != NULL)\n+\t\t\t*hit_mask = hits;\n+\t\t__hash_rw_reader_unlock(h);\n+\t\treturn;\n+\t}\n+\n+\t/* need to check ext buckets for match */\n+\tfor (i = 0; i < num_keys; i++) {\n+\t\tif ((hits & (1ULL << i)) != 0)\n+\t\t\tcontinue;\n+\t\tnext_bkt = secondary_bkt[i]->next;\n+\t\tFOR_EACH_BUCKET(cur_bkt, next_bkt) {\n+\t\t\tif (data != NULL)\n+\t\t\t\tret = search_one_bucket_l(h, keys[i],\n+\t\t\t\t\t\tsig[i], &data[i], cur_bkt);\n+\t\t\telse\n+\t\t\t\tret = search_one_bucket_l(h, keys[i],\n+\t\t\t\t\t\tsig[i], NULL, cur_bkt);\n+\t\t\tif (ret != -1) {\n+\t\t\t\tpositions[i] = ret;\n+\t\t\t\thits |= 1ULL << i;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\t__hash_rw_reader_unlock(h);\n+\n+\tif (hit_mask != NULL)\n+\t\t*hit_mask = hits;\n+}\n+\n+static inline void\n+__rte_hash_lookup_bulk_lf(const struct rte_hash *h, const void **keys,\n \t\t\tint32_t num_keys, int32_t *positions,\n \t\t\tuint64_t *hit_mask, void *data[])\n {\n@@ -1586,7 +1852,6 @@ __rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys,\n \t\trte_prefetch0(secondary_bkt[i]);\n \t}\n \n-\t__hash_rw_reader_lock(h);\n \tdo {\n \t\t/* Load the table change counter before the lookup\n \t\t * starts. Acquire semantics will make sure that\n@@ -1735,10 +2000,10 @@ __rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys,\n \t\tnext_bkt = secondary_bkt[i]->next;\n \t\tFOR_EACH_BUCKET(cur_bkt, next_bkt) {\n \t\t\tif (data != NULL)\n-\t\t\t\tret = search_one_bucket(h, keys[i],\n+\t\t\t\tret = search_one_bucket_lf(h, keys[i],\n \t\t\t\t\t\tsig[i], &data[i], cur_bkt);\n \t\t\telse\n-\t\t\t\tret = search_one_bucket(h, keys[i],\n+\t\t\t\tret = search_one_bucket_lf(h, keys[i],\n \t\t\t\t\t\tsig[i], NULL, cur_bkt);\n \t\t\tif (ret != -1) {\n \t\t\t\tpositions[i] = ret;\n@@ -1748,12 +2013,23 @@ __rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys,\n \t\t}\n \t}\n \n-\t__hash_rw_reader_unlock(h);\n-\n \tif (hit_mask != NULL)\n \t\t*hit_mask = hits;\n }\n \n+static inline void\n+__rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys,\n+\t\t\tint32_t num_keys, int32_t *positions,\n+\t\t\tuint64_t *hit_mask, void *data[])\n+{\n+\tif (h->readwrite_concur_lf_support)\n+\t\treturn __rte_hash_lookup_bulk_lf(h, keys, num_keys,\n+\t\t\t\t\t\tpositions, hit_mask, data);\n+\telse\n+\t\treturn __rte_hash_lookup_bulk_l(h, keys, num_keys,\n+\t\t\t\t\t\tpositions, hit_mask, data);\n+}\n+\n int\n rte_hash_lookup_bulk(const struct rte_hash *h, const void **keys,\n \t\t      uint32_t num_keys, int32_t *positions)\n",
    "prefixes": [
        "v2",
        "1/1"
    ]
}