X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-compress-perf%2Fcomp_perf_test_verify.c;h=7d06029488a547a792a1e45d517fd6fd79f20a7a;hb=ca6eb0f7c836bcdc8fda8522297776c772b86ca3;hp=5e13257b795ed29a5112575aa758cc24ff882a3b;hpb=2695db95a1474e07d0105d31b9c52562dc6fb89a;p=dpdk.git diff --git a/app/test-compress-perf/comp_perf_test_verify.c b/app/test-compress-perf/comp_perf_test_verify.c index 5e13257b79..7d06029488 100644 --- a/app/test-compress-perf/comp_perf_test_verify.c +++ b/app/test-compress-perf/comp_perf_test_verify.c @@ -75,7 +75,7 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type) if (ops == NULL) { RTE_LOG(ERR, USER1, - "Can't allocate memory for ops strucures\n"); + "Can't allocate memory for ops structures\n"); return -1; } @@ -388,7 +388,7 @@ cperf_verify_test_runner(void *test_ctx) struct cperf_verify_ctx *ctx = test_ctx; struct comp_test_data *test_data = ctx->options; int ret = EXIT_SUCCESS; - static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0); + static uint16_t display_once; uint32_t lcore = rte_lcore_id(); ctx->mem.lcore_id = lcore; @@ -427,8 +427,10 @@ cperf_verify_test_runner(void *test_ctx) ctx->ratio = (double) ctx->comp_data_sz / test_data->input_data_sz * 100; + uint16_t exp = 0; if (!ctx->silent) { - if (rte_atomic16_test_and_set(&display_once)) { + if (__atomic_compare_exchange_n(&display_once, &exp, 1, 0, + __ATOMIC_RELAXED, __ATOMIC_RELAXED)) { printf("%12s%6s%12s%17s\n", "lcore id", "Level", "Comp size", "Comp ratio [%]"); }