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 = (rte_table_hash_op_hash)pipeline_test_hash,
+ .seed = 0,
};
uint8_t key16lru[16];
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,
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 = (rte_table_hash_op_hash)pipeline_test_hash,
+ .seed = 0,
};
uint8_t key16ext[16];
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,
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;
}