DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 2/5] test: update due to api changes in librte_table
Date: Thu, 24 Aug 2017 14:53:06 +0100	[thread overview]
Message-ID: <1503582789-121358-3-git-send-email-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <1503582789-121358-1-git-send-email-cristian.dumitrescu@intel.com>

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 test/test/test_table.c          |   1 +
 test/test/test_table.h          |   3 +-
 test/test/test_table_combined.c | 140 +++++++++++++++++--------------------
 test/test/test_table_tables.c   | 148 +++++++++++++++++-----------------------
 4 files changed, 128 insertions(+), 164 deletions(-)

diff --git a/test/test/test_table.c b/test/test/test_table.c
index 9e9eed8..db7d4e6 100644
--- a/test/test/test_table.c
+++ b/test/test/test_table.c
@@ -72,6 +72,7 @@ static void app_init_rings(void);
 static void app_init_mbuf_pools(void);
 
 uint64_t pipeline_test_hash(void *key,
+		__attribute__((unused)) void *key_mask,
 		__attribute__((unused)) uint32_t key_size,
 		__attribute__((unused)) uint64_t seed)
 {
diff --git a/test/test/test_table.h b/test/test/test_table.h
index 84d1845..8c1df33 100644
--- a/test/test/test_table.h
+++ b/test/test/test_table.h
@@ -94,7 +94,7 @@
 			APP_METADATA_OFFSET(32));		\
 	k32 = (uint32_t *) key;						\
 	k32[0] = (value);						\
-	*signature = pipeline_test_hash(key, 0, 0);			\
+	*signature = pipeline_test_hash(key, NULL, 0, 0);		\
 	rte_ring_enqueue((ring), m);					\
 } while (0)
 
@@ -131,6 +131,7 @@
 /* Function definitions */
 uint64_t pipeline_test_hash(
 	void *key,
+	__attribute__((unused)) void *key_mask,
 	__attribute__((unused)) uint32_t key_size,
 	__attribute__((unused)) uint64_t seed);
 
diff --git a/test/test/test_table_combined.c b/test/test/test_table_combined.c
index a2d19a1..417bc42 100644
--- a/test/test/test_table_combined.c
+++ b/test/test/test_table_combined.c
@@ -200,8 +200,6 @@ test_table_type(struct rte_table_ops *table_ops, void *table_args,
 		return -CHECK_TABLE_CONSISTENCY;
 	}
 
-
-
 	/* Flow test - All hits */
 	if (table_packets->n_hit_packets) {
 		for (i = 0; i < table_packets->n_hit_packets; i++)
@@ -248,7 +246,6 @@ test_table_type(struct rte_table_ops *table_ops, void *table_args,
 		VERIFY_TRAFFIC(RING_TX, table_packets->n_miss_packets, 0);
 	}
 
-
 	/* Change table entry action */
 	printf("Change entry action\n");
 	table_entry.table_id = ring_out_2_id;
@@ -441,12 +438,15 @@ test_table_hash8lru(void)
 	int status, i;
 
 	/* Traffic flow */
-	struct rte_table_hash_key8_lru_params key8lru_params = {
-		.n_entries = 1<<24,
-		.f_hash = pipeline_test_hash,
-		.signature_offset = APP_METADATA_OFFSET(0),
+	struct rte_table_hash_params key8lru_params = {
+		.name = "TABLE",
+		.key_size = 8,
 		.key_offset = APP_METADATA_OFFSET(32),
 		.key_mask = NULL,
+		.n_keys = 1 << 16,
+		.n_buckets = 1 << 16,
+		.f_hash = pipeline_test_hash,
+		.seed = 0,
 	};
 
 	uint8_t key8lru[8];
@@ -475,14 +475,14 @@ test_table_hash8lru(void)
 	VERIFY(status, CHECK_TABLE_OK);
 
 	/* Invalid parameters */
-	key8lru_params.n_entries = 0;
+	key8lru_params.n_keys = 0;
 
 	status = test_table_type(&rte_table_hash_key8_lru_ops,
 		(void *)&key8lru_params, (void *)key8lru, &table_packets,
 			NULL, 0);
 	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
-	key8lru_params.n_entries = 1<<16;
+	key8lru_params.n_keys = 1<<16;
 	key8lru_params.f_hash = NULL;
 
 	status = test_table_type(&rte_table_hash_key8_lru_ops,
@@ -499,13 +499,15 @@ test_table_hash16lru(void)
 	int status, i;
 
 	/* Traffic flow */
-	struct rte_table_hash_key16_lru_params key16lru_params = {
-		.n_entries = 1<<16,
-		.f_hash = pipeline_test_hash,
-		.seed = 0,
-		.signature_offset = APP_METADATA_OFFSET(0),
+	struct rte_table_hash_params key16lru_params = {
+		.name = "TABLE",
+		.key_size = 16,
 		.key_offset = APP_METADATA_OFFSET(32),
 		.key_mask = NULL,
+		.n_keys = 1 << 16,
+		.n_buckets = 1 << 16,
+		.f_hash = pipeline_test_hash,
+		.seed = 0,
 	};
 
 	uint8_t key16lru[16];
@@ -534,14 +536,14 @@ test_table_hash16lru(void)
 	VERIFY(status, CHECK_TABLE_OK);
 
 	/* Invalid parameters */
-	key16lru_params.n_entries = 0;
+	key16lru_params.n_keys = 0;
 
 	status = test_table_type(&rte_table_hash_key16_lru_ops,
 		(void *)&key16lru_params, (void *)key16lru, &table_packets,
 			NULL, 0);
 	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
-	key16lru_params.n_entries = 1<<16;
+	key16lru_params.n_keys = 1<<16;
 	key16lru_params.f_hash = NULL;
 
 	status = test_table_type(&rte_table_hash_key16_lru_ops,
@@ -558,12 +560,15 @@ test_table_hash32lru(void)
 	int status, i;
 
 	/* Traffic flow */
-	struct rte_table_hash_key32_lru_params key32lru_params = {
-		.n_entries = 1<<16,
+	struct rte_table_hash_params key32lru_params = {
+		.name = "TABLE",
+		.key_size = 32,
+		.key_offset = APP_METADATA_OFFSET(32),
+		.key_mask = NULL,
+		.n_keys = 1 << 16,
+		.n_buckets = 1 << 16,
 		.f_hash = pipeline_test_hash,
 		.seed = 0,
-		.signature_offset = APP_METADATA_OFFSET(0),
-		.key_offset = APP_METADATA_OFFSET(32),
 	};
 
 	uint8_t key32lru[32];
@@ -592,14 +597,14 @@ test_table_hash32lru(void)
 	VERIFY(status, CHECK_TABLE_OK);
 
 	/* Invalid parameters */
-	key32lru_params.n_entries = 0;
+	key32lru_params.n_keys = 0;
 
 	status = test_table_type(&rte_table_hash_key32_lru_ops,
 		(void *)&key32lru_params, (void *)key32lru, &table_packets,
 		NULL, 0);
 	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
-	key32lru_params.n_entries = 1<<16;
+	key32lru_params.n_keys = 1<<16;
 	key32lru_params.f_hash = NULL;
 
 	status = test_table_type(&rte_table_hash_key32_lru_ops,
@@ -616,14 +621,15 @@ test_table_hash8ext(void)
 	int status, i;
 
 	/* Traffic flow */
-	struct rte_table_hash_key8_ext_params key8ext_params = {
-		.n_entries = 1<<16,
-		.n_entries_ext = 1<<15,
-		.f_hash = pipeline_test_hash,
-		.seed = 0,
-		.signature_offset = APP_METADATA_OFFSET(0),
+	struct rte_table_hash_params key8ext_params = {
+		.name = "TABLE",
+		.key_size = 8,
 		.key_offset = APP_METADATA_OFFSET(32),
 		.key_mask = NULL,
+		.n_keys = 1 << 16,
+		.n_buckets = 1 << 16,
+		.f_hash = pipeline_test_hash,
+		.seed = 0,
 	};
 
 	uint8_t key8ext[8];
@@ -652,14 +658,14 @@ test_table_hash8ext(void)
 	VERIFY(status, CHECK_TABLE_OK);
 
 	/* Invalid parameters */
-	key8ext_params.n_entries = 0;
+	key8ext_params.n_keys = 0;
 
 	status = test_table_type(&rte_table_hash_key8_ext_ops,
 		(void *)&key8ext_params, (void *)key8ext, &table_packets,
 		NULL, 0);
 	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
-	key8ext_params.n_entries = 1<<16;
+	key8ext_params.n_keys = 1<<16;
 	key8ext_params.f_hash = NULL;
 
 	status = test_table_type(&rte_table_hash_key8_ext_ops,
@@ -667,13 +673,6 @@ test_table_hash8ext(void)
 		NULL, 0);
 	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
-	key8ext_params.f_hash = pipeline_test_hash;
-	key8ext_params.n_entries_ext = 0;
-
-	status = test_table_type(&rte_table_hash_key8_ext_ops,
-	(void *)&key8ext_params, (void *)key8ext, &table_packets, NULL, 0);
-	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
-
 	return 0;
 }
 
@@ -683,14 +682,15 @@ test_table_hash16ext(void)
 	int status, i;
 
 	/* Traffic flow */
-	struct rte_table_hash_key16_ext_params key16ext_params = {
-		.n_entries = 1<<16,
-		.n_entries_ext = 1<<15,
-		.f_hash = pipeline_test_hash,
-		.seed = 0,
-		.signature_offset = APP_METADATA_OFFSET(0),
+	struct rte_table_hash_params key16ext_params = {
+		.name = "TABLE",
+		.key_size = 16,
 		.key_offset = APP_METADATA_OFFSET(32),
 		.key_mask = NULL,
+		.n_keys = 1 << 16,
+		.n_buckets = 1 << 16,
+		.f_hash = pipeline_test_hash,
+		.seed = 0,
 	};
 
 	uint8_t key16ext[16];
@@ -719,14 +719,14 @@ test_table_hash16ext(void)
 	VERIFY(status, CHECK_TABLE_OK);
 
 	/* Invalid parameters */
-	key16ext_params.n_entries = 0;
+	key16ext_params.n_keys = 0;
 
 	status = test_table_type(&rte_table_hash_key16_ext_ops,
 		(void *)&key16ext_params, (void *)key16ext, &table_packets,
 		NULL, 0);
 	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
-	key16ext_params.n_entries = 1<<16;
+	key16ext_params.n_keys = 1<<16;
 	key16ext_params.f_hash = NULL;
 
 	status = test_table_type(&rte_table_hash_key16_ext_ops,
@@ -734,13 +734,6 @@ test_table_hash16ext(void)
 		NULL, 0);
 	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
-	key16ext_params.f_hash = pipeline_test_hash;
-	key16ext_params.n_entries_ext = 0;
-
-	status = test_table_type(&rte_table_hash_key16_ext_ops,
-	(void *)&key16ext_params, (void *)key16ext, &table_packets, NULL, 0);
-	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
-
 	return 0;
 }
 
@@ -750,13 +743,15 @@ test_table_hash32ext(void)
 	int status, i;
 
 	/* Traffic flow */
-	struct rte_table_hash_key32_ext_params key32ext_params = {
-		.n_entries = 1<<16,
-		.n_entries_ext = 1<<15,
+	struct rte_table_hash_params key32ext_params = {
+		.name = "TABLE",
+		.key_size = 32,
+		.key_offset = APP_METADATA_OFFSET(32),
+		.key_mask = NULL,
+		.n_keys = 1 << 16,
+		.n_buckets = 1 << 16,
 		.f_hash = pipeline_test_hash,
 		.seed = 0,
-		.signature_offset = APP_METADATA_OFFSET(0),
-		.key_offset = APP_METADATA_OFFSET(32),
 	};
 
 	uint8_t key32ext[32];
@@ -785,14 +780,14 @@ test_table_hash32ext(void)
 	VERIFY(status, CHECK_TABLE_OK);
 
 	/* Invalid parameters */
-	key32ext_params.n_entries = 0;
+	key32ext_params.n_keys = 0;
 
 	status = test_table_type(&rte_table_hash_key32_ext_ops,
 		(void *)&key32ext_params, (void *)key32ext, &table_packets,
 		NULL, 0);
 	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
-	key32ext_params.n_entries = 1<<16;
+	key32ext_params.n_keys = 1<<16;
 	key32ext_params.f_hash = NULL;
 
 	status = test_table_type(&rte_table_hash_key32_ext_ops,
@@ -800,14 +795,6 @@ test_table_hash32ext(void)
 		NULL, 0);
 	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
 
-	key32ext_params.f_hash = pipeline_test_hash;
-	key32ext_params.n_entries_ext = 0;
-
-	status = test_table_type(&rte_table_hash_key32_ext_ops,
-		(void *)&key32ext_params, (void *)key32ext, &table_packets,
-		NULL, 0);
-	VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
-
 	return 0;
 }
 
@@ -817,14 +804,15 @@ test_table_hash_cuckoo_combined(void)
 	int status, i;
 
 	/* Traffic flow */
-	struct rte_table_hash_cuckoo_params cuckoo_params = {
+	struct rte_table_hash_params cuckoo_params = {
+		.name = "TABLE",
 		.key_size = 32,
-		.n_keys = 1<<16,
+		.key_offset = APP_METADATA_OFFSET(32),
+		.key_mask = NULL,
+		.n_keys = 1 << 16,
+		.n_buckets = 1 << 16,
 		.f_hash = pipeline_test_hash,
 		.seed = 0,
-		.signature_offset = APP_METADATA_OFFSET(0),
-		.key_offset = APP_METADATA_OFFSET(32),
-		.name = "CUCKOO_HASH",
 	};
 
 	uint8_t key_cuckoo[32];
@@ -847,7 +835,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 +843,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 +851,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 +859,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 d835eb9..187a867 100644
--- a/test/test/test_table_tables.c
+++ b/test/test/test_table_tables.c
@@ -60,16 +60,16 @@ table_test table_tests[] = {
 	memset(key, 0, 32);						\
 	k32 = (uint32_t *) key;						\
 	k32[0] = (value);						\
-	*signature = pipeline_test_hash(key, 0, 0);			\
+	*signature = pipeline_test_hash(key, NULL, 0, 0);			\
 } while (0)
 
 unsigned n_table_tests = RTE_DIM(table_tests);
 
 /* Function prototypes */
 static int
-test_table_hash_lru_generic(struct rte_table_ops *ops);
+test_table_hash_lru_generic(struct rte_table_ops *ops, uint32_t key_size);
 static int
-test_table_hash_ext_generic(struct rte_table_ops *ops);
+test_table_hash_ext_generic(struct rte_table_ops *ops, uint32_t key_size);
 
 struct rte_bucket_4_8 {
 	/* Cache line 0 */
@@ -655,7 +655,7 @@ test_table_lpm_ipv6(void)
 }
 
 static int
-test_table_hash_lru_generic(struct rte_table_ops *ops)
+test_table_hash_lru_generic(struct rte_table_ops *ops, uint32_t key_size)
 {
 	int status, i;
 	uint64_t expected_mask = 0, result_mask;
@@ -667,36 +667,24 @@ test_table_hash_lru_generic(struct rte_table_ops *ops)
 	int key_found;
 
 	/* Initialize params and create tables */
-	struct rte_table_hash_key8_lru_params hash_params = {
-		.n_entries = 1 << 10,
-		.f_hash = pipeline_test_hash,
-		.seed = 0,
-		.signature_offset = APP_METADATA_OFFSET(1),
+	struct rte_table_hash_params hash_params = {
+		.name = "TABLE",
+		.key_size = key_size,
 		.key_offset = APP_METADATA_OFFSET(32),
 		.key_mask = NULL,
+		.n_keys = 1 << 10,
+		.n_buckets = 1 << 10,
+		.f_hash = pipeline_test_hash,
+		.seed = 0,
 	};
 
-	hash_params.n_entries = 0;
+	hash_params.n_keys = 0;
 
 	table = ops->f_create(&hash_params, 0, 1);
 	if (table != NULL)
 		return -1;
 
-	hash_params.n_entries = 1 << 10;
-	hash_params.signature_offset = APP_METADATA_OFFSET(1);
-
-	table = ops->f_create(&hash_params, 0, 1);
-	if (table == NULL)
-		return -2;
-
-	hash_params.signature_offset = APP_METADATA_OFFSET(0);
-	hash_params.key_offset = APP_METADATA_OFFSET(1);
-
-	table = ops->f_create(&hash_params, 0, 1);
-	if (table == NULL)
-		return -3;
-
-	hash_params.key_offset = APP_METADATA_OFFSET(32);
+	hash_params.n_keys = 1 << 10;
 	hash_params.f_hash = NULL;
 
 	table = ops->f_create(&hash_params, 0, 1);
@@ -770,7 +758,7 @@ test_table_hash_lru_generic(struct rte_table_ops *ops)
 }
 
 static int
-test_table_hash_ext_generic(struct rte_table_ops *ops)
+test_table_hash_ext_generic(struct rte_table_ops *ops, uint32_t key_size)
 {
 	int status, i;
 	uint64_t expected_mask = 0, result_mask;
@@ -782,35 +770,24 @@ test_table_hash_ext_generic(struct rte_table_ops *ops)
 	void *entry_ptr;
 
 	/* Initialize params and create tables */
-	struct rte_table_hash_key8_ext_params hash_params = {
-		.n_entries = 1 << 10,
-		.n_entries_ext = 1 << 4,
-		.f_hash = pipeline_test_hash,
-		.seed = 0,
-		.signature_offset = APP_METADATA_OFFSET(1),
+	struct rte_table_hash_params hash_params = {
+		.name = "TABLE",
+		.key_size = key_size,
 		.key_offset = APP_METADATA_OFFSET(32),
 		.key_mask = NULL,
+		.n_keys = 1 << 10,
+		.n_buckets = 1 << 10,
+		.f_hash = pipeline_test_hash,
+		.seed = 0,
 	};
 
-	hash_params.n_entries = 0;
+	hash_params.n_keys = 0;
 
 	table = ops->f_create(&hash_params, 0, 1);
 	if (table != NULL)
 		return -1;
 
-	hash_params.n_entries = 1 << 10;
-	hash_params.n_entries_ext = 0;
-	table = ops->f_create(&hash_params, 0, 1);
-	if (table != NULL)
-		return -2;
-
-	hash_params.n_entries_ext = 1 << 4;
-	hash_params.signature_offset = APP_METADATA_OFFSET(1);
-	table = ops->f_create(&hash_params, 0, 1);
-	if (table == NULL)
-		return -2;
-
-	hash_params.signature_offset = APP_METADATA_OFFSET(0);
+	hash_params.n_keys = 1 << 10;
 	hash_params.key_offset = APP_METADATA_OFFSET(1);
 
 	table = ops->f_create(&hash_params, 0, 1);
@@ -895,20 +872,21 @@ test_table_hash_lru(void)
 {
 	int status;
 
-	status = test_table_hash_lru_generic(&rte_table_hash_key8_lru_ops);
-	if (status < 0)
-		return status;
-
 	status = test_table_hash_lru_generic(
-		&rte_table_hash_key8_lru_dosig_ops);
+		&rte_table_hash_key8_lru_ops,
+		8);
 	if (status < 0)
 		return status;
 
-	status = test_table_hash_lru_generic(&rte_table_hash_key16_lru_ops);
+	status = test_table_hash_lru_generic(
+		&rte_table_hash_key16_lru_ops,
+		16);
 	if (status < 0)
 		return status;
 
-	status = test_table_hash_lru_generic(&rte_table_hash_key32_lru_ops);
+	status = test_table_hash_lru_generic(
+		&rte_table_hash_key32_lru_ops,
+		32);
 	if (status < 0)
 		return status;
 
@@ -924,20 +902,15 @@ test_table_hash_ext(void)
 {
 	int status;
 
-	status = test_table_hash_ext_generic(&rte_table_hash_key8_ext_ops);
+	status = test_table_hash_ext_generic(&rte_table_hash_key8_ext_ops, 8);
 	if (status < 0)
 		return status;
 
-	status = test_table_hash_ext_generic(
-		&rte_table_hash_key8_ext_dosig_ops);
+	status = test_table_hash_ext_generic(&rte_table_hash_key16_ext_ops, 16);
 	if (status < 0)
 		return status;
 
-	status = test_table_hash_ext_generic(&rte_table_hash_key16_ext_ops);
-	if (status < 0)
-		return status;
-
-	status = test_table_hash_ext_generic(&rte_table_hash_key32_ext_ops);
+	status = test_table_hash_ext_generic(&rte_table_hash_key32_ext_ops, 32);
 	if (status < 0)
 		return status;
 
@@ -959,23 +932,24 @@ test_table_hash_cuckoo(void)
 	uint32_t entry_size = 1;
 
 	/* Initialize params and create tables */
-	struct rte_table_hash_cuckoo_params cuckoo_params = {
+	struct rte_table_hash_params cuckoo_params = {
+		.name = "TABLE",
 		.key_size = 32,
-		.n_keys = 1 << 24,
+		.key_offset = APP_METADATA_OFFSET(32),
+		.key_mask = NULL,
+		.n_keys = 1 << 16,
+		.n_buckets = 1 << 16,
 		.f_hash = pipeline_test_hash,
 		.seed = 0,
-		.signature_offset = APP_METADATA_OFFSET(0),
-		.key_offset = APP_METADATA_OFFSET(32),
-		.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 +957,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 +965,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 +973,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 +1001,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 +1067,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 +1076,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

  parent reply	other threads:[~2017-08-24 13:53 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     ` [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 ` Cristian Dumitrescu [this message]
2017-08-24 13:53 ` [dpdk-dev] [PATCH 3/5] test-pipeline: update due to api changes in librte_table 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=1503582789-121358-3-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).