table: rework variable size key ext hash tables
[dpdk.git] / examples / ip_pipeline / pipeline / pipeline_flow_classification_be.c
index 5e993c3..4a4007c 100644 (file)
@@ -118,7 +118,7 @@ struct flow_table_entry {
        uint32_t pad;
 };
 
-rte_table_hash_op_hash hash_func[] = {
+rte_table_hash_op_hash_nomask hash_func[] = {
        hash_default_key8,
        hash_default_key16,
        hash_default_key24,
@@ -516,16 +516,16 @@ static void *pipeline_fc_init(struct pipeline_params *params,
                        .seed = 0,
                };
 
-               struct rte_table_hash_ext_params
-                       table_hash_params = {
+               struct rte_table_hash_params table_hash_params = {
+                       .name = p->name,
                        .key_size = p_fc->key_size,
+                       .key_offset = p_fc->key_offset,
+                       .key_mask = (p_fc->key_mask_present) ?
+                               p_fc->key_mask : NULL,
                        .n_keys = p_fc->n_flows,
                        .n_buckets = p_fc->n_flows / 4,
-                       .n_buckets_ext = p_fc->n_flows / 4,
-                       .f_hash = hash_func[(p_fc->key_size / 8) - 1],
+                       .f_hash = (rte_table_hash_op_hash)hash_func[(p_fc->key_size / 8) - 1],
                        .seed = 0,
-                       .signature_offset = p_fc->hash_offset,
-                       .key_offset = p_fc->key_offset,
                };
 
                struct rte_pipeline_table_params table_params = {
@@ -542,17 +542,17 @@ static void *pipeline_fc_init(struct pipeline_params *params,
 
                switch (p_fc->key_size) {
                case 8:
-                       table_params.ops = &rte_table_hash_key8_ext_dosig_ops;
+                       table_params.ops = &rte_table_hash_key8_ext_ops;
                        table_params.arg_create = &table_hash_key8_params;
                        break;
 
                case 16:
-                       table_params.ops = &rte_table_hash_key16_ext_dosig_ops;
+                       table_params.ops = &rte_table_hash_key16_ext_ops;
                        table_params.arg_create = &table_hash_key16_params;
                        break;
 
                default:
-                       table_params.ops = &rte_table_hash_ext_dosig_ops;
+                       table_params.ops = &rte_table_hash_ext_ops;
                        table_params.arg_create = &table_hash_params;
                }