#define WRITE_EXT_BKT 2
#define NUM_TEST 3
-unsigned int rwc_core_cnt[NUM_TEST] = {1, 2, 4};
+static unsigned int rwc_core_cnt[NUM_TEST] = {1, 2, 4};
struct rwc_perf {
uint32_t w_no_ks_r_hit[2][NUM_TEST];
static struct rwc_perf rwc_lf_results, rwc_non_lf_results;
-struct {
+static struct {
uint32_t *keys;
uint32_t *keys_no_ks;
uint32_t *keys_ks;
static volatile uint8_t writer_done;
-uint16_t enabled_core_ids[RTE_MAX_LCORE];
+static uint16_t enabled_core_ids[RTE_MAX_LCORE];
-uint8_t *scanned_bkts;
+static uint8_t *scanned_bkts;
static inline uint16_t
get_short_sig(const hash_sig_t hash)
tbl_rwc_test_param.count_keys_ks_extbkt);
rte_free(found);
+ rte_free(scanned_bkts);
rte_hash_free(tbl_rwc_test_param.h);
return 0;
rte_free(keys_absent);
rte_free(found);
rte_free(tbl_rwc_test_param.keys_shift_path);
+ rte_free(keys_non_shift_path);
rte_free(keys_ext_bkt);
rte_free(keys_ks_extbkt);
rte_free(scanned_bkts);
+ rte_hash_free(tbl_rwc_test_param.h);
return -1;
}
uint32_t read_cnt;
uint32_t *keys;
uint32_t extra_keys;
- int32_t *pos;
+ int32_t pos[BULK_LOOKUP_SIZE];
void *temp_a[BULK_LOOKUP_SIZE];
- /* Used to identify keys not inserted in the hash table */
- pos = rte_malloc(NULL, sizeof(uint32_t) * BULK_LOOKUP_SIZE, 0);
- if (pos == NULL) {
- printf("RTE_MALLOC failed\n");
- return -1;
- }
-
if (read_type & READ_FAIL) {
keys = tbl_rwc_test_param.keys_absent;
read_cnt = tbl_rwc_test_param.count_keys_absent;
rte_free(tbl_rwc_test_param.keys_ks);
rte_free(tbl_rwc_test_param.keys_absent);
rte_free(tbl_rwc_test_param.keys_shift_path);
- rte_free(scanned_bkts);
+ rte_free(tbl_rwc_test_param.keys_non_shift_path);
+ rte_free(tbl_rwc_test_param.keys_ext_bkt);
+ rte_free(tbl_rwc_test_param.keys_ks_extbkt);
return 0;
}