X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_hash_perf.c;h=a438eae6c87e2522fdd0592c3349b009e529b980;hb=02aa899d600059560ab7392ff13e111a497c44da;hp=52521118036d484a703ad48f69309cdec37db71b;hpb=a9de470cc7c0649221e156fc5f30a2dbdfe7c166;p=dpdk.git diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c index 5252111803..a438eae6c8 100644 --- a/app/test/test_hash_perf.c +++ b/app/test/test_hash_perf.c @@ -53,22 +53,22 @@ static uint32_t hashtest_key_lens[] = { struct rte_hash *h[NUM_KEYSIZES]; /* Array that stores if a slot is full */ -uint8_t slot_taken[MAX_ENTRIES]; +static uint8_t slot_taken[MAX_ENTRIES]; /* Array to store number of cycles per operation */ -uint64_t cycles[NUM_KEYSIZES][NUM_OPERATIONS][2][2]; +static uint64_t cycles[NUM_KEYSIZES][NUM_OPERATIONS][2][2]; /* Array to store all input keys */ -uint8_t keys[KEYS_TO_ADD][MAX_KEYSIZE]; +static uint8_t keys[KEYS_TO_ADD][MAX_KEYSIZE]; /* Array to store the precomputed hash for 'keys' */ -hash_sig_t signatures[KEYS_TO_ADD]; +static hash_sig_t signatures[KEYS_TO_ADD]; /* Array to store how many busy entries have each bucket */ -uint8_t buckets[NUM_BUCKETS]; +static uint8_t buckets[NUM_BUCKETS]; /* Array to store the positions where keys are added */ -int32_t positions[KEYS_TO_ADD]; +static int32_t positions[KEYS_TO_ADD]; /* Parameters used for hash table in unit test functions. */ static struct rte_hash_parameters ut_params = { @@ -85,9 +85,11 @@ create_table(unsigned int with_data, unsigned int table_index, if (with_data) /* Table will store 8-byte data */ - sprintf(name, "test_hash%d_data", hashtest_key_lens[table_index]); + snprintf(name, sizeof(name), "test_hash%u_data", + hashtest_key_lens[table_index]); else - sprintf(name, "test_hash%d", hashtest_key_lens[table_index]); + snprintf(name, sizeof(name), "test_hash%u", + hashtest_key_lens[table_index]); if (with_locks)