X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-crypto-perf%2Fcperf_test_latency.c;h=ce49feaba9f3a01c5faec8c35e1d384937b42ade;hb=be294749a12adb9e551959deaf416cefeb3c5c3e;hp=69f55de50adb161a2fb8ebe3f23f1a41372b1d4b;hpb=28dde5da503ed09f10cdfb295e390b114df7330a;p=dpdk.git diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c index 69f55de50a..ce49feaba9 100644 --- a/app/test-crypto-perf/cperf_test_latency.c +++ b/app/test-crypto-perf/cperf_test_latency.c @@ -126,7 +126,7 @@ cperf_latency_test_runner(void *arg) uint8_t burst_size_idx = 0; uint32_t imix_idx = 0; - static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0); + static uint16_t display_once; if (ctx == NULL) return 0; @@ -307,8 +307,10 @@ cperf_latency_test_runner(void *arg) time_max = tunit*(double)(tsc_max) / tsc_hz; time_min = tunit*(double)(tsc_min) / tsc_hz; + uint16_t exp = 0; if (ctx->options->csv) { - if (rte_atomic16_test_and_set(&display_once)) + if (__atomic_compare_exchange_n(&display_once, &exp, 1, 0, + __ATOMIC_RELAXED, __ATOMIC_RELAXED)) printf("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, " "cycles, time (us)");