apps: remove calls to deprecated hash tables
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>
Wed, 18 Oct 2017 15:03:37 +0000 (16:03 +0100)
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>
Tue, 24 Oct 2017 11:04:40 +0000 (13:04 +0200)
Removing calls to hash tables that are going to be removed later.

The calls are removed from test/test, test/test-pipeline,
examples/ip_pipeline.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c
test/test-pipeline/pipeline_hash.c
test/test/test_table_combined.c
test/test/test_table_tables.c

index 026f00c..5e993c3 100644 (file)
@@ -542,29 +542,17 @@ static void *pipeline_fc_init(struct pipeline_params *params,
 
                switch (p_fc->key_size) {
                case 8:
-                       if (p_fc->hash_offset != 0) {
-                               table_params.ops =
-                                       &rte_table_hash_key8_ext_ops;
-                       } else {
-                               table_params.ops =
-                                       &rte_table_hash_key8_ext_dosig_ops;
-                       }
+                       table_params.ops = &rte_table_hash_key8_ext_dosig_ops;
                        table_params.arg_create = &table_hash_key8_params;
                        break;
 
                case 16:
-                       if (p_fc->hash_offset != 0) {
-                               table_params.ops =
-                                       &rte_table_hash_key16_ext_ops;
-                       } else {
-                               table_params.ops =
-                                       &rte_table_hash_key16_ext_dosig_ops;
-                       }
+                       table_params.ops = &rte_table_hash_key16_ext_dosig_ops;
                        table_params.arg_create = &table_hash_key16_params;
                        break;
 
                default:
-                       table_params.ops = &rte_table_hash_ext_ops;
+                       table_params.ops = &rte_table_hash_ext_dosig_ops;
                        table_params.arg_create = &table_hash_params;
                }
 
index 991e381..6d27f33 100644 (file)
@@ -187,7 +187,7 @@ app_main_loop_worker_pipeline_hash(void) {
                };
 
                struct rte_pipeline_table_params table_params = {
-                       .ops = &rte_table_hash_ext_ops,
+                       .ops = &rte_table_hash_ext_dosig_ops,
                        .arg_create = &table_hash_params,
                        .f_action_hit = NULL,
                        .f_action_miss = NULL,
@@ -215,7 +215,7 @@ app_main_loop_worker_pipeline_hash(void) {
                };
 
                struct rte_pipeline_table_params table_params = {
-                       .ops = &rte_table_hash_lru_ops,
+                       .ops = &rte_table_hash_lru_dosig_ops,
                        .arg_create = &table_hash_params,
                        .f_action_hit = NULL,
                        .f_action_miss = NULL,
@@ -241,7 +241,7 @@ app_main_loop_worker_pipeline_hash(void) {
                };
 
                struct rte_pipeline_table_params table_params = {
-                       .ops = &rte_table_hash_key8_ext_ops,
+                       .ops = &rte_table_hash_key8_ext_dosig_ops,
                        .arg_create = &table_hash_params,
                        .f_action_hit = NULL,
                        .f_action_miss = NULL,
@@ -266,7 +266,7 @@ app_main_loop_worker_pipeline_hash(void) {
                };
 
                struct rte_pipeline_table_params table_params = {
-                       .ops = &rte_table_hash_key8_lru_ops,
+                       .ops = &rte_table_hash_key8_lru_dosig_ops,
                        .arg_create = &table_hash_params,
                        .f_action_hit = NULL,
                        .f_action_miss = NULL,
@@ -292,7 +292,7 @@ app_main_loop_worker_pipeline_hash(void) {
                };
 
                struct rte_pipeline_table_params table_params = {
-                       .ops = &rte_table_hash_key16_ext_ops,
+                       .ops = &rte_table_hash_key16_ext_dosig_ops,
                        .arg_create = &table_hash_params,
                        .f_action_hit = NULL,
                        .f_action_miss = NULL,
@@ -317,7 +317,7 @@ app_main_loop_worker_pipeline_hash(void) {
                };
 
                struct rte_pipeline_table_params table_params = {
-                       .ops = &rte_table_hash_key16_lru_ops,
+                       .ops = &rte_table_hash_key16_lru_dosig_ops,
                        .arg_create = &table_hash_params,
                        .f_action_hit = NULL,
                        .f_action_miss = NULL,
index a2d19a1..a337a59 100644 (file)
@@ -469,7 +469,7 @@ test_table_hash8lru(void)
        table_packets.n_hit_packets = 50;
        table_packets.n_miss_packets = 50;
 
-       status = test_table_type(&rte_table_hash_key8_lru_ops,
+       status = test_table_type(&rte_table_hash_key8_lru_dosig_ops,
                (void *)&key8lru_params, (void *)key8lru, &table_packets,
                        NULL, 0);
        VERIFY(status, CHECK_TABLE_OK);
@@ -477,7 +477,7 @@ test_table_hash8lru(void)
        /* Invalid parameters */
        key8lru_params.n_entries = 0;
 
-       status = test_table_type(&rte_table_hash_key8_lru_ops,
+       status = test_table_type(&rte_table_hash_key8_lru_dosig_ops,
                (void *)&key8lru_params, (void *)key8lru, &table_packets,
                        NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -485,7 +485,7 @@ test_table_hash8lru(void)
        key8lru_params.n_entries = 1<<16;
        key8lru_params.f_hash = NULL;
 
-       status = test_table_type(&rte_table_hash_key8_lru_ops,
+       status = test_table_type(&rte_table_hash_key8_lru_dosig_ops,
                (void *)&key8lru_params, (void *)key8lru, &table_packets,
                        NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -528,7 +528,7 @@ test_table_hash16lru(void)
        table_packets.n_hit_packets = 50;
        table_packets.n_miss_packets = 50;
 
-       status = test_table_type(&rte_table_hash_key16_lru_ops,
+       status = test_table_type(&rte_table_hash_key16_lru_dosig_ops,
                (void *)&key16lru_params, (void *)key16lru, &table_packets,
                        NULL, 0);
        VERIFY(status, CHECK_TABLE_OK);
@@ -536,7 +536,7 @@ test_table_hash16lru(void)
        /* Invalid parameters */
        key16lru_params.n_entries = 0;
 
-       status = test_table_type(&rte_table_hash_key16_lru_ops,
+       status = test_table_type(&rte_table_hash_key16_lru_dosig_ops,
                (void *)&key16lru_params, (void *)key16lru, &table_packets,
                        NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -544,7 +544,7 @@ test_table_hash16lru(void)
        key16lru_params.n_entries = 1<<16;
        key16lru_params.f_hash = NULL;
 
-       status = test_table_type(&rte_table_hash_key16_lru_ops,
+       status = test_table_type(&rte_table_hash_key16_lru_dosig_ops,
                (void *)&key16lru_params, (void *)key16lru, &table_packets,
                        NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -646,7 +646,7 @@ test_table_hash8ext(void)
        table_packets.n_hit_packets = 50;
        table_packets.n_miss_packets = 50;
 
-       status = test_table_type(&rte_table_hash_key8_ext_ops,
+       status = test_table_type(&rte_table_hash_key8_ext_dosig_ops,
                (void *)&key8ext_params, (void *)key8ext, &table_packets,
                NULL, 0);
        VERIFY(status, CHECK_TABLE_OK);
@@ -654,7 +654,7 @@ test_table_hash8ext(void)
        /* Invalid parameters */
        key8ext_params.n_entries = 0;
 
-       status = test_table_type(&rte_table_hash_key8_ext_ops,
+       status = test_table_type(&rte_table_hash_key8_ext_dosig_ops,
                (void *)&key8ext_params, (void *)key8ext, &table_packets,
                NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -662,7 +662,7 @@ test_table_hash8ext(void)
        key8ext_params.n_entries = 1<<16;
        key8ext_params.f_hash = NULL;
 
-       status = test_table_type(&rte_table_hash_key8_ext_ops,
+       status = test_table_type(&rte_table_hash_key8_ext_dosig_ops,
                (void *)&key8ext_params, (void *)key8ext, &table_packets,
                NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -670,7 +670,7 @@ test_table_hash8ext(void)
        key8ext_params.f_hash = pipeline_test_hash;
        key8ext_params.n_entries_ext = 0;
 
-       status = test_table_type(&rte_table_hash_key8_ext_ops,
+       status = test_table_type(&rte_table_hash_key8_ext_dosig_ops,
        (void *)&key8ext_params, (void *)key8ext, &table_packets, NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
@@ -713,7 +713,7 @@ test_table_hash16ext(void)
        table_packets.n_hit_packets = 50;
        table_packets.n_miss_packets = 50;
 
-       status = test_table_type(&rte_table_hash_key16_ext_ops,
+       status = test_table_type(&rte_table_hash_key16_ext_dosig_ops,
                (void *)&key16ext_params, (void *)key16ext, &table_packets,
                NULL, 0);
        VERIFY(status, CHECK_TABLE_OK);
@@ -721,7 +721,7 @@ test_table_hash16ext(void)
        /* Invalid parameters */
        key16ext_params.n_entries = 0;
 
-       status = test_table_type(&rte_table_hash_key16_ext_ops,
+       status = test_table_type(&rte_table_hash_key16_ext_dosig_ops,
                (void *)&key16ext_params, (void *)key16ext, &table_packets,
                NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -729,7 +729,7 @@ test_table_hash16ext(void)
        key16ext_params.n_entries = 1<<16;
        key16ext_params.f_hash = NULL;
 
-       status = test_table_type(&rte_table_hash_key16_ext_ops,
+       status = test_table_type(&rte_table_hash_key16_ext_dosig_ops,
                (void *)&key16ext_params, (void *)key16ext, &table_packets,
                NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -737,7 +737,7 @@ test_table_hash16ext(void)
        key16ext_params.f_hash = pipeline_test_hash;
        key16ext_params.n_entries_ext = 0;
 
-       status = test_table_type(&rte_table_hash_key16_ext_ops,
+       status = test_table_type(&rte_table_hash_key16_ext_dosig_ops,
        (void *)&key16ext_params, (void *)key16ext, &table_packets, NULL, 0);
        VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
index d835eb9..90d2f02 100644 (file)
@@ -895,7 +895,7 @@ test_table_hash_lru(void)
 {
        int status;
 
-       status = test_table_hash_lru_generic(&rte_table_hash_key8_lru_ops);
+       status = test_table_hash_lru_generic(&rte_table_hash_key8_lru_dosig_ops);
        if (status < 0)
                return status;
 
@@ -904,7 +904,7 @@ test_table_hash_lru(void)
        if (status < 0)
                return status;
 
-       status = test_table_hash_lru_generic(&rte_table_hash_key16_lru_ops);
+       status = test_table_hash_lru_generic(&rte_table_hash_key16_lru_dosig_ops);
        if (status < 0)
                return status;
 
@@ -924,7 +924,7 @@ test_table_hash_ext(void)
 {
        int status;
 
-       status = test_table_hash_ext_generic(&rte_table_hash_key8_ext_ops);
+       status = test_table_hash_ext_generic(&rte_table_hash_key8_ext_dosig_ops);
        if (status < 0)
                return status;
 
@@ -933,7 +933,7 @@ test_table_hash_ext(void)
        if (status < 0)
                return status;
 
-       status = test_table_hash_ext_generic(&rte_table_hash_key16_ext_ops);
+       status = test_table_hash_ext_generic(&rte_table_hash_key16_ext_dosig_ops);
        if (status < 0)
                return status;