From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH V2 3/5] test-pipeline: update due to api changes in librte_table
Date: Tue, 10 Oct 2017 12:18:59 +0100 [thread overview]
Message-ID: <1507634341-72277-4-git-send-email-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <1507634341-72277-1-git-send-email-cristian.dumitrescu@intel.com>
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
Changes in V2:
- None
test/test-pipeline/main.h | 5 +-
test/test-pipeline/pipeline_hash.c | 107 +++++--------------------------------
2 files changed, 18 insertions(+), 94 deletions(-)
diff --git a/test/test-pipeline/main.h b/test/test-pipeline/main.h
index 3685849..26395a3 100644
--- a/test/test-pipeline/main.h
+++ b/test/test-pipeline/main.h
@@ -131,7 +131,10 @@ enum {
void app_main_loop_rx(void);
void app_main_loop_rx_metadata(void);
-uint64_t test_hash(void *key, uint32_t key_size, uint64_t seed);
+uint64_t test_hash(void *key,
+ void *key_mask,
+ uint32_t key_size,
+ uint64_t seed);
void app_main_loop_worker(void);
void app_main_loop_worker_pipeline_stub(void);
diff --git a/test/test-pipeline/pipeline_hash.c b/test/test-pipeline/pipeline_hash.c
index 991e381..edc1663 100644
--- a/test/test-pipeline/pipeline_hash.c
+++ b/test/test-pipeline/pipeline_hash.c
@@ -169,23 +169,23 @@ app_main_loop_worker_pipeline_hash(void) {
"ring %d\n", i);
}
+ struct rte_table_hash_params table_hash_params = {
+ .name = "TABLE",
+ .key_size = key_size,
+ .key_offset = APP_METADATA_OFFSET(32),
+ .key_mask = NULL,
+ .n_keys = 1 << 24,
+ .n_buckets = 1 << 22,
+ .f_hash = test_hash,
+ .seed = 0,
+ };
+
/* Table configuration */
switch (app.pipeline_type) {
case e_APP_PIPELINE_HASH_KEY8_EXT:
case e_APP_PIPELINE_HASH_KEY16_EXT:
case e_APP_PIPELINE_HASH_KEY32_EXT:
{
- struct rte_table_hash_ext_params table_hash_params = {
- .key_size = key_size,
- .n_keys = 1 << 24,
- .n_buckets = 1 << 22,
- .n_buckets_ext = 1 << 21,
- .f_hash = test_hash,
- .seed = 0,
- .signature_offset = APP_METADATA_OFFSET(0),
- .key_offset = APP_METADATA_OFFSET(32),
- };
-
struct rte_pipeline_table_params table_params = {
.ops = &rte_table_hash_ext_ops,
.arg_create = &table_hash_params,
@@ -204,16 +204,6 @@ app_main_loop_worker_pipeline_hash(void) {
case e_APP_PIPELINE_HASH_KEY16_LRU:
case e_APP_PIPELINE_HASH_KEY32_LRU:
{
- struct rte_table_hash_lru_params table_hash_params = {
- .key_size = key_size,
- .n_keys = 1 << 24,
- .n_buckets = 1 << 22,
- .f_hash = test_hash,
- .seed = 0,
- .signature_offset = APP_METADATA_OFFSET(0),
- .key_offset = APP_METADATA_OFFSET(32),
- };
-
struct rte_pipeline_table_params table_params = {
.ops = &rte_table_hash_lru_ops,
.arg_create = &table_hash_params,
@@ -230,16 +220,6 @@ app_main_loop_worker_pipeline_hash(void) {
case e_APP_PIPELINE_HASH_SPEC_KEY8_EXT:
{
- struct rte_table_hash_key8_ext_params table_hash_params = {
- .n_entries = 1 << 24,
- .n_entries_ext = 1 << 23,
- .signature_offset = APP_METADATA_OFFSET(0),
- .key_offset = APP_METADATA_OFFSET(32),
- .key_mask = NULL,
- .f_hash = test_hash,
- .seed = 0,
- };
-
struct rte_pipeline_table_params table_params = {
.ops = &rte_table_hash_key8_ext_ops,
.arg_create = &table_hash_params,
@@ -256,15 +236,6 @@ app_main_loop_worker_pipeline_hash(void) {
case e_APP_PIPELINE_HASH_SPEC_KEY8_LRU:
{
- struct rte_table_hash_key8_lru_params table_hash_params = {
- .n_entries = 1 << 24,
- .signature_offset = APP_METADATA_OFFSET(0),
- .key_offset = APP_METADATA_OFFSET(32),
- .key_mask = NULL,
- .f_hash = test_hash,
- .seed = 0,
- };
-
struct rte_pipeline_table_params table_params = {
.ops = &rte_table_hash_key8_lru_ops,
.arg_create = &table_hash_params,
@@ -281,16 +252,6 @@ app_main_loop_worker_pipeline_hash(void) {
case e_APP_PIPELINE_HASH_SPEC_KEY16_EXT:
{
- struct rte_table_hash_key16_ext_params table_hash_params = {
- .n_entries = 1 << 24,
- .n_entries_ext = 1 << 23,
- .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 = {
.ops = &rte_table_hash_key16_ext_ops,
.arg_create = &table_hash_params,
@@ -307,15 +268,6 @@ app_main_loop_worker_pipeline_hash(void) {
case e_APP_PIPELINE_HASH_SPEC_KEY16_LRU:
{
- struct rte_table_hash_key16_lru_params table_hash_params = {
- .n_entries = 1 << 24,
- .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 = {
.ops = &rte_table_hash_key16_lru_ops,
.arg_create = &table_hash_params,
@@ -332,15 +284,6 @@ app_main_loop_worker_pipeline_hash(void) {
case e_APP_PIPELINE_HASH_SPEC_KEY32_EXT:
{
- struct rte_table_hash_key32_ext_params table_hash_params = {
- .n_entries = 1 << 24,
- .n_entries_ext = 1 << 23,
- .signature_offset = APP_METADATA_OFFSET(0),
- .key_offset = APP_METADATA_OFFSET(32),
- .f_hash = test_hash,
- .seed = 0,
- };
-
struct rte_pipeline_table_params table_params = {
.ops = &rte_table_hash_key32_ext_ops,
.arg_create = &table_hash_params,
@@ -358,14 +301,6 @@ app_main_loop_worker_pipeline_hash(void) {
case e_APP_PIPELINE_HASH_SPEC_KEY32_LRU:
{
- struct rte_table_hash_key32_lru_params table_hash_params = {
- .n_entries = 1 << 24,
- .signature_offset = APP_METADATA_OFFSET(0),
- .key_offset = APP_METADATA_OFFSET(32),
- .f_hash = test_hash,
- .seed = 0,
- };
-
struct rte_pipeline_table_params table_params = {
.ops = &rte_table_hash_key32_lru_ops,
.arg_create = &table_hash_params,
@@ -390,23 +325,8 @@ app_main_loop_worker_pipeline_hash(void) {
case e_APP_PIPELINE_HASH_CUCKOO_KEY112:
case e_APP_PIPELINE_HASH_CUCKOO_KEY128:
{
- char hash_name[RTE_HASH_NAMESIZE];
-
- snprintf(hash_name, sizeof(hash_name), "RTE_TH_CUCKOO_%d",
- app.pipeline_type);
-
- struct rte_table_hash_cuckoo_params table_hash_params = {
- .key_size = key_size,
- .n_keys = (1 << 24) + 1,
- .f_hash = test_hash,
- .seed = 0,
- .signature_offset = APP_METADATA_OFFSET(0),
- .key_offset = APP_METADATA_OFFSET(32),
- .name = hash_name,
- };
-
struct rte_pipeline_table_params table_params = {
- .ops = &rte_table_hash_cuckoo_dosig_ops,
+ .ops = &rte_table_hash_cuckoo_ops,
.arg_create = &table_hash_params,
.f_action_hit = NULL,
.f_action_miss = NULL,
@@ -477,6 +397,7 @@ app_main_loop_worker_pipeline_hash(void) {
uint64_t test_hash(
void *key,
+ __attribute__((unused)) void *key_mask,
__attribute__((unused)) uint32_t key_size,
__attribute__((unused)) uint64_t seed)
{
@@ -539,7 +460,7 @@ app_main_loop_rx_metadata(void) {
} else
continue;
- *signature = test_hash(key, 0, 0);
+ *signature = test_hash(key, NULL, 0, 0);
}
do {
--
2.7.4
next prev parent reply other threads:[~2017-10-10 11:19 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 13:53 [dpdk-dev] [PATCH 0/5] table: add key mask for hash tables Cristian Dumitrescu
2017-08-24 13:53 ` [dpdk-dev] [PATCH 1/5] " Cristian Dumitrescu
2017-10-10 11:18 ` [dpdk-dev] [PATCH V2 0/5] " Cristian Dumitrescu
2017-10-10 11:18 ` [dpdk-dev] [PATCH V2 1/5] " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 00/18] librte_table: " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 01/18] test: removing calls to deprecated " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 02/18] librte_table: remove deprecated 8-byte key " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 03/18] librte_table: remove deprecated 16-byte " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 04/18] librte_table: remove deprecated variable size key ext " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 05/18] librte_table: remove deprecated variable size key lru " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 06/18] librte_table: rename cuckoo hash table ops Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 07/18] librte_table: add unified params structure and mask-based hash func Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 08/18] librte_table: rework variable size key ext hash tables Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 09/18] librte_table: rework variable size key lru hash table Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 10/18] librte_table: rework 8-byte key hash tables Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 11/18] librte_table: rework 16-byte " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 12/18] librte_table: rework 32-byte " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 13/18] librte_table: rework cuckoo hash table Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 14/18] test: add mask-based hash functions Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 15/18] librte_table: cosmetic enhancements in api file Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 16/18] librte_table: copyright cosmetic updates Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 17/18] librte_table: map file updates Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 18/18] doc: remove deprecation notice for librte_table Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 00/18] librte_table: add key mask for hash tables Cristian Dumitrescu
2017-10-18 17:10 ` Dumitrescu, Cristian
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 01/18] test: removing calls to deprecated " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 02/18] librte_table: remove deprecated 8-byte key " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 03/18] librte_table: remove deprecated 16-byte " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 04/18] librte_table: remove deprecated variable size key ext " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 05/18] librte_table: remove deprecated variable size key lru " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 06/18] librte_table: rename cuckoo hash table ops Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 07/18] librte_table: add unified params structure and mask-based hash func Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 08/18] librte_table: rework variable size key ext hash tables Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 09/18] librte_table: rework variable size key lru hash table Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 10/18] librte_table: rework 8-byte key hash tables Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 11/18] librte_table: rework 16-byte " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 12/18] librte_table: rework 32-byte " Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 13/18] librte_table: rework cuckoo hash table Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 14/18] test: add mask-based hash functions Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 15/18] librte_table: cosmetic enhancements in api file Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 16/18] librte_table: copyright cosmetic updates Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 17/18] librte_table: map file updates Cristian Dumitrescu
2017-10-18 15:03 ` [dpdk-dev] [PATCH v3 18/18] doc: remove deprecation notice for librte_table Cristian Dumitrescu
2017-10-18 18:30 ` Mcnamara, John
2017-10-10 11:18 ` [dpdk-dev] [PATCH V2 2/5] test: update due to api changes in librte_table Cristian Dumitrescu
2017-10-10 11:18 ` Cristian Dumitrescu [this message]
2017-10-10 11:19 ` [dpdk-dev] [PATCH V2 4/5] ip_pipeline: " Cristian Dumitrescu
2017-10-10 11:19 ` [dpdk-dev] [PATCH V2 5/5] deprecation: removed the librte_table notice Cristian Dumitrescu
2017-10-11 14:22 ` [dpdk-dev] [PATCH V2 0/5] table: add key mask for hash tables Dumitrescu, Cristian
2017-08-24 13:53 ` [dpdk-dev] [PATCH 2/5] test: update due to api changes in librte_table Cristian Dumitrescu
2017-08-24 13:53 ` [dpdk-dev] [PATCH 3/5] test-pipeline: " Cristian Dumitrescu
2017-08-24 13:53 ` [dpdk-dev] [PATCH 4/5] ip_pipeline: " Cristian Dumitrescu
2017-08-24 13:53 ` [dpdk-dev] [PATCH 5/5] deprecation: removed the librte_table notice Cristian Dumitrescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507634341-72277-4-git-send-email-cristian.dumitrescu@intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).