get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 27869,
    "url": "http://patches.dpdk.org/api/patches/27869/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1503582789-121358-3-git-send-email-cristian.dumitrescu@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": "<1503582789-121358-3-git-send-email-cristian.dumitrescu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1503582789-121358-3-git-send-email-cristian.dumitrescu@intel.com",
    "date": "2017-08-24T13:53:06",
    "name": "[dpdk-dev,2/5] test: update due to api changes in librte_table",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4d949c5ddcca78e19c3d4b9aa91bcf3221cac99b",
    "submitter": {
        "id": 19,
        "url": "http://patches.dpdk.org/api/people/19/?format=api",
        "name": "Cristian Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1503582789-121358-3-git-send-email-cristian.dumitrescu@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/27869/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/27869/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 345A87D6F;\n\tThu, 24 Aug 2017 15:53:17 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id E6E307D30\n\tfor <dev@dpdk.org>; Thu, 24 Aug 2017 15:53:11 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Aug 2017 06:53:11 -0700",
            "from silpixa00382658.ir.intel.com ([10.237.223.29])\n\tby orsmga005.jf.intel.com with ESMTP; 24 Aug 2017 06:53:10 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,421,1498546800\"; d=\"scan'208\";a=\"141567951\"",
        "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 24 Aug 2017 14:53:06 +0100",
        "Message-Id": "<1503582789-121358-3-git-send-email-cristian.dumitrescu@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1503582789-121358-1-git-send-email-cristian.dumitrescu@intel.com>",
        "References": "<1503582789-121358-1-git-send-email-cristian.dumitrescu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 2/5] test: update due to api changes in\n\tlibrte_table",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n test/test/test_table.c          |   1 +\n test/test/test_table.h          |   3 +-\n test/test/test_table_combined.c | 140 +++++++++++++++++--------------------\n test/test/test_table_tables.c   | 148 +++++++++++++++++-----------------------\n 4 files changed, 128 insertions(+), 164 deletions(-)",
    "diff": "diff --git a/test/test/test_table.c b/test/test/test_table.c\nindex 9e9eed8..db7d4e6 100644\n--- a/test/test/test_table.c\n+++ b/test/test/test_table.c\n@@ -72,6 +72,7 @@ static void app_init_rings(void);\n static void app_init_mbuf_pools(void);\n \n uint64_t pipeline_test_hash(void *key,\n+\t\t__attribute__((unused)) void *key_mask,\n \t\t__attribute__((unused)) uint32_t key_size,\n \t\t__attribute__((unused)) uint64_t seed)\n {\ndiff --git a/test/test/test_table.h b/test/test/test_table.h\nindex 84d1845..8c1df33 100644\n--- a/test/test/test_table.h\n+++ b/test/test/test_table.h\n@@ -94,7 +94,7 @@\n \t\t\tAPP_METADATA_OFFSET(32));\t\t\\\n \tk32 = (uint32_t *) key;\t\t\t\t\t\t\\\n \tk32[0] = (value);\t\t\t\t\t\t\\\n-\t*signature = pipeline_test_hash(key, 0, 0);\t\t\t\\\n+\t*signature = pipeline_test_hash(key, NULL, 0, 0);\t\t\\\n \trte_ring_enqueue((ring), m);\t\t\t\t\t\\\n } while (0)\n \n@@ -131,6 +131,7 @@\n /* Function definitions */\n uint64_t pipeline_test_hash(\n \tvoid *key,\n+\t__attribute__((unused)) void *key_mask,\n \t__attribute__((unused)) uint32_t key_size,\n \t__attribute__((unused)) uint64_t seed);\n \ndiff --git a/test/test/test_table_combined.c b/test/test/test_table_combined.c\nindex a2d19a1..417bc42 100644\n--- a/test/test/test_table_combined.c\n+++ b/test/test/test_table_combined.c\n@@ -200,8 +200,6 @@ test_table_type(struct rte_table_ops *table_ops, void *table_args,\n \t\treturn -CHECK_TABLE_CONSISTENCY;\n \t}\n \n-\n-\n \t/* Flow test - All hits */\n \tif (table_packets->n_hit_packets) {\n \t\tfor (i = 0; i < table_packets->n_hit_packets; i++)\n@@ -248,7 +246,6 @@ test_table_type(struct rte_table_ops *table_ops, void *table_args,\n \t\tVERIFY_TRAFFIC(RING_TX, table_packets->n_miss_packets, 0);\n \t}\n \n-\n \t/* Change table entry action */\n \tprintf(\"Change entry action\\n\");\n \ttable_entry.table_id = ring_out_2_id;\n@@ -441,12 +438,15 @@ test_table_hash8lru(void)\n \tint status, i;\n \n \t/* Traffic flow */\n-\tstruct rte_table_hash_key8_lru_params key8lru_params = {\n-\t\t.n_entries = 1<<24,\n-\t\t.f_hash = pipeline_test_hash,\n-\t\t.signature_offset = APP_METADATA_OFFSET(0),\n+\tstruct rte_table_hash_params key8lru_params = {\n+\t\t.name = \"TABLE\",\n+\t\t.key_size = 8,\n \t\t.key_offset = APP_METADATA_OFFSET(32),\n \t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 16,\n+\t\t.n_buckets = 1 << 16,\n+\t\t.f_hash = pipeline_test_hash,\n+\t\t.seed = 0,\n \t};\n \n \tuint8_t key8lru[8];\n@@ -475,14 +475,14 @@ test_table_hash8lru(void)\n \tVERIFY(status, CHECK_TABLE_OK);\n \n \t/* Invalid parameters */\n-\tkey8lru_params.n_entries = 0;\n+\tkey8lru_params.n_keys = 0;\n \n \tstatus = test_table_type(&rte_table_hash_key8_lru_ops,\n \t\t(void *)&key8lru_params, (void *)key8lru, &table_packets,\n \t\t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n \n-\tkey8lru_params.n_entries = 1<<16;\n+\tkey8lru_params.n_keys = 1<<16;\n \tkey8lru_params.f_hash = NULL;\n \n \tstatus = test_table_type(&rte_table_hash_key8_lru_ops,\n@@ -499,13 +499,15 @@ test_table_hash16lru(void)\n \tint status, i;\n \n \t/* Traffic flow */\n-\tstruct rte_table_hash_key16_lru_params key16lru_params = {\n-\t\t.n_entries = 1<<16,\n-\t\t.f_hash = pipeline_test_hash,\n-\t\t.seed = 0,\n-\t\t.signature_offset = APP_METADATA_OFFSET(0),\n+\tstruct rte_table_hash_params key16lru_params = {\n+\t\t.name = \"TABLE\",\n+\t\t.key_size = 16,\n \t\t.key_offset = APP_METADATA_OFFSET(32),\n \t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 16,\n+\t\t.n_buckets = 1 << 16,\n+\t\t.f_hash = pipeline_test_hash,\n+\t\t.seed = 0,\n \t};\n \n \tuint8_t key16lru[16];\n@@ -534,14 +536,14 @@ test_table_hash16lru(void)\n \tVERIFY(status, CHECK_TABLE_OK);\n \n \t/* Invalid parameters */\n-\tkey16lru_params.n_entries = 0;\n+\tkey16lru_params.n_keys = 0;\n \n \tstatus = test_table_type(&rte_table_hash_key16_lru_ops,\n \t\t(void *)&key16lru_params, (void *)key16lru, &table_packets,\n \t\t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n \n-\tkey16lru_params.n_entries = 1<<16;\n+\tkey16lru_params.n_keys = 1<<16;\n \tkey16lru_params.f_hash = NULL;\n \n \tstatus = test_table_type(&rte_table_hash_key16_lru_ops,\n@@ -558,12 +560,15 @@ test_table_hash32lru(void)\n \tint status, i;\n \n \t/* Traffic flow */\n-\tstruct rte_table_hash_key32_lru_params key32lru_params = {\n-\t\t.n_entries = 1<<16,\n+\tstruct rte_table_hash_params key32lru_params = {\n+\t\t.name = \"TABLE\",\n+\t\t.key_size = 32,\n+\t\t.key_offset = APP_METADATA_OFFSET(32),\n+\t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 16,\n+\t\t.n_buckets = 1 << 16,\n \t\t.f_hash = pipeline_test_hash,\n \t\t.seed = 0,\n-\t\t.signature_offset = APP_METADATA_OFFSET(0),\n-\t\t.key_offset = APP_METADATA_OFFSET(32),\n \t};\n \n \tuint8_t key32lru[32];\n@@ -592,14 +597,14 @@ test_table_hash32lru(void)\n \tVERIFY(status, CHECK_TABLE_OK);\n \n \t/* Invalid parameters */\n-\tkey32lru_params.n_entries = 0;\n+\tkey32lru_params.n_keys = 0;\n \n \tstatus = test_table_type(&rte_table_hash_key32_lru_ops,\n \t\t(void *)&key32lru_params, (void *)key32lru, &table_packets,\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n \n-\tkey32lru_params.n_entries = 1<<16;\n+\tkey32lru_params.n_keys = 1<<16;\n \tkey32lru_params.f_hash = NULL;\n \n \tstatus = test_table_type(&rte_table_hash_key32_lru_ops,\n@@ -616,14 +621,15 @@ test_table_hash8ext(void)\n \tint status, i;\n \n \t/* Traffic flow */\n-\tstruct rte_table_hash_key8_ext_params key8ext_params = {\n-\t\t.n_entries = 1<<16,\n-\t\t.n_entries_ext = 1<<15,\n-\t\t.f_hash = pipeline_test_hash,\n-\t\t.seed = 0,\n-\t\t.signature_offset = APP_METADATA_OFFSET(0),\n+\tstruct rte_table_hash_params key8ext_params = {\n+\t\t.name = \"TABLE\",\n+\t\t.key_size = 8,\n \t\t.key_offset = APP_METADATA_OFFSET(32),\n \t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 16,\n+\t\t.n_buckets = 1 << 16,\n+\t\t.f_hash = pipeline_test_hash,\n+\t\t.seed = 0,\n \t};\n \n \tuint8_t key8ext[8];\n@@ -652,14 +658,14 @@ test_table_hash8ext(void)\n \tVERIFY(status, CHECK_TABLE_OK);\n \n \t/* Invalid parameters */\n-\tkey8ext_params.n_entries = 0;\n+\tkey8ext_params.n_keys = 0;\n \n \tstatus = test_table_type(&rte_table_hash_key8_ext_ops,\n \t\t(void *)&key8ext_params, (void *)key8ext, &table_packets,\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n \n-\tkey8ext_params.n_entries = 1<<16;\n+\tkey8ext_params.n_keys = 1<<16;\n \tkey8ext_params.f_hash = NULL;\n \n \tstatus = test_table_type(&rte_table_hash_key8_ext_ops,\n@@ -667,13 +673,6 @@ test_table_hash8ext(void)\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n \n-\tkey8ext_params.f_hash = pipeline_test_hash;\n-\tkey8ext_params.n_entries_ext = 0;\n-\n-\tstatus = test_table_type(&rte_table_hash_key8_ext_ops,\n-\t(void *)&key8ext_params, (void *)key8ext, &table_packets, NULL, 0);\n-\tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n-\n \treturn 0;\n }\n \n@@ -683,14 +682,15 @@ test_table_hash16ext(void)\n \tint status, i;\n \n \t/* Traffic flow */\n-\tstruct rte_table_hash_key16_ext_params key16ext_params = {\n-\t\t.n_entries = 1<<16,\n-\t\t.n_entries_ext = 1<<15,\n-\t\t.f_hash = pipeline_test_hash,\n-\t\t.seed = 0,\n-\t\t.signature_offset = APP_METADATA_OFFSET(0),\n+\tstruct rte_table_hash_params key16ext_params = {\n+\t\t.name = \"TABLE\",\n+\t\t.key_size = 16,\n \t\t.key_offset = APP_METADATA_OFFSET(32),\n \t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 16,\n+\t\t.n_buckets = 1 << 16,\n+\t\t.f_hash = pipeline_test_hash,\n+\t\t.seed = 0,\n \t};\n \n \tuint8_t key16ext[16];\n@@ -719,14 +719,14 @@ test_table_hash16ext(void)\n \tVERIFY(status, CHECK_TABLE_OK);\n \n \t/* Invalid parameters */\n-\tkey16ext_params.n_entries = 0;\n+\tkey16ext_params.n_keys = 0;\n \n \tstatus = test_table_type(&rte_table_hash_key16_ext_ops,\n \t\t(void *)&key16ext_params, (void *)key16ext, &table_packets,\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n \n-\tkey16ext_params.n_entries = 1<<16;\n+\tkey16ext_params.n_keys = 1<<16;\n \tkey16ext_params.f_hash = NULL;\n \n \tstatus = test_table_type(&rte_table_hash_key16_ext_ops,\n@@ -734,13 +734,6 @@ test_table_hash16ext(void)\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n \n-\tkey16ext_params.f_hash = pipeline_test_hash;\n-\tkey16ext_params.n_entries_ext = 0;\n-\n-\tstatus = test_table_type(&rte_table_hash_key16_ext_ops,\n-\t(void *)&key16ext_params, (void *)key16ext, &table_packets, NULL, 0);\n-\tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n-\n \treturn 0;\n }\n \n@@ -750,13 +743,15 @@ test_table_hash32ext(void)\n \tint status, i;\n \n \t/* Traffic flow */\n-\tstruct rte_table_hash_key32_ext_params key32ext_params = {\n-\t\t.n_entries = 1<<16,\n-\t\t.n_entries_ext = 1<<15,\n+\tstruct rte_table_hash_params key32ext_params = {\n+\t\t.name = \"TABLE\",\n+\t\t.key_size = 32,\n+\t\t.key_offset = APP_METADATA_OFFSET(32),\n+\t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 16,\n+\t\t.n_buckets = 1 << 16,\n \t\t.f_hash = pipeline_test_hash,\n \t\t.seed = 0,\n-\t\t.signature_offset = APP_METADATA_OFFSET(0),\n-\t\t.key_offset = APP_METADATA_OFFSET(32),\n \t};\n \n \tuint8_t key32ext[32];\n@@ -785,14 +780,14 @@ test_table_hash32ext(void)\n \tVERIFY(status, CHECK_TABLE_OK);\n \n \t/* Invalid parameters */\n-\tkey32ext_params.n_entries = 0;\n+\tkey32ext_params.n_keys = 0;\n \n \tstatus = test_table_type(&rte_table_hash_key32_ext_ops,\n \t\t(void *)&key32ext_params, (void *)key32ext, &table_packets,\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n \n-\tkey32ext_params.n_entries = 1<<16;\n+\tkey32ext_params.n_keys = 1<<16;\n \tkey32ext_params.f_hash = NULL;\n \n \tstatus = test_table_type(&rte_table_hash_key32_ext_ops,\n@@ -800,14 +795,6 @@ test_table_hash32ext(void)\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n \n-\tkey32ext_params.f_hash = pipeline_test_hash;\n-\tkey32ext_params.n_entries_ext = 0;\n-\n-\tstatus = test_table_type(&rte_table_hash_key32_ext_ops,\n-\t\t(void *)&key32ext_params, (void *)key32ext, &table_packets,\n-\t\tNULL, 0);\n-\tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n-\n \treturn 0;\n }\n \n@@ -817,14 +804,15 @@ test_table_hash_cuckoo_combined(void)\n \tint status, i;\n \n \t/* Traffic flow */\n-\tstruct rte_table_hash_cuckoo_params cuckoo_params = {\n+\tstruct rte_table_hash_params cuckoo_params = {\n+\t\t.name = \"TABLE\",\n \t\t.key_size = 32,\n-\t\t.n_keys = 1<<16,\n+\t\t.key_offset = APP_METADATA_OFFSET(32),\n+\t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 16,\n+\t\t.n_buckets = 1 << 16,\n \t\t.f_hash = pipeline_test_hash,\n \t\t.seed = 0,\n-\t\t.signature_offset = APP_METADATA_OFFSET(0),\n-\t\t.key_offset = APP_METADATA_OFFSET(32),\n-\t\t.name = \"CUCKOO_HASH\",\n \t};\n \n \tuint8_t key_cuckoo[32];\n@@ -847,7 +835,7 @@ test_table_hash_cuckoo_combined(void)\n \ttable_packets.n_hit_packets = 50;\n \ttable_packets.n_miss_packets = 50;\n \n-\tstatus = test_table_type(&rte_table_hash_cuckoo_dosig_ops,\n+\tstatus = test_table_type(&rte_table_hash_cuckoo_ops,\n \t\t(void *)&cuckoo_params, (void *)key_cuckoo, &table_packets,\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_OK);\n@@ -855,7 +843,7 @@ test_table_hash_cuckoo_combined(void)\n \t/* Invalid parameters */\n \tcuckoo_params.key_size = 0;\n \n-\tstatus = test_table_type(&rte_table_hash_cuckoo_dosig_ops,\n+\tstatus = test_table_type(&rte_table_hash_cuckoo_ops,\n \t\t(void *)&cuckoo_params, (void *)key_cuckoo, &table_packets,\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n@@ -863,7 +851,7 @@ test_table_hash_cuckoo_combined(void)\n \tcuckoo_params.key_size = 32;\n \tcuckoo_params.n_keys = 0;\n \n-\tstatus = test_table_type(&rte_table_hash_cuckoo_dosig_ops,\n+\tstatus = test_table_type(&rte_table_hash_cuckoo_ops,\n \t\t(void *)&cuckoo_params, (void *)key_cuckoo, &table_packets,\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\n@@ -871,7 +859,7 @@ test_table_hash_cuckoo_combined(void)\n \tcuckoo_params.n_keys = 1<<16;\n \tcuckoo_params.f_hash = NULL;\n \n-\tstatus = test_table_type(&rte_table_hash_cuckoo_dosig_ops,\n+\tstatus = test_table_type(&rte_table_hash_cuckoo_ops,\n \t\t(void *)&cuckoo_params, (void *)key_cuckoo, &table_packets,\n \t\tNULL, 0);\n \tVERIFY(status, CHECK_TABLE_TABLE_CONFIG);\ndiff --git a/test/test/test_table_tables.c b/test/test/test_table_tables.c\nindex d835eb9..187a867 100644\n--- a/test/test/test_table_tables.c\n+++ b/test/test/test_table_tables.c\n@@ -60,16 +60,16 @@ table_test table_tests[] = {\n \tmemset(key, 0, 32);\t\t\t\t\t\t\\\n \tk32 = (uint32_t *) key;\t\t\t\t\t\t\\\n \tk32[0] = (value);\t\t\t\t\t\t\\\n-\t*signature = pipeline_test_hash(key, 0, 0);\t\t\t\\\n+\t*signature = pipeline_test_hash(key, NULL, 0, 0);\t\t\t\\\n } while (0)\n \n unsigned n_table_tests = RTE_DIM(table_tests);\n \n /* Function prototypes */\n static int\n-test_table_hash_lru_generic(struct rte_table_ops *ops);\n+test_table_hash_lru_generic(struct rte_table_ops *ops, uint32_t key_size);\n static int\n-test_table_hash_ext_generic(struct rte_table_ops *ops);\n+test_table_hash_ext_generic(struct rte_table_ops *ops, uint32_t key_size);\n \n struct rte_bucket_4_8 {\n \t/* Cache line 0 */\n@@ -655,7 +655,7 @@ test_table_lpm_ipv6(void)\n }\n \n static int\n-test_table_hash_lru_generic(struct rte_table_ops *ops)\n+test_table_hash_lru_generic(struct rte_table_ops *ops, uint32_t key_size)\n {\n \tint status, i;\n \tuint64_t expected_mask = 0, result_mask;\n@@ -667,36 +667,24 @@ test_table_hash_lru_generic(struct rte_table_ops *ops)\n \tint key_found;\n \n \t/* Initialize params and create tables */\n-\tstruct rte_table_hash_key8_lru_params hash_params = {\n-\t\t.n_entries = 1 << 10,\n-\t\t.f_hash = pipeline_test_hash,\n-\t\t.seed = 0,\n-\t\t.signature_offset = APP_METADATA_OFFSET(1),\n+\tstruct rte_table_hash_params hash_params = {\n+\t\t.name = \"TABLE\",\n+\t\t.key_size = key_size,\n \t\t.key_offset = APP_METADATA_OFFSET(32),\n \t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 10,\n+\t\t.n_buckets = 1 << 10,\n+\t\t.f_hash = pipeline_test_hash,\n+\t\t.seed = 0,\n \t};\n \n-\thash_params.n_entries = 0;\n+\thash_params.n_keys = 0;\n \n \ttable = ops->f_create(&hash_params, 0, 1);\n \tif (table != NULL)\n \t\treturn -1;\n \n-\thash_params.n_entries = 1 << 10;\n-\thash_params.signature_offset = APP_METADATA_OFFSET(1);\n-\n-\ttable = ops->f_create(&hash_params, 0, 1);\n-\tif (table == NULL)\n-\t\treturn -2;\n-\n-\thash_params.signature_offset = APP_METADATA_OFFSET(0);\n-\thash_params.key_offset = APP_METADATA_OFFSET(1);\n-\n-\ttable = ops->f_create(&hash_params, 0, 1);\n-\tif (table == NULL)\n-\t\treturn -3;\n-\n-\thash_params.key_offset = APP_METADATA_OFFSET(32);\n+\thash_params.n_keys = 1 << 10;\n \thash_params.f_hash = NULL;\n \n \ttable = ops->f_create(&hash_params, 0, 1);\n@@ -770,7 +758,7 @@ test_table_hash_lru_generic(struct rte_table_ops *ops)\n }\n \n static int\n-test_table_hash_ext_generic(struct rte_table_ops *ops)\n+test_table_hash_ext_generic(struct rte_table_ops *ops, uint32_t key_size)\n {\n \tint status, i;\n \tuint64_t expected_mask = 0, result_mask;\n@@ -782,35 +770,24 @@ test_table_hash_ext_generic(struct rte_table_ops *ops)\n \tvoid *entry_ptr;\n \n \t/* Initialize params and create tables */\n-\tstruct rte_table_hash_key8_ext_params hash_params = {\n-\t\t.n_entries = 1 << 10,\n-\t\t.n_entries_ext = 1 << 4,\n-\t\t.f_hash = pipeline_test_hash,\n-\t\t.seed = 0,\n-\t\t.signature_offset = APP_METADATA_OFFSET(1),\n+\tstruct rte_table_hash_params hash_params = {\n+\t\t.name = \"TABLE\",\n+\t\t.key_size = key_size,\n \t\t.key_offset = APP_METADATA_OFFSET(32),\n \t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 10,\n+\t\t.n_buckets = 1 << 10,\n+\t\t.f_hash = pipeline_test_hash,\n+\t\t.seed = 0,\n \t};\n \n-\thash_params.n_entries = 0;\n+\thash_params.n_keys = 0;\n \n \ttable = ops->f_create(&hash_params, 0, 1);\n \tif (table != NULL)\n \t\treturn -1;\n \n-\thash_params.n_entries = 1 << 10;\n-\thash_params.n_entries_ext = 0;\n-\ttable = ops->f_create(&hash_params, 0, 1);\n-\tif (table != NULL)\n-\t\treturn -2;\n-\n-\thash_params.n_entries_ext = 1 << 4;\n-\thash_params.signature_offset = APP_METADATA_OFFSET(1);\n-\ttable = ops->f_create(&hash_params, 0, 1);\n-\tif (table == NULL)\n-\t\treturn -2;\n-\n-\thash_params.signature_offset = APP_METADATA_OFFSET(0);\n+\thash_params.n_keys = 1 << 10;\n \thash_params.key_offset = APP_METADATA_OFFSET(1);\n \n \ttable = ops->f_create(&hash_params, 0, 1);\n@@ -895,20 +872,21 @@ test_table_hash_lru(void)\n {\n \tint status;\n \n-\tstatus = test_table_hash_lru_generic(&rte_table_hash_key8_lru_ops);\n-\tif (status < 0)\n-\t\treturn status;\n-\n \tstatus = test_table_hash_lru_generic(\n-\t\t&rte_table_hash_key8_lru_dosig_ops);\n+\t\t&rte_table_hash_key8_lru_ops,\n+\t\t8);\n \tif (status < 0)\n \t\treturn status;\n \n-\tstatus = test_table_hash_lru_generic(&rte_table_hash_key16_lru_ops);\n+\tstatus = test_table_hash_lru_generic(\n+\t\t&rte_table_hash_key16_lru_ops,\n+\t\t16);\n \tif (status < 0)\n \t\treturn status;\n \n-\tstatus = test_table_hash_lru_generic(&rte_table_hash_key32_lru_ops);\n+\tstatus = test_table_hash_lru_generic(\n+\t\t&rte_table_hash_key32_lru_ops,\n+\t\t32);\n \tif (status < 0)\n \t\treturn status;\n \n@@ -924,20 +902,15 @@ test_table_hash_ext(void)\n {\n \tint status;\n \n-\tstatus = test_table_hash_ext_generic(&rte_table_hash_key8_ext_ops);\n+\tstatus = test_table_hash_ext_generic(&rte_table_hash_key8_ext_ops, 8);\n \tif (status < 0)\n \t\treturn status;\n \n-\tstatus = test_table_hash_ext_generic(\n-\t\t&rte_table_hash_key8_ext_dosig_ops);\n+\tstatus = test_table_hash_ext_generic(&rte_table_hash_key16_ext_ops, 16);\n \tif (status < 0)\n \t\treturn status;\n \n-\tstatus = test_table_hash_ext_generic(&rte_table_hash_key16_ext_ops);\n-\tif (status < 0)\n-\t\treturn status;\n-\n-\tstatus = test_table_hash_ext_generic(&rte_table_hash_key32_ext_ops);\n+\tstatus = test_table_hash_ext_generic(&rte_table_hash_key32_ext_ops, 32);\n \tif (status < 0)\n \t\treturn status;\n \n@@ -959,23 +932,24 @@ test_table_hash_cuckoo(void)\n \tuint32_t entry_size = 1;\n \n \t/* Initialize params and create tables */\n-\tstruct rte_table_hash_cuckoo_params cuckoo_params = {\n+\tstruct rte_table_hash_params cuckoo_params = {\n+\t\t.name = \"TABLE\",\n \t\t.key_size = 32,\n-\t\t.n_keys = 1 << 24,\n+\t\t.key_offset = APP_METADATA_OFFSET(32),\n+\t\t.key_mask = NULL,\n+\t\t.n_keys = 1 << 16,\n+\t\t.n_buckets = 1 << 16,\n \t\t.f_hash = pipeline_test_hash,\n \t\t.seed = 0,\n-\t\t.signature_offset = APP_METADATA_OFFSET(0),\n-\t\t.key_offset = APP_METADATA_OFFSET(32),\n-\t\t.name = \"CUCKOO\",\n \t};\n \n-\ttable = rte_table_hash_cuckoo_dosig_ops.f_create(NULL, 0, entry_size);\n+\ttable = rte_table_hash_cuckoo_ops.f_create(NULL, 0, entry_size);\n \tif (table != NULL)\n \t\treturn -1;\n \n \tcuckoo_params.key_size = 0;\n \n-\ttable = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,\n+\ttable = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,\n \t\t0, entry_size);\n \tif (table != NULL)\n \t\treturn -2;\n@@ -983,7 +957,7 @@ test_table_hash_cuckoo(void)\n \tcuckoo_params.key_size = 32;\n \tcuckoo_params.n_keys = 0;\n \n-\ttable = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,\n+\ttable = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,\n \t\t0, entry_size);\n \tif (table != NULL)\n \t\treturn -3;\n@@ -991,7 +965,7 @@ test_table_hash_cuckoo(void)\n \tcuckoo_params.n_keys = 1 << 24;\n \tcuckoo_params.f_hash = NULL;\n \n-\ttable = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,\n+\ttable = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,\n \t\t0, entry_size);\n \tif (table != NULL)\n \t\treturn -4;\n@@ -999,24 +973,24 @@ test_table_hash_cuckoo(void)\n \tcuckoo_params.f_hash = pipeline_test_hash;\n \tcuckoo_params.name = NULL;\n \n-\ttable = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,\n+\ttable = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,\n \t\t0, entry_size);\n \tif (table != NULL)\n \t\treturn -5;\n \n \tcuckoo_params.name = \"CUCKOO\";\n \n-\ttable = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,\n+\ttable = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,\n \t\t0, entry_size);\n \tif (table == NULL)\n \t\treturn -6;\n \n \t/* Free */\n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_free(table);\n+\tstatus = rte_table_hash_cuckoo_ops.f_free(table);\n \tif (status < 0)\n \t\treturn -7;\n \n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_free(NULL);\n+\tstatus = rte_table_hash_cuckoo_ops.f_free(NULL);\n \tif (status == 0)\n \t\treturn -8;\n \n@@ -1027,60 +1001,60 @@ test_table_hash_cuckoo(void)\n \tmemset(key_cuckoo, 0, 32);\n \tkcuckoo[0] = rte_be_to_cpu_32(0xadadadad);\n \n-\ttable = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params, 0, 1);\n+\ttable = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params, 0, 1);\n \tif (table == NULL)\n \t\treturn -9;\n \n \tentry = 'A';\n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_add(NULL, &key_cuckoo,\n+\tstatus = rte_table_hash_cuckoo_ops.f_add(NULL, &key_cuckoo,\n \t\t&entry, &key_found, &entry_ptr);\n \tif (status == 0)\n \t\treturn -10;\n \n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_add(table, NULL, &entry,\n+\tstatus = rte_table_hash_cuckoo_ops.f_add(table, NULL, &entry,\n \t\t&key_found, &entry_ptr);\n \tif (status == 0)\n \t\treturn -11;\n \n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_add(table, &key_cuckoo,\n+\tstatus = rte_table_hash_cuckoo_ops.f_add(table, &key_cuckoo,\n \t\tNULL, &key_found, &entry_ptr);\n \tif (status == 0)\n \t\treturn -12;\n \n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_add(table, &key_cuckoo,\n+\tstatus = rte_table_hash_cuckoo_ops.f_add(table, &key_cuckoo,\n \t\t&entry, &key_found, &entry_ptr);\n \tif (status != 0)\n \t\treturn -13;\n \n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_add(table, &key_cuckoo,\n+\tstatus = rte_table_hash_cuckoo_ops.f_add(table, &key_cuckoo,\n \t\t&entry, &key_found, &entry_ptr);\n \tif (status != 0)\n \t\treturn -14;\n \n \t/* Delete */\n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_delete(NULL, &key_cuckoo,\n+\tstatus = rte_table_hash_cuckoo_ops.f_delete(NULL, &key_cuckoo,\n \t\t&key_found, NULL);\n \tif (status == 0)\n \t\treturn -15;\n \n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_delete(table, NULL,\n+\tstatus = rte_table_hash_cuckoo_ops.f_delete(table, NULL,\n \t\t&key_found, NULL);\n \tif (status == 0)\n \t\treturn -16;\n \n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_delete(table, &key_cuckoo,\n+\tstatus = rte_table_hash_cuckoo_ops.f_delete(table, &key_cuckoo,\n \t\t&key_found, NULL);\n \tif (status != 0)\n \t\treturn -17;\n \n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_delete(table, &key_cuckoo,\n+\tstatus = rte_table_hash_cuckoo_ops.f_delete(table, &key_cuckoo,\n \t\t&key_found, NULL);\n \tif (status != -ENOENT)\n \t\treturn -18;\n \n \t/* Traffic flow */\n \tentry = 'A';\n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_add(table, &key_cuckoo,\n+\tstatus = rte_table_hash_cuckoo_ops.f_add(table, &key_cuckoo,\n \t\t&entry, &key_found,\n \t\t&entry_ptr);\n \tif (status < 0)\n@@ -1093,7 +1067,7 @@ test_table_hash_cuckoo(void)\n \t\t} else\n \t\t\tPREPARE_PACKET(mbufs[i], 0xadadadab);\n \n-\trte_table_hash_cuckoo_dosig_ops.f_lookup(table, mbufs, -1,\n+\trte_table_hash_cuckoo_ops.f_lookup(table, mbufs, -1,\n \t\t&result_mask, (void **)entries);\n \tif (result_mask != expected_mask)\n \t\treturn -20;\n@@ -1102,7 +1076,7 @@ test_table_hash_cuckoo(void)\n \tfor (i = 0; i < RTE_PORT_IN_BURST_SIZE_MAX; i++)\n \t\trte_pktmbuf_free(mbufs[i]);\n \n-\tstatus = rte_table_hash_cuckoo_dosig_ops.f_free(table);\n+\tstatus = rte_table_hash_cuckoo_ops.f_free(table);\n \n \treturn 0;\n }\n",
    "prefixes": [
        "dpdk-dev",
        "2/5"
    ]
}