diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2017-11-08 14:15:11 +0000 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2017-11-08 14:45:54 +0000 |
commit | 055c52583a2794da8ba1e85a48cce3832372b12f (patch) | |
tree | 8ceb1cb78fbb46a0f341f8ee24feb3c6b5540013 /examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c | |
parent | f239aed5e674965691846e8ce3f187dd47523689 (diff) |
New upstream version 17.11-rc3
Change-Id: I6a5baa40612fe0c20f30b5fa773a6cbbac63a685
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c')
-rw-r--r-- | examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c | 53 |
1 files changed, 8 insertions, 45 deletions
diff --git a/examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c b/examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c index 026f00cd..929d81cb 100644 --- a/examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c +++ b/examples/ip_pipeline/pipeline/pipeline_flow_classification_be.c @@ -492,40 +492,16 @@ static void *pipeline_fc_init(struct pipeline_params *params, /* Tables */ p->n_tables = 1; { - struct rte_table_hash_key8_ext_params - table_hash_key8_params = { - .n_entries = p_fc->n_flows, - .n_entries_ext = p_fc->n_flows, - .signature_offset = p_fc->hash_offset, + struct rte_table_hash_params table_hash_params = { + .name = p->name, + .key_size = p_fc->key_size, .key_offset = p_fc->key_offset, - .f_hash = hash_func[(p_fc->key_size / 8) - 1], .key_mask = (p_fc->key_mask_present) ? p_fc->key_mask : NULL, - .seed = 0, - }; - - struct rte_table_hash_key16_ext_params - table_hash_key16_params = { - .n_entries = p_fc->n_flows, - .n_entries_ext = p_fc->n_flows, - .signature_offset = p_fc->hash_offset, - .key_offset = p_fc->key_offset, - .f_hash = hash_func[(p_fc->key_size / 8) - 1], - .key_mask = (p_fc->key_mask_present) ? - p_fc->key_mask : NULL, - .seed = 0, - }; - - struct rte_table_hash_ext_params - table_hash_params = { - .key_size = p_fc->key_size, .n_keys = p_fc->n_flows, - .n_buckets = p_fc->n_flows / 4, - .n_buckets_ext = p_fc->n_flows / 4, + .n_buckets = rte_align32pow2(p_fc->n_flows / 4), .f_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,32 +518,19 @@ 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.arg_create = &table_hash_key8_params; + table_params.ops = &rte_table_hash_key8_ext_ops; 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.arg_create = &table_hash_key16_params; + table_params.ops = &rte_table_hash_key16_ext_ops; break; default: table_params.ops = &rte_table_hash_ext_ops; - table_params.arg_create = &table_hash_params; } + table_params.arg_create = &table_hash_params; + status = rte_pipeline_table_create(p->p, &table_params, &p->table_id[0]); |