table: rework cuckoo hash table
[dpdk.git] / test / test / test_table_tables.c
index 03c2723..7f04212 100644 (file)
@@ -932,14 +932,15 @@ test_table_hash_cuckoo(void)
        uint32_t entry_size = 1;
 
        /* Initialize params and create tables */
-       struct rte_table_hash_cuckoo_params cuckoo_params = {
+       struct rte_table_hash_params cuckoo_params = {
+               .name = "TABLE",
                .key_size = 32,
-               .n_keys = 1 << 24,
-               .f_hash = pipeline_test_hash,
-               .seed = 0,
-               .signature_offset = APP_METADATA_OFFSET(0),
                .key_offset = APP_METADATA_OFFSET(32),
-               .name = "CUCKOO",
+               .key_mask = NULL,
+               .n_keys = 1 << 16,
+               .n_buckets = 1 << 16,
+               .f_hash = (rte_table_hash_op_hash)pipeline_test_hash,
+               .seed = 0, 
        };
 
        table = rte_table_hash_cuckoo_ops.f_create(NULL, 0, entry_size);
@@ -969,7 +970,7 @@ test_table_hash_cuckoo(void)
        if (table != NULL)
                return -4;
 
-       cuckoo_params.f_hash = pipeline_test_hash;
+       cuckoo_params.f_hash = (rte_table_hash_op_hash)pipeline_test_hash;
        cuckoo_params.name = NULL;
 
        table = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,