From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net
Subject: [dpdk-dev] [PATCH v3 06/18] librte_table: rename cuckoo hash table ops
Date: Wed, 18 Oct 2017 16:03:42 +0100 [thread overview]
Message-ID: <1508339034-171115-26-git-send-email-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <1508339034-171115-1-git-send-email-cristian.dumitrescu@intel.com>
The dosig particle is eliminated from the cuckoo hash ops name.
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
lib/librte_table/rte_table_hash.h | 3 +--
lib/librte_table/rte_table_hash_cuckoo.c | 6 ++---
test/test-pipeline/pipeline_hash.c | 2 +-
test/test/test_table_combined.c | 8 +++---
test/test/test_table_tables.c | 42 ++++++++++++++++----------------
5 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/lib/librte_table/rte_table_hash.h b/lib/librte_table/rte_table_hash.h
index f983518..5f655ee 100644
--- a/lib/librte_table/rte_table_hash.h
+++ b/lib/librte_table/rte_table_hash.h
@@ -361,8 +361,7 @@ struct rte_table_hash_cuckoo_params {
const char *name;
};
-/** Cuckoo hash table operations */
-extern struct rte_table_ops rte_table_hash_cuckoo_dosig_ops;
+extern struct rte_table_ops rte_table_hash_cuckoo_ops;
#ifdef __cplusplus
}
diff --git a/lib/librte_table/rte_table_hash_cuckoo.c b/lib/librte_table/rte_table_hash_cuckoo.c
index da1597f..beb45c5 100644
--- a/lib/librte_table/rte_table_hash_cuckoo.c
+++ b/lib/librte_table/rte_table_hash_cuckoo.c
@@ -286,7 +286,7 @@ rte_table_hash_cuckoo_entry_delete(void *table, void *key,
static int
-rte_table_hash_cuckoo_lookup_dosig(void *table,
+rte_table_hash_cuckoo_lookup(void *table,
struct rte_mbuf **pkts,
uint64_t pkts_mask,
uint64_t *lookup_hit_mask,
@@ -370,13 +370,13 @@ rte_table_hash_cuckoo_stats_read(void *table, struct rte_table_stats *stats,
return 0;
}
-struct rte_table_ops rte_table_hash_cuckoo_dosig_ops = {
+struct rte_table_ops rte_table_hash_cuckoo_ops = {
.f_create = rte_table_hash_cuckoo_create,
.f_free = rte_table_hash_cuckoo_free,
.f_add = rte_table_hash_cuckoo_entry_add,
.f_delete = rte_table_hash_cuckoo_entry_delete,
.f_add_bulk = NULL,
.f_delete_bulk = NULL,
- .f_lookup = rte_table_hash_cuckoo_lookup_dosig,
+ .f_lookup = rte_table_hash_cuckoo_lookup,
.f_stats = rte_table_hash_cuckoo_stats_read,
};
diff --git a/test/test-pipeline/pipeline_hash.c b/test/test-pipeline/pipeline_hash.c
index 991e381..2f8c625 100644
--- a/test/test-pipeline/pipeline_hash.c
+++ b/test/test-pipeline/pipeline_hash.c
@@ -406,7 +406,7 @@ app_main_loop_worker_pipeline_hash(void) {
};
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,
diff --git a/test/test/test_table_combined.c b/test/test/test_table_combined.c
index a2d19a1..f65d34a 100644
--- a/test/test/test_table_combined.c
+++ b/test/test/test_table_combined.c
@@ -847,7 +847,7 @@ test_table_hash_cuckoo_combined(void)
table_packets.n_hit_packets = 50;
table_packets.n_miss_packets = 50;
- status = test_table_type(&rte_table_hash_cuckoo_dosig_ops,
+ status = test_table_type(&rte_table_hash_cuckoo_ops,
(void *)&cuckoo_params, (void *)key_cuckoo, &table_packets,
NULL, 0);
VERIFY(status, CHECK_TABLE_OK);
@@ -855,7 +855,7 @@ test_table_hash_cuckoo_combined(void)
/* Invalid parameters */
cuckoo_params.key_size = 0;
- status = test_table_type(&rte_table_hash_cuckoo_dosig_ops,
+ status = test_table_type(&rte_table_hash_cuckoo_ops,
(void *)&cuckoo_params, (void *)key_cuckoo, &table_packets,
NULL, 0);
VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -863,7 +863,7 @@ test_table_hash_cuckoo_combined(void)
cuckoo_params.key_size = 32;
cuckoo_params.n_keys = 0;
- status = test_table_type(&rte_table_hash_cuckoo_dosig_ops,
+ status = test_table_type(&rte_table_hash_cuckoo_ops,
(void *)&cuckoo_params, (void *)key_cuckoo, &table_packets,
NULL, 0);
VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
@@ -871,7 +871,7 @@ test_table_hash_cuckoo_combined(void)
cuckoo_params.n_keys = 1<<16;
cuckoo_params.f_hash = NULL;
- status = test_table_type(&rte_table_hash_cuckoo_dosig_ops,
+ status = test_table_type(&rte_table_hash_cuckoo_ops,
(void *)&cuckoo_params, (void *)key_cuckoo, &table_packets,
NULL, 0);
VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
diff --git a/test/test/test_table_tables.c b/test/test/test_table_tables.c
index 19aa5a4..efbd0c6 100644
--- a/test/test/test_table_tables.c
+++ b/test/test/test_table_tables.c
@@ -969,13 +969,13 @@ test_table_hash_cuckoo(void)
.name = "CUCKOO",
};
- table = rte_table_hash_cuckoo_dosig_ops.f_create(NULL, 0, entry_size);
+ table = rte_table_hash_cuckoo_ops.f_create(NULL, 0, entry_size);
if (table != NULL)
return -1;
cuckoo_params.key_size = 0;
- table = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,
+ table = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,
0, entry_size);
if (table != NULL)
return -2;
@@ -983,7 +983,7 @@ test_table_hash_cuckoo(void)
cuckoo_params.key_size = 32;
cuckoo_params.n_keys = 0;
- table = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,
+ table = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,
0, entry_size);
if (table != NULL)
return -3;
@@ -991,7 +991,7 @@ test_table_hash_cuckoo(void)
cuckoo_params.n_keys = 1 << 24;
cuckoo_params.f_hash = NULL;
- table = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,
+ table = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,
0, entry_size);
if (table != NULL)
return -4;
@@ -999,24 +999,24 @@ test_table_hash_cuckoo(void)
cuckoo_params.f_hash = pipeline_test_hash;
cuckoo_params.name = NULL;
- table = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,
+ table = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,
0, entry_size);
if (table != NULL)
return -5;
cuckoo_params.name = "CUCKOO";
- table = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params,
+ table = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params,
0, entry_size);
if (table == NULL)
return -6;
/* Free */
- status = rte_table_hash_cuckoo_dosig_ops.f_free(table);
+ status = rte_table_hash_cuckoo_ops.f_free(table);
if (status < 0)
return -7;
- status = rte_table_hash_cuckoo_dosig_ops.f_free(NULL);
+ status = rte_table_hash_cuckoo_ops.f_free(NULL);
if (status == 0)
return -8;
@@ -1027,60 +1027,60 @@ test_table_hash_cuckoo(void)
memset(key_cuckoo, 0, 32);
kcuckoo[0] = rte_be_to_cpu_32(0xadadadad);
- table = rte_table_hash_cuckoo_dosig_ops.f_create(&cuckoo_params, 0, 1);
+ table = rte_table_hash_cuckoo_ops.f_create(&cuckoo_params, 0, 1);
if (table == NULL)
return -9;
entry = 'A';
- status = rte_table_hash_cuckoo_dosig_ops.f_add(NULL, &key_cuckoo,
+ status = rte_table_hash_cuckoo_ops.f_add(NULL, &key_cuckoo,
&entry, &key_found, &entry_ptr);
if (status == 0)
return -10;
- status = rte_table_hash_cuckoo_dosig_ops.f_add(table, NULL, &entry,
+ status = rte_table_hash_cuckoo_ops.f_add(table, NULL, &entry,
&key_found, &entry_ptr);
if (status == 0)
return -11;
- status = rte_table_hash_cuckoo_dosig_ops.f_add(table, &key_cuckoo,
+ status = rte_table_hash_cuckoo_ops.f_add(table, &key_cuckoo,
NULL, &key_found, &entry_ptr);
if (status == 0)
return -12;
- status = rte_table_hash_cuckoo_dosig_ops.f_add(table, &key_cuckoo,
+ status = rte_table_hash_cuckoo_ops.f_add(table, &key_cuckoo,
&entry, &key_found, &entry_ptr);
if (status != 0)
return -13;
- status = rte_table_hash_cuckoo_dosig_ops.f_add(table, &key_cuckoo,
+ status = rte_table_hash_cuckoo_ops.f_add(table, &key_cuckoo,
&entry, &key_found, &entry_ptr);
if (status != 0)
return -14;
/* Delete */
- status = rte_table_hash_cuckoo_dosig_ops.f_delete(NULL, &key_cuckoo,
+ status = rte_table_hash_cuckoo_ops.f_delete(NULL, &key_cuckoo,
&key_found, NULL);
if (status == 0)
return -15;
- status = rte_table_hash_cuckoo_dosig_ops.f_delete(table, NULL,
+ status = rte_table_hash_cuckoo_ops.f_delete(table, NULL,
&key_found, NULL);
if (status == 0)
return -16;
- status = rte_table_hash_cuckoo_dosig_ops.f_delete(table, &key_cuckoo,
+ status = rte_table_hash_cuckoo_ops.f_delete(table, &key_cuckoo,
&key_found, NULL);
if (status != 0)
return -17;
- status = rte_table_hash_cuckoo_dosig_ops.f_delete(table, &key_cuckoo,
+ status = rte_table_hash_cuckoo_ops.f_delete(table, &key_cuckoo,
&key_found, NULL);
if (status != -ENOENT)
return -18;
/* Traffic flow */
entry = 'A';
- status = rte_table_hash_cuckoo_dosig_ops.f_add(table, &key_cuckoo,
+ status = rte_table_hash_cuckoo_ops.f_add(table, &key_cuckoo,
&entry, &key_found,
&entry_ptr);
if (status < 0)
@@ -1093,7 +1093,7 @@ test_table_hash_cuckoo(void)
} else
PREPARE_PACKET(mbufs[i], 0xadadadab);
- rte_table_hash_cuckoo_dosig_ops.f_lookup(table, mbufs, -1,
+ rte_table_hash_cuckoo_ops.f_lookup(table, mbufs, -1,
&result_mask, (void **)entries);
if (result_mask != expected_mask)
return -20;
@@ -1102,7 +1102,7 @@ test_table_hash_cuckoo(void)
for (i = 0; i < RTE_PORT_IN_BURST_SIZE_MAX; i++)
rte_pktmbuf_free(mbufs[i]);
- status = rte_table_hash_cuckoo_dosig_ops.f_free(table);
+ status = rte_table_hash_cuckoo_ops.f_free(table);
return 0;
}
--
2.7.4
next prev parent reply other threads:[~2017-10-18 15:04 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 ` Cristian Dumitrescu [this message]
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 ` [dpdk-dev] [PATCH V2 3/5] test-pipeline: " Cristian Dumitrescu
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=1508339034-171115-26-git-send-email-cristian.dumitrescu@intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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).