X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-acl%2Fmain.c;h=2cb2fe2579adebd8d442385fac7034d6b764100b;hb=92533e9dfe7501a64b54260420cf00ece7352056;hp=57f23942eb59f77aad55a02b11e0e51a6bc375a8;hpb=0c9da7555da8c8373dfd69f798f832723ae6de71;p=dpdk.git diff --git a/app/test-acl/main.c b/app/test-acl/main.c index 57f23942eb..2cb2fe2579 100644 --- a/app/test-acl/main.c +++ b/app/test-acl/main.c @@ -12,7 +12,7 @@ #include #include -#define PRINT_USAGE_START "%s [EAL options]\n" +#define PRINT_USAGE_START "%s [EAL options] --\n" #define RTE_LOGTYPE_TESTACL RTE_LOGTYPE_USER1 @@ -81,6 +81,14 @@ static const struct acl_alg acl_alg[] = { .name = "altivec", .alg = RTE_ACL_CLASSIFY_ALTIVEC, }, + { + .name = "avx512x16", + .alg = RTE_ACL_CLASSIFY_AVX512X16, + }, + { + .name = "avx512x32", + .alg = RTE_ACL_CLASSIFY_AVX512X32, + }, }; static struct { @@ -858,13 +866,14 @@ search_ip5tuples_once(uint32_t categories, uint32_t step, const char *alg) } static int -search_ip5tuples(__attribute__((unused)) void *arg) +search_ip5tuples(__rte_unused void *arg) { uint64_t pkt, start, tm; uint32_t i, lcore; + long double st; lcore = rte_lcore_id(); - start = rte_rdtsc(); + start = rte_rdtsc_precise(); pkt = 0; for (i = 0; i != config.iter_num; i++) { @@ -872,12 +881,16 @@ search_ip5tuples(__attribute__((unused)) void *arg) config.trace_step, config.alg.name); } - tm = rte_rdtsc() - start; + tm = rte_rdtsc_precise() - start; + + st = (long double)tm / rte_get_timer_hz(); dump_verbose(DUMP_NONE, stdout, "%s @lcore %u: %" PRIu32 " iterations, %" PRIu64 " pkts, %" - PRIu32 " categories, %" PRIu64 " cycles, %#Lf cycles/pkt\n", - __func__, lcore, i, pkt, config.run_categories, - tm, (pkt == 0) ? 0 : (long double)tm / pkt); + PRIu32 " categories, %" PRIu64 " cycles (%.2Lf sec), " + "%.2Lf cycles/pkt, %.2Lf pkt/sec\n", + __func__, lcore, i, pkt, + config.run_categories, tm, st, + (pkt == 0) ? 0 : (long double)tm / pkt, pkt / st); return 0; } @@ -1085,7 +1098,7 @@ main(int argc, char **argv) if (config.trace_file != NULL) tracef_init(); - RTE_LCORE_FOREACH_SLAVE(lcore) + RTE_LCORE_FOREACH_WORKER(lcore) rte_eal_remote_launch(search_ip5tuples, NULL, lcore); search_ip5tuples(NULL);