From: Vladimir Medvedkin Date: Mon, 9 Mar 2020 12:42:21 +0000 (+0000) Subject: app/test-fib: fix 32-bits build X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d19034ae63e95978c6017d18db1924f515f93cc7;hp=f1caf7f859d7c7e08ee69e998b572880c70bad29;p=dpdk.git app/test-fib: fix 32-bits build Change format for uint64_t to %"PRIu64" to make compiler happy. Fixes: 103809d032cd ("app/test-fib: add test application for FIB") Cc: stable@dpdk.org Signed-off-by: Vladimir Medvedkin --- diff --git a/app/test-fib/main.c b/app/test-fib/main.c index aa83f76851..7fd342092f 100644 --- a/app/test-fib/main.c +++ b/app/test-fib/main.c @@ -790,7 +790,7 @@ dump_rt_4(struct rt_rule_4 *rt) } for (i = 0; i < config.nb_routes; i++) - fprintf(f, NIPQUAD_FMT"/%d %lu\n", NIPQUAD(rt[i].addr), + fprintf(f, NIPQUAD_FMT"/%d %"PRIu64"\n", NIPQUAD(rt[i].addr), rt[i].depth, rt[i].nh); fclose(f); @@ -858,7 +858,8 @@ run_v4(void) return -ret; } } - printf("AVG FIB add %lu\n", (rte_rdtsc_precise() - start) / j); + printf("AVG FIB add %"PRIu64"\n", + (rte_rdtsc_precise() - start) / j); i += j; } @@ -885,7 +886,7 @@ run_v4(void) return -ret; } } - printf("AVG LPM add %lu\n", + printf("AVG LPM add %"PRIu64"\n", (rte_rdtsc_precise() - start) / j); i += j; } @@ -939,7 +940,7 @@ run_v4(void) for (j = 0; j < (config.nb_routes - i) / k; j++) rte_fib_delete(fib, rt[i + j].addr, rt[i + j].depth); - printf("AVG FIB delete %lu\n", + printf("AVG FIB delete %"PRIu64"\n", (rte_rdtsc_precise() - start) / j); i += j; } @@ -951,7 +952,7 @@ run_v4(void) rte_lpm_delete(lpm, rt[i + j].addr, rt[i + j].depth); - printf("AVG LPM delete %lu\n", + printf("AVG LPM delete %"PRIu64"\n", (rte_rdtsc_precise() - start) / j); i += j; } @@ -973,7 +974,7 @@ dump_rt_6(struct rt_rule_6 *rt) } for (i = 0; i < config.nb_routes; i++) { - fprintf(f, NIPQUAD6_FMT"/%d %lu\n", NIPQUAD6(rt[i].addr), + fprintf(f, NIPQUAD6_FMT"/%d %"PRIu64"\n", NIPQUAD6(rt[i].addr), rt[i].depth, rt[i].nh); } @@ -1036,7 +1037,8 @@ run_v6(void) return -ret; } } - printf("AVG FIB add %lu\n", (rte_rdtsc_precise() - start) / j); + printf("AVG FIB add %"PRIu64"\n", + (rte_rdtsc_precise() - start) / j); i += j; } @@ -1063,7 +1065,7 @@ run_v6(void) return -ret; } } - printf("AVG LPM add %lu\n", + printf("AVG LPM add %"PRIu64"\n", (rte_rdtsc_precise() - start) / j); i += j; } @@ -1121,7 +1123,7 @@ run_v6(void) for (j = 0; j < (config.nb_routes - i) / k; j++) rte_fib6_delete(fib, rt[i + j].addr, rt[i + j].depth); - printf("AVG FIB delete %lu\n", + printf("AVG FIB delete %"PRIu64"\n", (rte_rdtsc_precise() - start) / j); i += j; } @@ -1133,7 +1135,7 @@ run_v6(void) rte_lpm6_delete(lpm, rt[i + j].addr, rt[i + j].depth); - printf("AVG LPM delete %lu\n", + printf("AVG LPM delete %"PRIu64"\n", (rte_rdtsc_precise() - start) / j); i += j; }