X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pipeline%2Fpipeline_hash.c;h=f8aac0d81845dc3ebee0b14e099913ab118cc8dd;hb=0c0db76f42ed4de33e71b869360893f55f9d240a;hp=548615fad2df05a77e47db11649cf5aeba6f8dc4;hpb=ab351fe1c95cc56f3c73066b1697f5590ef5c301;p=dpdk.git diff --git a/app/test-pipeline/pipeline_hash.c b/app/test-pipeline/pipeline_hash.c index 548615fad2..f8aac0d818 100644 --- a/app/test-pipeline/pipeline_hash.c +++ b/app/test-pipeline/pipeline_hash.c @@ -1,7 +1,7 @@ /*- * BSD LICENSE * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2010-2016 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -140,7 +140,6 @@ app_main_loop_worker_pipeline_hash(void) { .ops = &rte_port_ring_writer_ops, .arg_create = (void *) &port_ring_params, .f_action = NULL, - .f_action_bulk = NULL, .arg_ah = NULL, }; @@ -163,8 +162,8 @@ app_main_loop_worker_pipeline_hash(void) { .n_buckets_ext = 1 << 21, .f_hash = test_hash, .seed = 0, - .signature_offset = 0, - .key_offset = 32, + .signature_offset = APP_METADATA_OFFSET(0), + .key_offset = APP_METADATA_OFFSET(32), }; struct rte_pipeline_table_params table_params = { @@ -214,8 +213,9 @@ app_main_loop_worker_pipeline_hash(void) { struct rte_table_hash_key8_ext_params table_hash_params = { .n_entries = 1 << 24, .n_entries_ext = 1 << 23, - .signature_offset = 0, - .key_offset = 32, + .signature_offset = APP_METADATA_OFFSET(0), + .key_offset = APP_METADATA_OFFSET(32), + .key_mask = NULL, .f_hash = test_hash, .seed = 0, }; @@ -238,8 +238,9 @@ app_main_loop_worker_pipeline_hash(void) { { struct rte_table_hash_key8_lru_params table_hash_params = { .n_entries = 1 << 24, - .signature_offset = 0, - .key_offset = 32, + .signature_offset = APP_METADATA_OFFSET(0), + .key_offset = APP_METADATA_OFFSET(32), + .key_mask = NULL, .f_hash = test_hash, .seed = 0, }; @@ -263,10 +264,11 @@ app_main_loop_worker_pipeline_hash(void) { struct rte_table_hash_key16_ext_params table_hash_params = { .n_entries = 1 << 24, .n_entries_ext = 1 << 23, - .signature_offset = 0, - .key_offset = 32, + .signature_offset = APP_METADATA_OFFSET(0), + .key_offset = APP_METADATA_OFFSET(32), .f_hash = test_hash, .seed = 0, + .key_mask = NULL, }; struct rte_pipeline_table_params table_params = { @@ -287,10 +289,11 @@ app_main_loop_worker_pipeline_hash(void) { { struct rte_table_hash_key16_lru_params table_hash_params = { .n_entries = 1 << 24, - .signature_offset = 0, - .key_offset = 32, + .signature_offset = APP_METADATA_OFFSET(0), + .key_offset = APP_METADATA_OFFSET(32), .f_hash = test_hash, .seed = 0, + .key_mask = NULL, }; struct rte_pipeline_table_params table_params = { @@ -312,8 +315,8 @@ app_main_loop_worker_pipeline_hash(void) { struct rte_table_hash_key32_ext_params table_hash_params = { .n_entries = 1 << 24, .n_entries_ext = 1 << 23, - .signature_offset = 0, - .key_offset = 32, + .signature_offset = APP_METADATA_OFFSET(0), + .key_offset = APP_METADATA_OFFSET(32), .f_hash = test_hash, .seed = 0, }; @@ -337,8 +340,8 @@ app_main_loop_worker_pipeline_hash(void) { { struct rte_table_hash_key32_lru_params table_hash_params = { .n_entries = 1 << 24, - .signature_offset = 0, - .key_offset = 32, + .signature_offset = APP_METADATA_OFFSET(0), + .key_offset = APP_METADATA_OFFSET(32), .f_hash = test_hash, .seed = 0, }; @@ -456,8 +459,10 @@ app_main_loop_rx_metadata(void) { m = app.mbuf_rx.array[j]; m_data = rte_pktmbuf_mtod(m, uint8_t *); - signature = RTE_MBUF_METADATA_UINT32_PTR(m, 0); - key = RTE_MBUF_METADATA_UINT8_PTR(m, 32); + signature = RTE_MBUF_METADATA_UINT32_PTR(m, + APP_METADATA_OFFSET(0)); + key = RTE_MBUF_METADATA_UINT8_PTR(m, + APP_METADATA_OFFSET(32)); if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { ip_hdr = (struct ipv4_hdr *)