diff options
| author | liuyu <[email protected]> | 2024-06-27 23:07:38 -0400 |
|---|---|---|
| committer | liuyu <[email protected]> | 2024-06-27 23:07:38 -0400 |
| commit | edd0b81cda456d7ce345e46e545270a80ac0c652 (patch) | |
| tree | f97066b4f53fa48d7a5d0817ead58a39bee37f63 | |
| parent | d979f29f85925b721536234768ff5bbde0ab0be5 (diff) | |
bugfix,调整bbq_create时flag的设置
| -rw-r--r-- | bbq/tests/common/test_queue.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/bbq/tests/common/test_queue.c b/bbq/tests/common/test_queue.c index 7d51bf3..2ce2b71 100644 --- a/bbq/tests/common/test_queue.c +++ b/bbq/tests/common/test_queue.c @@ -1,6 +1,6 @@ /* * @Author: liuyu - * @LastEditTime: 2024-06-27 22:32:59 + * @LastEditTime: 2024-06-27 23:07:06 * @Email: [email protected] * @Describe: TODO */ @@ -20,7 +20,13 @@ uint32_t test_bbq_enqueue_burst(void *ring, void **obj_table, uint32_t n, uint16 } int test_queue_init_bbq(test_cfg *cfg, test_queue_s *q) { - unsigned int flags = 0; +#if 0 + // 开启了BBQ_F_ENABLE_STAT 会导致性能下降 + unsigned int flags = BBQ_F_RETRY_NEW | BBQ_F_ENABLE_STAT; +#else + unsigned int flags = BBQ_F_RETRY_NEW; +#endif + if (cfg->ring.producer_cnt <= 1) { flags |= BBQ_F_SP_ENQ; } @@ -30,11 +36,11 @@ int test_queue_init_bbq(test_cfg *cfg, test_queue_s *q) { } if (cfg->ring.block_count == 0) { - q->ring = bbq_create("test_bbq", cfg->ring.entries_cnt, BBQ_SOCKET_ID_ANY, flags | BBQ_F_RETRY_NEW); + q->ring = bbq_create("test_bbq", cfg->ring.entries_cnt, BBQ_SOCKET_ID_ANY, flags); } else { q->ring = bbq_create_with_bnbs("test_bbq", cfg->ring.block_count, cfg->ring.entries_cnt / cfg->ring.block_count, - BBQ_SOCKET_ID_ANY, BBQ_F_RETRY_NEW); + BBQ_SOCKET_ID_ANY, flags); } if (q->ring == NULL) { |
